|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.remotebuild.RBResource
public abstract class RBResource
RBResource is the abstract class of all resources that support remote build. The RB* hierarchy supports the writing of synchronization snapshots and various remote operations.
An RBResource has a gender that reflects its type on the remote system. It also has a namespace in which its name is considered unique in some sense.
An RBResource can be one of 3 general types:
Field Summary | |
---|---|
static String |
Copyright
|
static int |
G_BINARYOBJECT
The gender of an object is a value that represents its type on the remote system. |
static int |
G_LIBRARY
The gender of an object is a value that represents its type on the remote system. |
static int |
G_MEMBER
The gender of an object is a value that represents its type on the remote system. |
static int |
G_PROJECT
The gender of an object is a value that represents its type on the remote system. |
static int |
G_SAVEFILE
The gender of an object is a value that represents its type on the remote system. |
static int |
G_SOURCEFILE
The gender of an object is a value that represents its type on the remote system. |
static int |
G_UNKNOWN
The gender of an object is a value that represents its type on the remote system. |
static int |
NS_LOCAL
|
static int |
NS_NETWORK
|
static int |
NS_QSYS
|
static int |
NS_UNKNOWN
|
static String |
RB_QUALIFIER
|
Constructor Summary | |
---|---|
protected |
RBResource(AbstractISeriesResource resource)
Constructs an RBResource from a model resource. |
protected |
RBResource(String name,
long localStamp,
long targetStamp)
Constructs an RBResource from its snapshot information. |
Method Summary | |
---|---|
void |
accept(RBResourceVisitor visitor)
Accepts a resource visitor. |
void |
addChild(RBResource child)
Adds a child to this resource and sets the child's parent to this resource. |
boolean |
attach(RBResource companion)
Attaches another resource to this one. |
RBStatus |
checkAuthorities(String[] authorities)
Checks the authorities of a remote resource that is the companion of the current resource. |
RBStatus |
checkContentsOn(RBSystem system)
Checks the contents of the local resource against those of the target system resource. |
RBStatus |
checkExistence()
Checks the existence of a remote resource that is the companion of this resource. |
RBStatus |
checkName()
Checks the name of this path for validity. |
RBStatus |
checkPropertiesOn(RBSystem system)
Checks the properties of the local resource against those of the remote resource. |
protected void |
checkProperty(Collection<String> modified,
com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr,
String attributeName,
String propertyName)
Adds a property name to the list of modified properties if it is modified from its snapshot value. |
void |
clearMark(int n)
Clears a mark on the resource. |
void |
clearMarks()
Clears all marks on the resource. |
RBResource |
copy()
Returns a copy of this resource with no children. |
abstract RBStatus |
createOn(RBSystem system)
Creates the corresponding resource on the system. |
abstract boolean |
existsOn(RBSystem system)
Checks to see if the resource's counterpart exists on the target system. |
RBResource |
findResource(LinkedList resourcePath)
Returns the resource found by following the path from this resource. |
Object |
getAdapter(Class targetType)
Returns the adapter for this resource for the given class. |
abstract List |
getAllProperties()
Returns a set of all the property names this resource. |
List |
getAncestors()
Gets the local ancestors of a single resource up to its project resource. |
IResource |
getBaseResource()
Returns the base resource associated with this resource. |
String |
getCCSID()
|
RBResource |
getChild(String key)
Returns a child with the given short key. |
RBResource[] |
getChildren()
Returns an array of children of this resource. |
RBResource |
getCompanion()
Retrieves the companion resource. |
RBResourceContext |
getContext()
|
String |
getDBCS()
|
List |
getDescendents()
Returns a List of all local resources in the tree rooted at a particular resource. |
String |
getDescription()
|
abstract int |
getGender()
Returns the type of this resource -- see constants. |
RBResource |
getHome()
Returns the home resource for this resource. |
RBResource |
getHome(int nameSpace)
Returns the home resource for the given name space. |
abstract String |
getIFSName()
Returns the IFS name of the object from the path. |
List<String> |
getKeyPath()
|
long |
getLocalStamp()
Returns the local stamp of this resource. |
protected String |
getLocation()
Returns the absolute path name string to the local resource. |
String |
getLongKey()
Returns a string unique to this resource that can be used to create the "canonical" ordering of local resources in the workspace. |
List |
getModelChildren()
|
AbstractISeriesResource |
getModelParent()
|
AbstractISeriesProject |
getModelProject()
Returns the model project for this resource. |
String |
getModelProperty(String name)
Returns a property of this resource maintained by the model. |
AbstractISeriesResource |
getModelResource()
Returns the model resource associated with this resource. |
abstract Collection<String> |
getModifiedProperties(com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr)
|
String |
getName()
Returns the name of this resource |
abstract int |
getNameSpace()
Returns the name space for this resource -- see constants. |
int |
getNumberOfChildren()
Returns the number of children this resource has. |
RBResource |
getParent()
Returns the parent of this resource. |
String |
getPersistentProperty(String name)
Returns a persistent property for a resource. |
RBProject |
getProject()
Returns the project resource for a resource. |
String |
getProjectProperty(String name)
Returns a model property on the project for this resource. |
abstract IPath |
getProjectRelativePath()
Returns the project relative path of this resource. |
IISeriesPropertiesModel |
getPropertiesModel()
Gets the properties model for this resource. |
abstract String |
getQSYSName()
Returns the QSYS name space name of the object. |
String |
getRecordLength()
|
String |
getRemoteName()
Returns the displayable name for this resource on the remote system. |
LinkedList |
getResourcePath()
Returns the path to this resource from its root resource. |
Object |
getSessionProperty(String name)
Returns a "remote build" session property for a resource. |
String |
getShortKey()
Returns a value that may be used as a key for this resource in the context of its parent. |
abstract String |
getSnapshotType()
Returns the snapshot type for this class. |
String |
getSourceType()
|
RBSystem |
getSystem()
Returns the target system for this resource. |
String |
getSystemName()
Returns the system name of the current target system for this resource. |
long |
getTargetStamp()
Returns the target stamp of this resource. |
boolean |
hasChildren()
Returns true if this resource has children. |
boolean |
hasContents()
|
boolean |
hasContext()
|
int |
hashCode()
Returns the hashCode for this resource. |
boolean |
hasMark(int n)
Return true if the resource has a particular mark. |
boolean |
isEquivalentTo(Object o)
Returns true if and only if the resources identify the same iSeries object. |
boolean |
isHome()
Returns true if this is a home resource. |
boolean |
isLocal()
Returns true if the resource exists in the local workspace. |
boolean |
isMarked()
Return true if the resource is marked by any mark. |
boolean |
isProject()
Returns true if this is a project resource. |
boolean |
isRemote()
Returns true if the resource is a remote resource. |
boolean |
isSnapshot()
Returns true if the resource is a snapshot resource. |
static RBResource |
makeFrom(AbstractISeriesResource modelResource)
Returns a resource made from a model resource. |
static RBResource |
makeFrom(AbstractISeriesResource modelResource,
RBResourceContext context)
Returns a resource made from a model resource with respect to the context. |
static RBResource |
makeFrom(int gender,
String snapshotName,
long localStamp,
long targetStamp)
Makes a new resource from its basic information. |
RBStatus |
pushContentsTo(RBSystem system)
Pushes the contents of a resource to a target system. |
RBStatus |
pushPropertiesTo(RBSystem system)
Pushes the properties to a target system. |
RBStatus |
pushPropertiesTo(RBSystem system,
Collection properties)
Pushes the properties named in the set to the target system resource. |
RBStatus |
pushSourceTypeTo(RBSystem system)
Pushes the source type of this resource to the target system. |
QualifiedName |
qualify(String name)
Qualifies a name with the remote build qualifier for use as a property name. |
void |
removeChild(String key)
Removes a child from a parent. |
void |
saveModelProperties()
Saves the model properties. |
void |
setCompanion(RBResource companion)
Sets the companion resource. |
void |
setContext(RBResourceContext context)
Sets the resolution context for this resource. |
void |
setLocalStamp(long stamp)
Sets the local stamp of this resource. |
void |
setMark(int n)
Sets a mark on the resource. |
void |
setModelProperty(String name,
String value)
Sets a model property for this resource. |
protected void |
setName(String name)
Sets the short name of this resource. |
void |
setPersistentProperty(String name,
String property)
Sets a persistent property for a resource. |
void |
setProjectProperty(String name,
String value)
Sets a model property on the project for this resource. |
void |
setSessionProperty(String name,
Object property)
Sets a session property for a resource. |
void |
setSourceType(String type)
Sets the source type for this resource. |
void |
setTargetStamp(long stamp)
Sets the target stamp of this resource. |
void |
synchronize()
Synchronizes the properties of this resource. |
String |
toString()
|
void |
updateFrom(RBResource r)
Updates a resources stamps from the argument. |
boolean |
wasCreated()
Returns true if the resource has been created with respect to its companion resource. |
boolean |
wasDeleted()
Returns true if the resource has been deleted with respect to its companion resource. |
boolean |
wasModified()
Returns true if the resource has been modified with respect to its companion resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String Copyright
public static final int NS_UNKNOWN
public static final int NS_LOCAL
public static final int NS_QSYS
public static final int NS_NETWORK
public static final String RB_QUALIFIER
public static final int G_UNKNOWN
Gender of object is not known. Value is 0. Used if an RBResource is created in some undefined fashion.
public static final int G_PROJECT
The resource is an RBProject. Value is 1.
public static final int G_SOURCEFILE
The resource is an RBSourceFile. Value is 2.
public static final int G_SAVEFILE
The resource is an RBSaveFile. Value is 4.
public static final int G_MEMBER
The resource is an RBMember. Value is 6.
public static final int G_LIBRARY
The resource is an RBLibrary. Value is 7.
public static final int G_BINARYOBJECT
The resource is an RBBinaryObject. Value is 8.
Constructor Detail |
---|
protected RBResource(AbstractISeriesResource resource)
Not for use by clients.
protected RBResource(String name, long localStamp, long targetStamp)
Used during snapshot reading.
Not for use by clients.
Method Detail |
---|
public static RBResource makeFrom(AbstractISeriesResource modelResource, RBResourceContext context)
modelResource
- the model resource from which to create a new resourcecontext
- the context in which to check for existence of the resource prior to creation.
public static RBResource makeFrom(AbstractISeriesResource modelResource)
public static RBResource makeFrom(int gender, String snapshotName, long localStamp, long targetStamp)
Used to make snapshot resources from their snapshot information.
public abstract int getNameSpace()
public abstract int getGender()
public abstract String getSnapshotType()
public abstract String getIFSName()
public abstract String getQSYSName()
public String getSystemName()
public abstract IPath getProjectRelativePath()
public abstract Collection<String> getModifiedProperties(com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr)
public final void setMark(int n)
public final void clearMarks()
public final void clearMark(int n)
n
- public final boolean isMarked()
public final boolean hasMark(int n)
public final Object getAdapter(Class targetType)
public final IResource getBaseResource()
public final AbstractISeriesResource getModelResource()
public final long getLocalStamp()
public final void setLocalStamp(long stamp)
public final long getTargetStamp()
public final void setTargetStamp(long stamp)
public String getName()
public String getSourceType()
public String getDescription()
public String getDBCS()
public String getRecordLength()
public String getCCSID()
protected final void setName(String name)
public void setContext(RBResourceContext context)
public RBResourceContext getContext()
public boolean hasContext()
true
if the resources has a resolution context.public String getShortKey()
public final String getLongKey()
public final List<String> getKeyPath()
public RBStatus checkName()
public final int hashCode()
hashCode
in class Object
public final boolean isProject()
public final boolean isHome()
public final boolean isLocal()
public final boolean isSnapshot()
public final boolean isRemote()
public final boolean wasDeleted()
public final boolean wasCreated()
public final boolean wasModified()
public final List getModelChildren()
public final AbstractISeriesResource getModelParent()
public final AbstractISeriesProject getModelProject()
public final void addChild(RBResource child)
public final void removeChild(String key)
public final int getNumberOfChildren()
public final boolean hasChildren()
public final boolean hasContents()
public final RBResource[] getChildren()
public final RBResource getChild(String key)
public final RBResource getParent()
public final void setCompanion(RBResource companion)
public final RBResource getCompanion()
public final boolean attach(RBResource companion)
This does not perform the complementary attachment of this resource to the companion.
Returns true if the resource was attached, false otherwise.
public final List getAncestors()
public final List getDescendents()
public final RBResource getHome()
public final RBResource getHome(int nameSpace)
public final RBProject getProject()
public RBSystem getSystem()
public final RBResource findResource(LinkedList resourcePath)
public final LinkedList getResourcePath()
public final void updateFrom(RBResource r)
public final void synchronize()
protected String getLocation()
public RBResource copy()
public final boolean isEquivalentTo(Object o)
public abstract boolean existsOn(RBSystem system)
public abstract RBStatus createOn(RBSystem system)
public RBStatus checkAuthorities(String[] authorities)
public RBStatus checkExistence()
public RBStatus checkPropertiesOn(RBSystem system)
The default implementation returns an OK status.
public RBStatus checkContentsOn(RBSystem system)
The default implementation returns an OK status.
public final RBStatus pushPropertiesTo(RBSystem system)
public RBStatus pushContentsTo(RBSystem system)
public RBStatus pushPropertiesTo(RBSystem system, Collection properties)
public RBStatus pushSourceTypeTo(RBSystem system)
public final String getRemoteName()
public final Object getSessionProperty(String name)
public final void setSessionProperty(String name, Object property)
public final String getPersistentProperty(String name)
public final void setPersistentProperty(String name, String property)
public final void setModelProperty(String name, String value)
Model property persistence is set in the plugin's XML. Model property names are dotted names, the last segment of which forms the simple name and the first series of segments form the qualifier.
public void setSourceType(String type)
type
- the source type of the resource.public final String getModelProperty(String name)
public final void saveModelProperties()
public final void setProjectProperty(String name, String value)
public final String getProjectProperty(String name)
public final IISeriesPropertiesModel getPropertiesModel()
public abstract List getAllProperties()
protected void checkProperty(Collection<String> modified, com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr, String attributeName, String propertyName)
modified
- the set of modified property names to add tosr
- the snapshot record that provides a basis for changeattributeName
- the name of the attribute in the snapshot recordpropertyName
- the name of the property in the properties modelpublic final void accept(RBResourceVisitor visitor)
public QualifiedName qualify(String name)
public String toString()
toString
in class Object
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |