org.jboss.dna.graph.util
Class GraphImporter.ImporterCommands

java.lang.Object
  extended by org.jboss.dna.graph.commands.basic.BasicGraphCommand
      extended by org.jboss.dna.graph.util.GraphImporter.ImporterCommands
All Implemented Interfaces:
Iterable<GraphCommand>, CompositeCommand, GraphCommand, SequencerOutput
Enclosing class:
GraphImporter

protected class GraphImporter.ImporterCommands
extends BasicGraphCommand
implements SequencerOutput, CompositeCommand


Constructor Summary
protected GraphImporter.ImporterCommands(Path destinationPath, NodeConflictBehavior conflictBehavior)
           
 
Method Summary
 ValueFactories getFactories()
          Get the factories that can be used to create paths and other property values.
 NamespaceRegistry getNamespaceRegistry()
          Convenience method to get the namespace registry used by the name value factory.
 Iterator<GraphCommand> iterator()
          
 void setProperty(Path nodePath, Name propertyName, Object... values)
          Set the supplied property on the supplied node.
 void setProperty(String nodePath, String propertyName, Object... values)
          Set the supplied property on the supplied node.
 void setReference(String nodePath, String propertyName, String... paths)
          Set the supplied reference on the supplied node.
 
Methods inherited from class org.jboss.dna.graph.commands.basic.BasicGraphCommand
createChildrenList, createChildrenList, createChildrenList, createChildrenList, getError, hasError, hasNoError, isCancelled, setCancelled, setError, setProperty, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.dna.graph.commands.GraphCommand
getError, hasError, hasNoError, isCancelled, setError
 

Constructor Detail

GraphImporter.ImporterCommands

protected GraphImporter.ImporterCommands(Path destinationPath,
                                         NodeConflictBehavior conflictBehavior)
Method Detail

getFactories

public ValueFactories getFactories()
Get the factories that can be used to create paths and other property values.

Specified by:
getFactories in interface SequencerOutput
Returns:
the collection of factories; never null
See Also:
SequencerOutput.getFactories()

getNamespaceRegistry

public NamespaceRegistry getNamespaceRegistry()
Convenience method to get the namespace registry used by the name value factory.

Specified by:
getNamespaceRegistry in interface SequencerOutput
Returns:
the namespace registry; never null
See Also:
SequencerOutput.getNamespaceRegistry()

setProperty

public void setProperty(String nodePath,
                        String propertyName,
                        Object... values)
Set the supplied property on the supplied node.

The value factories should be used to create paths, names, and values. These factories can be used to create new values or convert values from one property type to another. (Note that each of the factories have methods that create values from all of the property types.)

This method is provided as a convenience, but it identical to creating a Path and Name using the factories and calling SequencerOutput.setProperty(Path, Name, Object...).

Specified by:
setProperty in interface SequencerOutput
Parameters:
nodePath - the path to the node containing the property; may not be null
propertyName - the name of the property to be set
values - the value(s) for the property; may be empty if any existing property is to be removed
See Also:
SequencerOutput.setProperty(java.lang.String, java.lang.String, java.lang.Object[])

setProperty

public void setProperty(Path nodePath,
                        Name propertyName,
                        Object... values)
Set the supplied property on the supplied node.

The value factories should be used to create paths, names, and values. These factories can be used to create new values or convert values from one property type to another. (Note that each of the factories have methods that create values from all of the property types.)

Specified by:
setProperty in interface SequencerOutput
Parameters:
nodePath - the path to the node containing the property; may not be null
propertyName - the name of the property to be set
values - the value(s) for the property; may be empty if any existing property is to be removed
See Also:
SequencerOutput.setProperty(org.jboss.dna.graph.properties.Path, org.jboss.dna.graph.properties.Name, java.lang.Object[])

setReference

public void setReference(String nodePath,
                         String propertyName,
                         String... paths)
Set the supplied reference on the supplied node.

This method is provided as a convenience, but it identical to creating a Path and Name using the factories and calling SequencerOutput.setProperty(Path, Name, Object...).

Specified by:
setReference in interface SequencerOutput
Parameters:
nodePath - the path to the node containing the property; may not be null
propertyName - the name of the property to be set
paths - the paths to the referenced property, which may be absolute paths or relative to the sequencer output node; may be empty if any existing property is to be removed
See Also:
SequencerOutput.setReference(java.lang.String, java.lang.String, java.lang.String[])

iterator

public Iterator<GraphCommand> iterator()

Specified by:
iterator in interface Iterable<GraphCommand>
See Also:
Iterable.iterator()


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.