Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.remotebuild
Class RBProject

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

public class RBProject
extends RBResource

This class implements a project resource. The base resource is an IProject. The model resource is an AbstractISeriesProject. The project resource is always the root node of a complete resource tree. The children of the project resource may be instances of RBLibrary. The children of a project resource are known as "home" resources. There is currently only one home resource per project.


Field Summary
static String ActiveStyle
           
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
RBProject(AbstractISeriesProject resource)
          Constructs an RBProject from a model resource.
RBProject(String name, long localStamp, long targetStamp)
          Constructs a snapshot project from its component information.
 
Method Summary
 RBResource copy()
          Copies a project resource.
 RBStatus createOn(RBSystem system)
          Pushes a creation of a resource to the target system from a project resource.
 boolean existsOn(RBSystem system)
          Tests for the existence of a project on the system.
 IBuildStyle getActiveStyle()
          Returns the active build style for a project.
 List getAllProperties()
          Returns a set of all the property names this resource.
 IBuildStyleConfiguration getConfiguration(String styleId)
          Returns a build style configuration for the given style id.
 IBMiConnection getConnection()
          Returns the ISeriesConnection associated with this project.
 int getGender()
          Returns the gender of this resource.
 String getIFSName()
          Returns the IFS name of the object from the path.
 RBLibrary[] getLibraries()
          Returns an array of library resources covered by this project.
 Collection<String> getModifiedProperties(com.ibm.etools.iseries.projects.internal.snapshots.SnapshotRecord sr)
           
 int getNameSpace()
          Returns the name space for this resource.
 ISystemProfile getProfile()
          Returns the SystemProfile associated with this project.
 IPath getProjectRelativePath()
          Returns the project relative path of this resource.
 String getQSYSName()
          Returns the name of this object in the QSYS name space.
 String getSnapshotType()
          Returns the tag name for this resource.
 RBSourceFile[] getSourceFiles()
          Returns an array of source file resources covered by this project.
 RBSystem getSystem()
          Returns a target RBSystem for this project.
 String getSystemName()
          Returns the system name.
 IPath getTicketLocation()
          Returns the ticket location for this project.
 IPath getWorkingLocation()
          Returns the working storage location for this project.
 void saveConfiguration(IBuildStyleConfiguration configuration)
          Saves a build style configuration to this project.
 void setActiveStyle(IBuildStyle style)
          Activates a particular build style for this project.
 void setSystemName(String systemName)
          Sets the system name -- must be done after a load of this resource from a snapshot since the system name is not on the constructor.
 
Methods inherited from class com.ibm.etools.iseries.remotebuild.RBResource
accept, addChild, attach, checkAuthorities, checkContentsOn, checkExistence, checkName, checkPropertiesOn, checkProperty, clearMark, clearMarks, findResource, getAdapter, getAncestors, getBaseResource, getCCSID, getChild, getChildren, getCompanion, getContext, getDBCS, getDescendents, getDescription, getHome, getHome, getKeyPath, getLocalStamp, getLocation, getLongKey, getModelChildren, getModelParent, getModelProject, getModelProperty, getModelResource, getName, getNumberOfChildren, getParent, getPersistentProperty, getProject, getProjectProperty, getPropertiesModel, getRecordLength, getRemoteName, getResourcePath, getSessionProperty, getShortKey, getSourceType, getTargetStamp, hasChildren, hasContents, hasContext, hashCode, hasMark, isEquivalentTo, isHome, isLocal, isMarked, isProject, isRemote, isSnapshot, makeFrom, makeFrom, makeFrom, pushContentsTo, pushPropertiesTo, pushPropertiesTo, pushSourceTypeTo, qualify, removeChild, saveModelProperties, setCompanion, setContext, setLocalStamp, setMark, setModelProperty, setName, setPersistentProperty, setProjectProperty, setSessionProperty, setSourceType, 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

ActiveStyle

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

RBProject

public RBProject(AbstractISeriesProject resource)
Constructs an RBProject from a model resource.


RBProject

