Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.remotebuild
Class RBResourceDelta

java.lang.Object
  extended by com.ibm.etools.iseries.remotebuild.RBResourceDelta

public class RBResourceDelta
extends Object

A merge is meant to represent a change in the state of a resource over time with the snapshot resource being "earlier" than the right.


Field Summary
static String Copyright
           
 
Method Summary
 void accept(RBResourceDeltaVisitor visitor)
          Accepts a resource delta visitor.
 void addActualMarking(RBMarking marking)
          Sets the actual marking on the delta.
 void addIntentMarking(RBMarking marking)
          Sets the intent marking on the delta.
 List apply(RBResourceDeltaFilter filter)
          Returns a list of the nodes of the tree that have been accepted by a filter.
 RBStatus checkName()
          Returns the status of the name for this delta.
 RBMarking getActualMarking()
           
 RBResource getCurrent()
          Returns the right component of the merge.
 int getGender()
          Returns the gender for this merged resource.
 RBMarking getIntentMarking()
           
 String getKey()
           
 Collection<String> getModifiedProperties()
           
 int getNameSpace()
          Returns the name space for this merged resource.
 RBResourceDelta getParent()
           
 String getRemoteName()
          Returns the remote name of this resource.
 RBResource getResource()
          Returns the "latest" resource that exists or existed.
 boolean hasCurrent()
          Returns true if there is a right component.
 boolean isProject()
          Returns true if this is a project resource.
 RBResourceDelta locate(List<String> path)
           
static RBResourceDelta makeDelta(RBResource current, com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord snapshot)
          Merges two RBResources and their children.
 com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord merge()
          Returns a SnapshotRecord tree updated according to the actual marking on the delta.
 String toString()
           
 boolean wasChanged()
          Returns true if the node represents a change in the content of a resource.
 boolean wasCreated()
          Returns true if the node represents the creation of a resource
 boolean wasDeleted()
          Returns true if the node represents the deletion of a resource
 boolean wasTouched()
          Returns true if the resource has an attribute that changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values
Method Detail

makeDelta

public static RBResourceDelta makeDelta(RBResource current,
                                        com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord snapshot)
Merges two RBResources and their children. Either argument may be null. If they are both null, null is returned. If both resources are not null then they should be equivalent resources. that is, they designate the same host resource. No check is made for this.


wasDeleted

public boolean wasDeleted()
Returns true if the node represents the deletion of a resource


wasCreated

public boolean wasCreated()
Returns true if the node represents the creation of a resource


wasTouched

public boolean wasTouched()
Returns true if the resource has an attribute that changed.


wasChanged

public boolean wasChanged()
Returns true if the node represents a change in the content of a resource. Note that deletions and creations are not regarded as content changes.


getCurrent

public RBResource getCurrent()
Returns the right component of the merge.


hasCurrent

public boolean hasCurrent()
Returns true if there is a right component.


merge

public com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord merge()
Returns a SnapshotRecord tree updated according to the actual marking on the delta.


apply

public List apply(RBResourceDeltaFilter filter)
Returns a list of the nodes of the tree that have been accepted by a filter. The list is a pre-order traversal of the tree, i.e. parent nodes appear in the list before their children.


accept

public final void accept(RBResourceDeltaVisitor visitor)
Accepts a resource delta visitor. If the visitor returns true then the visitor will also visit the children of this delta.


getResource

public RBResource getResource()
Returns the "latest" resource that exists or existed.


getKey

public String getKey()
Returns:
the short key of the associated RBResourceDelta.

getModifiedProperties

public Collection<String> getModifiedProperties()
Returns:
A collection of names of the modified properties

getRemoteName

public String getRemoteName()
Returns the remote name of this resource. This is used for display purposes, typically shown in progress monitors and dialogs.


getGender

public int getGender()
Returns the gender for this merged resource.


getNameSpace

public int getNameSpace()
Returns the name space for this merged resource.


isProject

public boolean isProject()
Returns true if this is a project resource.


checkName

public RBStatus checkName()
Returns the status of the name for this delta.


getParent

public RBResourceDelta getParent()
Returns:
the parent of this delta, null if there is none.

addIntentMarking

public void addIntentMarking(RBMarking marking)
Sets the intent marking on the delta. The intent marking specifies the operations that will be attempted when synchronizing this resource. This will accept an intent marking only if the marking makes sense for the delta. For example, a marking that specifies a verify will not be applied to a resource that was deleted.


getIntentMarking

public RBMarking getIntentMarking()
Returns:
the intent marking on the delta.

addActualMarking

public void addActualMarking(RBMarking marking)
Sets the actual marking on the delta. The actual marking specifies the operations that succeeded when synchronizing this resource.


getActualMarking

public RBMarking getActualMarking()
Returns:
the actual marking on the delta.

locate

public RBResourceDelta locate(List<String> path)
Returns:
the RBResourceDelta located at the path relative to this RBResourceDelta. Will return null if the delta cannot be found.

toString

public String toString()
Overrides:
toString in class Object

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.