|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.starbase.starteam.CacheRef
|
+--com.starbase.starteam.NamedCacheRef
|
+--com.starbase.starteam.TypedResource
|
+--com.starbase.starteam.SimpleTypedResource
|
+--com.starbase.starteam.Project
Represents a StarTeam project which is essentially just a collection of
Views.
| Constructor Summary | |
Project(Server server,
java.lang.String name,
java.lang.String rootDirectory)
Constructs a new project. |
|
Project(Server server,
java.lang.String name,
java.lang.String description,
int nCompaction,
int nEncryption,
boolean bUseMail,
java.lang.String rootDirectory,
int projectType,
java.lang.String configSource1,
java.lang.String configSource2,
Folder folderTree)
Deprecated. |
|
Project(Server server,
java.lang.String name,
java.lang.String description,
int nCompaction,
int nEncryption,
boolean bUseMail,
java.lang.String rootDirectory,
int projectType,
java.lang.String sForeignPassword,
java.lang.String configFile,
java.lang.String archivePath)
Constructs a new project that wraps around a foreign archive. |
|
| Method Summary | |
void |
acquireOwnership()
Sets ownership of this securable object to the logged in user. |
void |
addProjectListener(ProjectListener listener)
Adds a listener for Project events. |
void |
addViewListener(ViewListener listener)
Adds a listener for View events. |
Project |
copy()
Creates a copy of this Project object, with project properties fully populated. |
void |
discard()
Discards all of the cached properties for this project. |
boolean |
equals(java.lang.Object another)
Returns true if the specified Object identifies the same exact
Project. |
java.lang.Object |
get(java.lang.String propertyName)
Return the value for the specified property. |
View[] |
getAccessibleViews()
Gets the set of Views accessible from this Project. |
AclEntry[] |
getACL()
Returns the Access Control List for this project. |
java.lang.String |
getConfigSource1()
Returns the ConfigSource1 value. |
java.lang.String |
getConfigSource2()
Returns the ConfigSource2 value. |
AclEntry[] |
getContainerLevelACL(java.lang.String typeName)
Returns the Access Control List for items of the specified type for this project. |
int |
getCreatedBy()
Returns the user ID of the user that created the project. |
OLEDate |
getCreatedTime()
Returns the time at which the project was created. |
Type[] |
getDefaultItemTypes()
Gets the default item types that will be shared upon creation of a variant view. |
View |
getDefaultView()
Gets the default View for this Project. |
java.lang.String |
getDescription()
Returns the description of this project. |
int |
getID()
Returns the unique integer identifier for this project. |
java.lang.String |
getKeywordExpansionFileExtensions()
Returns the list of file extensions upon which to perform keyword expansion. |
java.lang.String |
getName()
Returns the name of this project. |
int |
getOwner()
If there are no access rights explicitly assigned to this object, then the effective access rights come from a parent container. |
ISecurableContainer |
getParentContainer()
A Project has no parent container. |
int |
getProjectType()
Returns the project type: StarTeam, VSS, PVCS |
Server |
getServer()
Returns the server to which this project belongs. |
View[] |
getViews()
Gets all the views on this Project. |
void |
goNative()
Converts a foreign PVCS or VSS project to a native StarTeam project. |
int |
hashCode()
Returns a hash code for this project. |
boolean |
hasPermission(int permissions)
Returns true if desired permissions are granted for this project |
boolean |
hasPermission(int permissions,
java.lang.String typeName)
Returns true if desired permissions are granted for items of the specified type for this project |
boolean |
isActiveProcessItemStateEnabled(EnumeratedValue value)
Determines whether or not a given status value is one that can be used for an active process item. |
boolean |
isDeleted()
Determines whether or not this project has been deleted from the server. |
boolean |
isEnhancedProcessItemsEnabled()
Determines whether or not the enhanced process item model is in effect for this project. |
boolean |
isEqualTo(Project project)
Compares the properties of two Projects. |
boolean |
isExpandKeywords()
Returns true if keywords are expanded when files are checked out. |
boolean |
isForceCheckinReason()
Returns true if a comment must be included with file check in operations. |
boolean |
isMailUsed()
Return true if email is used in this project. |
boolean |
isNew()
Returns true if this project has not yet been saved on the server. |
boolean |
isProcessItemsRequired()
Determines whether or not process items are required for this project. |
boolean |
isProcessItemTypeEnabled(Type type)
Determines whether or not process items of the given type are supported for this project. |
boolean |
isRefreshRequired()
Returns true if a refresh() operation might have resulted in project properties being updated; returns false if and only if it is known that the project properties had not been changed since the last refresh. |
boolean |
isRequireLockForCheckin()
Returns true if files must be locked before they are checked in. |
void |
populate()
Populates project properties, if they have not already been populated. |
java.lang.Object |
put(java.lang.String propertyName,
java.lang.Object value)
Sets the value of the specified property and return the old value. |
java.lang.Object |
putByPropertyID(int propertyID,
java.lang.Object value)
Set the value of the property specified by its property ID and return the old value. |
void |
refresh()
Updates cached properties to reflect recent changes made on the server. |
void |
remove()
Removes the project from the server. |
void |
removeProjectListener(ProjectListener listener)
Removes a listener for Project events. |
void |
removeViewListener(ViewListener listener)
Removes a listener for View events. |
void |
setACL(AclEntry[] acl)
Modify the Access Control List for this project. |
void |
setActiveProcessItemStateEnabled(EnumeratedValue value,
boolean isEnabled)
Enables or disables a given status value as one that can be used for an active process item. |
void |
setContainerLevelACL(AclEntry[] acl,
java.lang.String typeName)
Modifies the Access Control List for items of the specified type for this project. |
void |
setDefaultItemTypes(Type[] types)
Sets the default item types that will be shared upon creation of a variant view. |
void |
setDescription(java.lang.String description)
|
void |
setEnhancedProcessItemsEnabled(boolean isEnabled)
Enables the enhanced process item model for this project. |
void |
setExpandKeywords(boolean bExpand)
|
void |
setForceCheckinReason(boolean bForceComment)
|
void |
setKeywordExpansionFileExtensions(java.lang.String fileExtensions)
|
void |
setName(java.lang.String name)
|
void |
setProcessItemsRequired(boolean isRequired)
Determines whether or not process items are required for this project. |
void |
setProcessItemTypeEnabled(Type type,
boolean isEnabled)
Enables or disables process items of the given type to be used for this project. |
void |
setRequireLockForCheckin(boolean bRequireLock)
|
java.lang.String |
toString()
Returns a string representation of this project. |
void |
update()
Persists this project's properties to its Server. |
| Methods inherited from class com.starbase.starteam.SimpleTypedResource |
getByteArray, getDouble, getEnumDisplayName, getInt, getIntArray, getOLEDate, getPossibleValues, getPropertyNames, getString, getType, getTypeNames |
| Methods inherited from class com.starbase.starteam.TypedResource |
addToIntArray, removeFromIntArray |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.starbase.starteam.ISecurable |
getType |
| Constructor Detail |
public Project(Server server,
java.lang.String name,
java.lang.String description,
int nCompaction,
int nEncryption,
boolean bUseMail,
java.lang.String rootDirectory,
int projectType,
java.lang.String configSource1,
java.lang.String configSource2,
Folder folderTree)
server - the repository in which to create this projectname - the name of the projectdescription - textual description of the projectnCompaction - flags whether or not compaction is used (0=no, 1=yes)nEncryption - not supported pass in 0bUseMail - flags whether or not this project will use StarTeam's
email capabilitiesrootDirectory - path to be used as the default root directoryprojectType - pass in 0 for normal StarTeam projectsconfigSource1 - configSource2 - folderTree - the root folder of the initial folder tree, may not be
null
public Project(Server server,
java.lang.String name,
java.lang.String description,
int nCompaction,
int nEncryption,
boolean bUseMail,
java.lang.String rootDirectory,
int projectType,
java.lang.String sForeignPassword,
java.lang.String configFile,
java.lang.String archivePath)
server - the repository in which to create this projectname - the name of the projectdescription - textual description of the projectnCompaction - flags whether or not compaction is used (0=no, 1=yes)nEncryption - not supported pass in 0bUseMail - flags whether or not this project will use StarTeam's
email capabilitiesrootDirectory - path to be used as the default root directoryprojectType - pass in 1 for PVCS project, and 2 for VSS projectc.sForeignPassword - password to the foreign archive.configFile - the configuration files for the foreign archive.archivePath - the internal path to the foreign archive. To query the
paths, use Server.getForeignArchivePaths().Server.getPropertyEnums(),
PropertyEnums.PROJECT_TYPE_PVCS,
PropertyEnums.PROJECT_TYPE_VISUAL_SOURCESAFE,
Server.getForeignArchivePaths(int, java.lang.String),
Project.update()
public Project(Server server,
java.lang.String name,
java.lang.String rootDirectory)
server - the repository in which to create this projectname - the name of the projectrootDirectory - path to be used as the default root directory| Method Detail |
public void populate()
Project.refresh()public boolean isRefreshRequired()
Project.refresh(),
Server.enableMPX()public void refresh()
Project.isRefreshRequired(),
Project.populate(),
Server.enableMPX()public Project copy()
Project.isEqualTo(com.starbase.starteam.Project)public boolean isEqualTo(Project project)
project - The project to be compared to this one.
Project.copy()
public java.lang.Object get(java.lang.String propertyName)
throws NoSuchPropertyException
get in class SimpleTypedResourcepropertyName - the name of property to be retreived
NoSuchPropertyException - if the named property does not exist
public java.lang.Object put(java.lang.String propertyName,
java.lang.Object value)
throws NoSuchPropertyException,
java.lang.ClassCastException
put in class SimpleTypedResourcepropertyName - the name of the property to setvalue - the new value to set for the specified property
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified property
public java.lang.Object putByPropertyID(int propertyID,
java.lang.Object value)
throws NoSuchPropertyException,
java.lang.ClassCastException
putByPropertyID in class SimpleTypedResourcepropertyID - the ID of the property to setvalue - the new value to set for the specified property
NoSuchPropertyException - if the named property does not exist
java.lang.ClassCastException - if the value is of the wrong type for the specified propertyProperty.getID()public boolean hasPermission(int permissions)
hasPermission in interface ISecurablepermissions - the desired permissions
Permission
public boolean hasPermission(int permissions,
java.lang.String typeName)
hasPermission in interface ISecurableContainerpermissions - the desired permissionstypeName - the name of the type for access to be tested on
Permission,
TypeNamespublic AclEntry[] getContainerLevelACL(java.lang.String typeName)
getContainerLevelACL in interface ISecurableContainertypeName - the name of the type being controlled by the returned ACL
TypeNames
public void setContainerLevelACL(AclEntry[] acl,
java.lang.String typeName)
setContainerLevelACL in interface ISecurableContaineracl - the access control list for this projecttypeName - the name of the type being controlled by the returned ACLTypeNamespublic boolean equals(java.lang.Object another)
Object identifies the same exact
Project.
equals in class SimpleTypedResourceanother - the object to be compared with
public int hashCode()
hashCode in class SimpleTypedResourcepublic void discard()
If the properties of a project are changed, and discard() is called without first calling update(), the changes will be lost.
Project.refresh()public void update()
Server. If this
project wraps around a foreign archive, Folder hierarchy will be created
according to the configuration file and archive path of the foreign archive specified.
public void remove()
public boolean isDeleted()
public java.lang.String toString()
toString in class TypedResourcepublic boolean isNew()
Project.update()public View getDefaultView()
The default view is not cached in the Project object. Each call to getDefaultView() returns an up-to-date view hierarchy consisting of newly allocated View objects.
If MPX is enabled, getDefaultView() is optimized to avoid unnecessary server commands.
public void setDefaultItemTypes(Type[] types)
types - Type[] the set of item types that will be shared upon creation of a variant view.public Type[] getDefaultItemTypes()
public int getID()
getID in class SimpleTypedResourcepublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
public boolean isExpandKeywords()
Project.getKeywordExpansionFileExtensions()public void setExpandKeywords(boolean bExpand)
public boolean isRequireLockForCheckin()
public void setRequireLockForCheckin(boolean bRequireLock)
public boolean isForceCheckinReason()
public void setForceCheckinReason(boolean bForceComment)
public java.lang.String getConfigSource1()
public java.lang.String getConfigSource2()
public OLEDate getCreatedTime()
public int getCreatedBy()
public Server getServer()
public java.lang.String getKeywordExpansionFileExtensions()
public void setKeywordExpansionFileExtensions(java.lang.String fileExtensions)
public int getProjectType()
TypeNames.PROJECT,
PropertyNames.PROJECT_TYPE,
Property.getEnumValues()public void goNative()
If this is a foreign project, goNative() starts a background process on the server to perform the conversion. In any case, goNative() returns immediately.
When the conversion completes successfully, the project type will be changed to PROJECT_TYPE_STARTEAM. Note that you may need to refresh the project properties to see the new property value.
If the conversion fails, the "go native" server log will contain detailed information regarding the cause of the problem.
Project.getProjectType(),
PropertyEnums.PROJECT_TYPE_STARTEAM,
PropertyEnums.PROJECT_TYPE_PVCS,
PropertyEnums.PROJECT_TYPE_VISUAL_SOURCESAFEpublic boolean isMailUsed()
PropertyNames.PROJECT_MAILpublic java.lang.String getName()
PropertyNames.PROJECT_NAMEpublic void setName(java.lang.String name)
public View[] getViews()
The view list is not cached in the Project object. Each call to getViews() returns an up-to-date view list consisting of newly allocated View objects.
If MPX is enabled, getViews() is optimized to avoid unnecessary server commands.
public View[] getAccessibleViews()
The view list is not cached in the Project object. Each call to getViews() returns an up-to-date view list consisting of newly allocated View objects.
If MPX is enabled, getViews() is optimized to avoid unnecessary server commands.
public AclEntry[] getACL()
getACL in interface ISecurableAclEntrypublic void setACL(AclEntry[] acl)
setACL in interface ISecurableacl - the new access control list or null if to be dropped.AclEntrypublic void addProjectListener(ProjectListener listener)
Event handlers will be tiggered if this Project is changed or deleted on the Server.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for Project events.ProjectListener,
ProjectAdapter,
Project.removeProjectListener(com.starbase.starteam.ProjectListener),
Server.enableMPX()public void removeProjectListener(ProjectListener listener)
listener - Previously-registered event handler for Project events.ProjectListener,
Project.addProjectListener(com.starbase.starteam.ProjectListener)public void addViewListener(ViewListener listener)
Event handlers will be tiggered whenever a View is added, changed or deleted in this Project. Note that an application will not receive events for Views that the logged-in user does not have permission to access.
In order to handle events, an application must enable MPX.
listener - Application-specific event handler for View events.ViewListener,
ViewAdapter,
Project.removeViewListener(com.starbase.starteam.ViewListener),
Server.enableMPX()public void removeViewListener(ViewListener listener)
listener - Previously-registered event handler for View events.ViewListener,
Project.addViewListener(com.starbase.starteam.ViewListener)public int getOwner()
getOwner in interface ISecurableObjectSupportedFeatures.hasObjectOwnership()public void acquireOwnership()
acquireOwnership in interface ISecurableObjectSupportedFeatures.hasObjectOwnership()public ISecurableContainer getParentContainer()
getParentContainer in interface ISecurableISecurableContainerpublic void setProcessItemsRequired(boolean isRequired)
isRequired - true if process items are required for this project on
add and checkin operations; false otherwise.PropertyNames.PROJECT_PROCESS_REQUIRED,
Project.setProcessItemTypeEnabled(com.starbase.starteam.Type, boolean),
Project.setActiveProcessItemStateEnabled(com.starbase.starteam.EnumeratedValue, boolean),
ProcessItempublic boolean isProcessItemsRequired()
public void setProcessItemTypeEnabled(Type type,
boolean isEnabled)
Currently, only ChangeRequests, Requirements and Tasks may be used as process items; each of those types may be enabled or disabled individually for each project.
Note that if process items are not required for this project, then these settings are ignored; that is, if process items are optional, you may use any Change Request, Requirement or Task as a process item.
Also note that whether or not a project explicitly enables Tasks as a legal process item type, process tasks (in the correct state) are always allowed.
type - An item type (Change Request, Requirement or Task).isEnabled - true to enable process items of the given type;
false to disable them.Project.isProcessItemTypeEnabled(com.starbase.starteam.Type),
Project.setProcessItemsRequired(boolean),
Project.setActiveProcessItemStateEnabled(com.starbase.starteam.EnumeratedValue, boolean),
PropertyNames.PROJECT_PROCESS_SELECT_CR,
PropertyNames.PROJECT_PROCESS_SELECT_REQUIREMENT,
PropertyNames.PROJECT_PROCESS_SELECT_TASK,
Task.isProcessTask(),
ProcessItempublic boolean isProcessItemTypeEnabled(Type type)
type - An item type.
Project.setProcessItemTypeEnabled(com.starbase.starteam.Type, boolean),
Project.isProcessItemsRequired(),
Project.isActiveProcessItemStateEnabled(com.starbase.starteam.EnumeratedValue)
public void setActiveProcessItemStateEnabled(EnumeratedValue value,
boolean isEnabled)
Note that currently, only a very specific set of status values, for specific properties and item types, are supported, as follows:
Change Requests: Only the CR_STATUS_OPEN and CR_STATUS_IN_PROGRESS values of the CR_STATUS property are supported. If neither of these status values is enabled, but Change Requests in general are legal process items, then it is assumed that any status value is acceptable.
Tasks: Only the REQ_STATUS_APPROVED value of the REQ_STATUS property is supported. If this status value is not enabled, but Requirements in general are legal process items, then it is assumed that any status value is acceptable.
Tasks: Only the TASK_STATUS_READY_TO_START and TASK_STATUS_IN_PROGRESS values of the TASK_STATUS property are supported. If neither of these status values is enabled, but Tasks in general are legal process items, then it is assumed that any status value is acceptable.
Note that if process items are not required for this project, then these settings are ignored; that is, if process items are optional, you may use any Change Request, Requirement or Task in any status as a process item.
Also note that a process task in the In Progress state is itself always a legal process item.
PropertyEnums.CR_STATUS_OPEN,
PropertyEnums.CR_STATUS_IN_PROGRESS,
PropertyEnums.REQ_STATUS_APPROVED,
PropertyEnums.TASK_STATUS_READY_TO_START,
PropertyEnums.TASK_STATUS_IN_PROGRESS,
PropertyNames.PROJECT_PROCESS_SHOW_CR_OPEN,
PropertyNames.PROJECT_PROCESS_SHOW_CR_IN_PROGRESS,
PropertyNames.PROJECT_PROCESS_SHOW_REQUIREMENT_APPROVED,
PropertyNames.PROJECT_PROCESS_SHOW_TASK_READY,
PropertyNames.PROJECT_PROCESS_SHOW_TASK_IN_PROGRESS,
Project.isActiveProcessItemStateEnabled(com.starbase.starteam.EnumeratedValue),
Task.isProcessTask(),
ProcessItempublic boolean isActiveProcessItemStateEnabled(EnumeratedValue value)
value - The status value to be tested.
Project.setActiveProcessItemStateEnabled(com.starbase.starteam.EnumeratedValue, boolean)public boolean isEnhancedProcessItemsEnabled()
public void setEnhancedProcessItemsEnabled(boolean isEnabled)
This method requires StarTeam server version 9.1 or later. On earlier servers, the enhanced model is enabled or disabled at the server level.
isEnabled - true to enable the enhanced model;
false otherwise.SupportedFeatures.hasEnhancedProcessItemsNative(),
ServerConfiguration.setEnhancedProcessItemsEnabledForAllProjects(boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||