public RBProject(String name,
                 long localStamp,
                 long targetStamp)
Constructs a snapshot project from its component information.

Method Detail

getNameSpace

public final int getNameSpace()
Returns the name space for this resource. This will be NS_LOCAL since projects names are unique within the local namespace.

Specified by:
getNameSpace in class RBResource

getGender

public int getGender()
Returns the gender of this resource. This is always G_PROJECT for projects

Specified by:
getGender in class RBResource

getSnapshotType

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

Should not be used by clients.

Specified by:
getSnapshotType in class RBResource

getProjectRelativePath

public IPath getProjectRelativePath()
Returns the project relative path of this resource. Since the project is already at the root this returns an empty path.

Specified by:
getProjectRelativePath 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

getLibraries

public RBLibrary[] getLibraries()
Returns an array of library resources covered by this project. Should return an array of length 1.


getSourceFiles

public RBSourceFile[] getSourceFiles()
Returns an array of source file resources covered by this project.


getConnection

public IBMiConnection getConnection()
Returns the ISeriesConnection associated with this project. Returns null if no connection can be determined. This can happen if the connection name no longer exists in the profile or if the profile is inactive.


getProfile

public ISystemProfile getProfile()
Returns the SystemProfile associated with this project. Returns null if the profile does not exist. The profile that is returned may be inactive.


getSystem

public RBSystem getSystem()
Returns a target RBSystem for this project. This is constructed from its connection.

Overrides:
getSystem in class RBResource

getIFSName

public String getIFSName()
Returns the IFS name of the object from the path. Returns the empty string if the path is not in an IFS name space or if the name is not well-formed.

Since projects have no direct IFS counterpart this reutrns the empty string.

Specified by:
getIFSName in class RBResource

getQSYSName

public String getQSYSName()
Returns the name of this object in the QSYS name space. Objects which reside only in the IFS name space do not have QSYS names so the empty string is returned.

Since projects have no direct QSYS counterpart this returns the empty string. If the library associated with this project is desired use getLibraries().

Specified by:
getQSYSName in class RBResource

setSystemName

public void setSystemName(String systemName)
Sets the system name -- must be done after a load of this resource from a snapshot since the system name is not on the constructor.


getSystemName

public String getSystemName()
Returns the system name.

Overrides:
getSystemName in class RBResource

copy

public RBResource copy()
Copies a project resource. Used when creating a snapshot from scratch.

Overrides:
copy in class RBResource

existsOn

public boolean existsOn(RBSystem system)
Tests for the existence of a project on the system. This always returns false since project do not have a direct counterpart on the target system.

Specified by:
existsOn in class RBResource

createOn

public RBStatus createOn(RBSystem system)
Pushes a creation of a resource to the target system from a project resource. Does nothing for projects since there is no target resource counterpart. RBLibrary may be pushed to create a library.

Specified by:
createOn in class RBResource

getWorkingLocation

public IPath getWorkingLocation()
Returns the working storage location for this project. This is a directory in the .metadata directory that is associated with this project. Files created in this directory will "accompany" this project throughout rename operations.


getTicketLocation

public IPath getTicketLocation()
Returns the ticket location for this project. Used when creating a storage area for job tickets. This is not intended for direct use by clients since the JobTicketManager handles this function.


setActiveStyle

public void setActiveStyle(IBuildStyle style)
Activates a particular build style for this project. Selection of an active style for a project will usually be done by a property dialog for the project.


getActiveStyle

public IBuildStyle getActiveStyle()
Returns the active build style for a project. Returns null if there is none.


getConfiguration

public IBuildStyleConfiguration getConfiguration(String styleId)
Returns a build style configuration for the given style id. If the configuration has not been saved for this project then a new configuration is returned. This new configuration is based on the workspace default configuration for this style.

This is a convenience method for use by clients that require a particular configuration for builds.


saveConfiguration

public void saveConfiguration(IBuildStyleConfiguration configuration)
Saves a build style configuration to this project. The actual save is delegated to the configuration 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.