[dna-commits] DNA SVN: r223 - trunk/sequencers/dna-sequencer-images/src/test/java/org/jboss/dna/sequencer/images.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Mon Jun 2 15:14:06 EDT 2008


Author: jverhaeg at redhat.com
Date: 2008-06-02 15:14:06 -0400 (Mon, 02 Jun 2008)
New Revision: 223

Modified:
   trunk/sequencers/dna-sequencer-images/src/test/java/org/jboss/dna/sequencer/images/ImageMetadataSequencerTest.java
Log:
DNA-77: SequencerOutput setProperty and setReference method signatures need to be changed
http://jira.jboss.org/jira/browse/DNA-77

Added two methods to the SequencerOutput interface:  a method to obtain the org.jboss.dna.spi.graph.ValueFactories instance that can be used to create paths, names, and other value objects (like binary objects, date-time instants, strings, doubles, etc.); and a method to set the property values using a Path object for the node path, and a Name object for the property name.  The Path, Name, DateTime, Reference, Binary, ValueFactory, and ValueFactories interfaces are all part of the SPI, and will be used by the federation engine, connectors, and (now) sequencers.  The existing SequencerOutput methods (that take string paths and names) simply create the Path and Name objects and then delegate to the new method.


Modified: trunk/sequencers/dna-sequencer-images/src/test/java/org/jboss/dna/sequencer/images/ImageMetadataSequencerTest.java
===================================================================
--- trunk/sequencers/dna-sequencer-images/src/test/java/org/jboss/dna/sequencer/images/ImageMetadataSequencerTest.java	2008-06-02 18:00:06 UTC (rev 222)
+++ trunk/sequencers/dna-sequencer-images/src/test/java/org/jboss/dna/sequencer/images/ImageMetadataSequencerTest.java	2008-06-02 19:14:06 UTC (rev 223)
@@ -2,7 +2,7 @@
  * JBoss, Home of Professional Open Source.
  * Copyright 2008, Red Hat Middleware LLC, and individual contributors
  * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors. 
+ * distribution for a full listing of individual contributors.
  *
  * This is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as
@@ -30,9 +30,6 @@
 import java.net.URL;
 import org.jboss.dna.common.monitor.ProgressMonitor;
 import org.jboss.dna.common.monitor.SimpleProgressMonitor;
-import org.jboss.dna.spi.graph.NamespaceRegistry;
-import org.jboss.dna.spi.graph.impl.BasicNamespaceRegistry;
-import org.jboss.dna.spi.graph.impl.StandardValueFactories;
 import org.jboss.dna.spi.sequencers.MockSequencerOutput;
 import org.junit.After;
 import org.junit.Before;
@@ -55,12 +52,8 @@
     @Before
     public void beforeEach() throws Exception {
         this.sequencer = new ImageMetadataSequencer();
-        NamespaceRegistry registry = new BasicNamespaceRegistry();
-        registry.register("image", "http://jboss.org/dna/images/1.0");
-        registry.register("jcr", "http://www.jcp.org/jcr/1.0");
-        registry.register("nt", "http://www.jcp.org/jcr/nt/1.0");
-        registry.register("mix", "http://www.jcp.org/jcr/mix/1.0");
-        this.output = new MockSequencerOutput(new StandardValueFactories(registry));
+        this.output = new MockSequencerOutput();
+		output.getNamespaceRegistry().register("image", "http://jboss.org/dna/images/1.0");
         this.progress = new SimpleProgressMonitor("Test activity");
         this.cautionGif = this.getClass().getClassLoader().getResource("caution.gif");
         this.cautionJpg = this.getClass().getClassLoader().getResource("caution.jpg");




More information about the dna-commits mailing list