Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.remotebuild
Class RBMember

java.lang.Object
  extended by com.ibm.etools.iseries.remotebuild.RBResource
      extended by com.ibm.etools.iseries.remotebuild.RBQSYSResource
          extended by com.ibm.etools.iseries.remotebuild.RBMember

public class RBMember
extends RBQSYSResource

This class implements a source file member. The name is the base resource name. The base resource is an IFile. The model resource is an AbstractISeriesNativeMember. The parent node is always an RBSourceFile. There are no child nodes. The contents are always treated as text.


Field Summary
static String Copyright
           
 
Fields inherited from class com.ibm.etools.iseries.remotebuild.RBResource
G_BINARYOBJECT, G_LIBRARY, G_MEMBER, G_PROJECT, G_SAVEFILE, G_SOURCEFILE, G_UNKNOWN, NS_LOCAL, NS_NETWORK, NS_QSYS, NS_UNKNOWN, RB_QUALIFIER
 
Constructor Summary
RBMember(AbstractISeriesNativeMember resource)
          Constructs an RBMember from a model resource.
RBMember(String name, long localStamp, long targetStamp)
          Constructs an RBMember its component information.
 
Method Summary
 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 on the remote system for conflict with this member.
 RBStatus checkName()
          Checks the member name.
 RBStatus checkNameAndType()
          Checks the source member name and type extension.
 RBStatus checkType()
          Checks the source type.
 RBStatus createOn(RBSystem system)
          Pushes a creation of a source file member to the target system from a file resource.
 boolean existsOn(RBSystem system)
          Tests for existence of the member on the host system.
 List getAllProperties()
          Returns a set of all the property names this resource.
 String getDescription()
           
 int getGender()
          Returns the gender of this resource.
 String getIFSName()
          Returns the IFS name of this member.
 String getMemberName()
          Returns the member name.
 Collection<String> getModifiedProperties(com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr)
           
 String getObjectName()
          Returns the object name.
 IPath getProjectRelativePath()
          Returns the project relative path of this resource.
 String getQSYSName()
          Returns the name of this object in the QSYS name space.
 CLQualifiedName getQualifiedName()
          Returns the fully-qualified system-relative object name for a resource in the QSYS namespace.
 String getShortKey()
          Returns a key for this object in the context of its parent.
 String getSimpleObjectType()
          Returns the simple object type for this resource.
 String getSnapshotType()
          Returns the tag name for this resource.
 String getSourceType()
          Returns the source type of the member.
static String makeKey(String name)
          Makes a key for this type.
 RBStatus pushContentsTo(RBSystem system)
          Pushes the contents of a source file member to the target system from a file resource.
 RBStatus pushPropertiesTo(RBSystem system, Collection properties)
          Pushes the properties of a member to the target system.
 RBStatus pushSourceTypeTo(RBSystem system)
          Pushes the source type of this resource to the target system.
 void setSourceType(String sourceType)
          Sets the source type of this member.
 
Methods inherited from class com.ibm.etools.iseries.remotebuild.RBQSYSResource
getLibraryName, getNameSpace, getObjectType
 
Methods inherited from class com.ibm.etools.iseries.remotebuild.RBResource
accept, addChild, attach, checkExistence, checkPropertiesOn, checkProperty, clearMark, clearMarks, copy, findResource, getAdapter, getAncestors, getBaseResource, getCCSID, getChild, getChildren, getCompanion, getContext, getDBCS, getDescendents, getHome, getHome, getKeyPath, getLocalStamp, getLocation, getLongKey, getModelChildren, getModelParent, getModelProject, getModelProperty, getModelResource, getName, getNumberOfChildren, getParent, getPersistentProperty, getProject, getProjectProperty, getPropertiesModel, getRecordLength, getRemoteName, getResourcePath, getSessionProperty, getSystem, getSystemName, getTargetStamp, hasChildren, hasContents, hasContext, hashCode, hasMark, isEquivalentTo, isHome, isLocal, isMarked, isProject, isRemote, isSnapshot, makeFrom, makeFrom, makeFrom, pushPropertiesTo, qualify, removeChild, saveModelProperties, setCompanion, setContext, setLocalStamp, setMark, setModelProperty, setName, setPersistentProperty, setProjectProperty, setSessionProperty, setTargetStamp, synchronize, toString, updateFrom, wasCreated, wasDeleted, wasModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

Copyright

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

RBMember

public RBMember(AbstractISeriesNativeMember resource)
Constructs an RBMember from a model resource. Used by clients whenever the actions available in this class are needed for a NativeMember.


RBMember

public RBMember(String name,
                long localStamp,
                long targetStamp)
