org.jboss.dna.connector.federation.merge
Class FederatedNode

java.lang.Object
  extended by org.jboss.dna.graph.commands.basic.BasicGraphCommand
      extended by org.jboss.dna.graph.commands.basic.BasicGetChildrenCommand
          extended by org.jboss.dna.graph.commands.basic.BasicGetNodeCommand
              extended by org.jboss.dna.connector.federation.merge.FederatedNode
All Implemented Interfaces:
Serializable, Comparable<CreateNodeCommand>, Cacheable, ActsAsUpdate, ActsOnPath, ActsOnProperties, CreateNodeCommand, GetChildrenCommand, GetNodeCommand, GetPropertiesCommand, GraphCommand

public class FederatedNode
extends BasicGetNodeCommand
implements CreateNodeCommand

An in-memory (and temporary) representation of a federated node and it's merged properties and children.

Author:
Randall Hauch
See Also:
Serialized Form

Constructor Summary
FederatedNode(Path path, UUID uuid)
          Create a federated node given the path and UUID.
 
Method Summary
 int compareTo(CreateNodeCommand that)
          
 boolean equals(Object obj)
          
 NodeConflictBehavior getConflictBehavior()
          Get the desired behavior when a node at the target path already exists.
 MergePlan getMergePlan()
          Get the merge plan for this federated node
 UUID getUuid()
          Get the UUID for this federated node.
 int hashCode()
          
 void setConflictBehavior(NodeConflictBehavior nodeConflictBehavior)
          Set the behavior when node conflicts arise.
 void setMergePlan(MergePlan mergePlan)
          Set the merge plan for this federated node
 void setUuid(UUID uuid)
           
 String toString()
          
 
Methods inherited from class org.jboss.dna.graph.commands.basic.BasicGetNodeCommand
getProperties, getPropertiesByName, setProperties, setProperty
 
Methods inherited from class org.jboss.dna.graph.commands.basic.BasicGetChildrenCommand
addChild, getCachePolicy, getChildIdentityProperties, getChildren, getPath, getTimeLoaded, setCachePolicy, setNoChildren, setTimeLoaded
 
Methods inherited from class org.jboss.dna.graph.commands.basic.BasicGraphCommand
getError, hasError, hasNoError, isCancelled, setCancelled, setError
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.dna.graph.commands.CreateNodeCommand
getProperties
 
Methods inherited from interface org.jboss.dna.graph.commands.GraphCommand
getError, hasError, hasNoError, isCancelled, setError
 
Methods inherited from interface org.jboss.dna.graph.commands.GetChildrenCommand
addChild, setNoChildren
 
Methods inherited from interface org.jboss.dna.graph.cache.Cacheable
getCachePolicy, getTimeLoaded, setCachePolicy
 
Methods inherited from interface org.jboss.dna.graph.cache.Cacheable
getCachePolicy, getTimeLoaded, setCachePolicy
 

Constructor Detail

FederatedNode

public FederatedNode(Path path,
                     UUID uuid)
Create a federated node given the path and UUID.

Parameters:
path - the path of the federated node; may not be null
uuid - the UUID of the federated node; may not be null
Method Detail

getUuid

public UUID getUuid()
Get the UUID for this federated node.

Returns:
the UUID; never null

setUuid

public void setUuid(UUID uuid)
Parameters:
uuid - Sets uuid to the specified value.

getMergePlan

public MergePlan getMergePlan()
Get the merge plan for this federated node

Returns:
the merge plan, or null if there is no merge plan

setMergePlan

public void setMergePlan(MergePlan mergePlan)
Set the merge plan for this federated node

Parameters:
mergePlan - the new merge plan for this federated node; may be null

compareTo

public int compareTo(CreateNodeCommand that)

Specified by:
compareTo in interface Comparable<CreateNodeCommand>
See Also:
Comparable.compareTo(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class BasicGetNodeCommand
See Also:
Object.toString()

getConflictBehavior

public NodeConflictBehavior getConflictBehavior()
Get the desired behavior when a node at the target path already exists.

Specified by:
getConflictBehavior in interface CreateNodeCommand
Returns:
the desired behavior; never null
See Also:
CreateNodeCommand.getConflictBehavior()

setConflictBehavior

public void setConflictBehavior(NodeConflictBehavior nodeConflictBehavior)
Set the behavior when node conflicts arise.

Parameters:
nodeConflictBehavior - the conflict behavior, or null if the default should be used


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