Constructs an RBMember its component information. Usually used when constructing a snapshot so that a delta can be determined.

Clients should only use when constructing resources from stored snapshots.

Method Detail

makeKey

public static String makeKey(String name)
Makes a key for this type. Used to determine its uniqueness relative to a particular source file. Member names aren't case sensitive so "mbr01" and "MBR01" both refer to the same source file member.


getGender

public int getGender()
Returns the gender of this resource. Always returns G_MEMBER for members.

Specified by:
getGender in class RBResource

getSnapshotType

public String getSnapshotType()
Returns the tag name for this resource.

Used when constructing snapshots. Should not be used directly by clients.

Specified by:
getSnapshotType in class RBResource

getObjectName

public String getObjectName()
Returns the object name. For members this is the name of its source file.


getQualifiedName

public CLQualifiedName getQualifiedName()
Returns the fully-qualified system-relative object name for a resource in the QSYS namespace. For members this is the qualified name of its source file.

Specified by:
getQualifiedName in class RBQSYSResource

getSimpleObjectType

public String getSimpleObjectType()
Returns the simple object type for this resource. Since the containing object is a file this is "FILE".

Specified by:
getSimpleObjectType in class RBQSYSResource

getMemberName

public String getMemberName()
Returns the member name.


getSourceType

public String getSourceType()
Returns the source type of the member. This will be null if the member has no source type.

Overrides:
getSourceType in class RBResource
Returns:
the source type for this resource. This is null unless the resource supports source types. Should be overridden by subclasses that support source types.

setSourceType

public void setSourceType(String sourceType)
Sets the source type of this member. This can be done only if the member is a snapshot resource. If not, this operation is ignored.

Overrides:
setSourceType in class RBResource
Parameters:
sourceType - the source type of the resource.

getProjectRelativePath

public IPath getProjectRelativePath()
Returns the project relative path of this resource.

Specified by:
getProjectRelativePath in class RBResource

getIFSName

public String getIFSName()
Returns the IFS name of this member.

Specified by:
getIFSName in class RBResource

getQSYSName

public String getQSYSName()
Returns the name of this object in the QSYS name space. For members this is of the form library/file(member).

Specified by:
getQSYSName in class RBResource

getShortKey

public String getShortKey()
Returns a key for this object in the context of its parent. Used for accessing members within files.

Overrides:
getShortKey in class RBQSYSResource

checkName

public RBStatus checkName()
Checks the member name.

Overrides:
checkName in class RBResource

checkType

public RBStatus checkType()
Checks the source type.


checkNameAndType

public RBStatus checkNameAndType()
Checks the source member name and type extension.


existsOn

public boolean existsOn(RBSystem system)
Tests for existence of the member on the host system.

Specified by:
existsOn in class RBResource

createOn

public RBStatus createOn(RBSystem system)
Pushes a creation of a source file member to the target system from a file resource. This will also push the contents.

Specified by:
createOn in class RBResource

checkContentsOn

public RBStatus checkContentsOn(RBSystem system)
Checks the contents on the remote system for conflict with this member.

Overrides:
checkContentsOn in class RBResource

pushContentsTo

public RBStatus pushContentsTo(RBSystem system)
Pushes the contents of a source file member to the target system from a file resource.

Overrides:
pushContentsTo in class RBResource

pushPropertiesTo

public RBStatus pushPropertiesTo(RBSystem system,
                                 Collection properties)
Pushes the properties of a member to the target system.

Overrides:
pushPropertiesTo in class RBResource

checkAuthorities

public RBStatus checkAuthorities(String[] authorities)
Description copied from class: RBResource
Checks the authorities of a remote resource that is the companion of the current resource. Will return a CODE_CHECK_AUTHORITY status if the object exists but the user does not have the requested authorities. Will return an CODE_OBJECT_MISSING status if the object does not exist.

Overrides:
checkAuthorities in class RBResource

pushSourceTypeTo

public RBStatus pushSourceTypeTo(RBSystem system)
Description copied from class: RBResource
Pushes the source type of this resource to the target system. If the resource has no source type this does nothing. This method can be overridden by subclasses.

Overrides:
pushSourceTypeTo in class RBResource

getModifiedProperties

public Collection<String> getModifiedProperties(com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr)
Specified by:
getModifiedProperties in class RBResource

getAllProperties

public List getAllProperties()
Description copied from class: RBResource
Returns a set of all the property names this resource. If there are no properties this list will be empty.

Specified by:
getAllProperties in class RBResource

getDescription

public String getDescription()
Overrides:
getDescription in class RBResource
Returns:
the text description for this resource. This is null unless the resource supports descriptions. Should be overridden by subclasses that support descriptions.

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.