|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.TypedResource
com.starteam.LiveObject
com.starteam.Project
public final class Project
Represents a StarTeam project which is essentially just a collection of
Views.
| Nested Class Summary | |
|---|---|
static class |
Project.Methodology
Defines the development methodology property of the Project. |
static class |
Project.Status
Defines the status of a Project This property is new to 12.0+ servers |
static class |
Project.Type
The Type of the Project |
static class |
Project.WebCacheProject
Project accessor for cached SDK projects contained objects are obtained from the artifact cache |
| Nested classes/interfaces inherited from class com.starteam.LiveObject |
|---|
LiveObject.WebCacheLiveObject |
| Nested classes/interfaces inherited from class com.starteam.TypedResource |
|---|
TypedResource.BranchState |
| Constructor Summary | |
|---|---|
Project(Server server,
java.lang.String name,
java.lang.String rootDirectory,
Folder folderTree)
Constructs a new project. |
|
| Method Summary | |
|---|---|
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. |
void |
discardViews()
Discards the list of cached views. |
boolean |
equals(java.lang.Object another)
Returns true if the specified Object identifies the same
exact Project. |
View |
findView(int viewID)
Finds a view in the project's view collection. |
View |
findView(java.lang.String name)
Finds a view in the project's view collection. |
View[] |
getAccessibleViews()
Gets the set of Views accessible from this Project. |
EnumeratedValue[] |
getActiveProcessItemStates(Item.Type typ)
Returns the set of legal active states for the specified (stock or custom) type |
EnumeratedValue[] |
getAllowedStates(EnumeratedProperty prprty)
Return the subset of enumerated values that are visible for the specified Enumerated property in the context of this project. |
java.lang.String |
getAlternateEditorPath(Item.Type typ)
returns the alternate editor path for the specified item type |
java.lang.Boolean |
getCreateCheckinChangePackage()
Returns true if checkin change packages should be created by the SDK in the absence of a process item Returns NULL if this project does not override the server configuration option This property was first introduced in the 12.0 release |
User |
getCreatedBy()
Returns the User object that created the project. |
DateTime |
getCreatedTime()
Returns the time at which the project was created. |
TypeCollection |
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. |
Server.EncryptionAlgorithm |
getEncryptionAlgorithm()
Returns the encryption algorithm |
boolean |
getExpandKeywords()
Returns true if keywords are expanded when files are checked out. |
Filter[] |
getFilters(Type typ)
returns the set of filters associated with this project |
java.lang.String |
getGUID()
Returns GUID |
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. |
boolean |
getMarkUnlockedWorkingFilesReadOnly()
Determines if unlocked working files should be marked read only |
Project.Methodology |
getMethodology()
Returns the development methodology used for this project (Supported methodologies include Agile, Kanban, Waterfall, Migration). |
java.lang.String |
getName()
Returns the name of this project. |
ISecurableContainer |
getParentContainer()
A Project has no parent container. |
int |
getPresentationID()
Returns the unique integer identifier for this project. |
Item.Type[] |
getProcessItemTypes()
Returns the set of (stock or custom) Item Types that may be used as process items For 11.0 servers only the three stock types ChangeRequest, Requirement and Task are supported, in the context of their stock status properties. |
Project.Type.PropertyCollection |
getProperties()
Returns the PropertyCollection for the Project type |
Query[] |
getQueries(Type typ)
returns the set of queries associated with this project |
ACE[] |
getRights()
Returns the Access Control List for this project. |
ACE[] |
getRights(Type type)
Returns the Access Control List for items of the specified type for this project. |
Server |
getServer()
Returns the server to which this project belongs. |
Project.Status |
getStatus()
Returns the status (Active, Parked, etc.) of this Project. |
Task.Status[] |
getStatus(Story.Status sts)
Return the subset of Task Status values that match the specified Story Status for this project. |
EnumeratedValue[] |
getUDAGroupings(Requirement.RequirementType typ)
Return the subset of Requirement UDA Grouping values that match the specified Requirement Type for this project. |
java.lang.Object |
getValue(Property property)
Return the value for the specified property. |
View[] |
getViews()
Ensures that this project's view list has been retrieved and cached locally. |
PropertyCollection |
getVisibleProperties(EnumeratedValue value)
Return the subset of properties that are visible in the context of the specified Enumerated Value |
int |
hashCode()
Returns a hash code for this project. |
boolean |
hasPermissions(PermissionCollection permissions)
Returns true if desired permissions are granted for this project |
boolean |
hasPermissions(PermissionCollection permissions,
Type type)
Returns true if desired permissions are granted for items of the specified type for this project |
boolean |
hasSavedStatus(Story.Status sts)
Returns true if an explicit Story Status mapped to a Task Status (or set) has been saved for this project Note that if a status mapping is not saved to the server, the getStatus() api returns a default mapping |
boolean |
isActiveProcessItemStateEnabled(EnumeratedValue value)
Determines whether or not a given status value of a given type, is one that can be used for an active process item of that type. |
boolean |
isDeleted()
Determines whether or not this project has been deleted from the server. |
boolean |
isEqualTo(Project project)
Compares the properties of two Projects. |
boolean |
isForceCheckinReasonRequired()
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 |
isProcessItemRequired()
Determines whether or not process items are required for this project. |
boolean |
isProcessItemTypeEnabled(Item.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 |
isRefreshViewsRequired()
Determines whether or not the project's view list needs to be refreshed. |
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. |
void |
refresh()
Updates cached properties to reflect recent changes made on the server. |
void |
refreshViews()
Ensures that the latest list of views for this project has been retrieved from the server and cached locally. |
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 |
setActiveProcessItemStateEnabled(EnumeratedValue activeState,
boolean enabled)
Defines the specified state as a legal 'Active' state for this project for it's type The set of legal active states is a subset of the set of all open states for the given enumerated property that represents the process item property For 11.0 servers, the types and the status properties are fixed. |
void |
setAllowedState(EnumeratedValue value,
boolean isAllowed)
Set an enumerated value of a given property as an allowed or legal state for this project. |
void |
setAlternateEditorPath(Item.Type typ,
java.lang.String alternatePath)
Sets the Alternate Editor Path for the Specified Item Type Specify either NULL or an empty string to turn it off |
void |
setCreateCheckinChangePackage(java.lang.Boolean createCP)
Set to TRUE to always create checkin change packages (even in the absence of a process item) Set to FALSE to never create checkin change packages in the absence of a process item Set to NULL to fall back to the server wide definition (server configuration option). |
void |
setDefaultItemTypes(TypeCollection types)
Sets the default item types that will be shared upon creation of a variant view. |
void |
setDescription(java.lang.String description)
Set the description for this project |
void |
setEncryptionAlgorithm(Server.EncryptionAlgorithm encryption)
Sets the the encryption algorithm for the project |
void |
setExpandKeywords(boolean bExpand)
set to true if keywords should be expanded on checkout |
void |
setForceCheckinReasonRequired(boolean bForceComment)
Set to true if a reason is required for checkin |
void |
setGUID(java.lang.String guid)
Set GUID for the project |
void |
setKeywordExpansionFileExtensions(java.lang.String fileExtensions)
set the file extensions for keyword expansion |
void |
setMarkUnlockedWorkingFilesReadOnly(boolean flag)
Mark the unlocked working files as read only |
void |
setMethodology(Project.Methodology methodology)
Sets the development methodology for this project. |
void |
setName(java.lang.String name)
set the name of the project |
void |
setProcessItemRequired(boolean flag)
Determines whether or not process items are required for this project. |
void |
setRequireLockForCheckin(boolean bRequireLock)
require set to true if locks should be acquired for checkin |
void |
setRights(ACE[] acl)
Modify the Access Control List for this project. |
void |
setRights(Type type,
ACE[] acl)
Modifies the Access Control List for items of the specified type for this project. |
void |
setStatus(Project.Status status)
Sets the status of this project. |
void |
setStatus(Story.Status rfrnc,
Task.Status[] mppdSts)
Map a subset of Task Status values to specific Story States for the given project. |
void |
setUDAGroupings(Requirement.RequirementType typ,
EnumeratedValue[] udas)
Map a subset of UDA Grouping values to specific Requirement Types for the given project. |
java.lang.Object |
setValue(Property property,
java.lang.Object value)
Sets the value of the specified property and return the old value. |
void |
setVisibleProperties(EnumeratedValue value,
PropertyCollection properties)
Define a subset of properties of a given type that are marked visible |
java.lang.String |
toString()
Returns the name of this project. |
void |
update()
Persists this project's properties to its Server. |
| Methods inherited from class com.starteam.LiveObject |
|---|
toStarTeamURL |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.starteam.ISecurable |
|---|
getType |
| Constructor Detail |
|---|
public Project(Server server,
java.lang.String name,
java.lang.String rootDirectory,
Folder folderTree)
server - the repository in which to create this projectname - the name of the projectrootDirectory - path to be used as the default root directory may be NULL or
"", in which case the file system root directory is assumedfolderTree - the root folder of the initial folder tree, may be
null| Method Detail |
|---|
public Project.Type.PropertyCollection getProperties()
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.starteam.Project)public boolean isEqualTo(Project project)
project - The project to be compared to this one.
Project.copy()
public java.lang.Object getValue(Property property)
throws NoSuchPropertyException
getValue in class TypedResourceproperty - the name of property to be retreived
NoSuchPropertyException - if the named property does not exist
public java.lang.Object setValue(Property property,
java.lang.Object value)
throws NoSuchPropertyException,
java.lang.ClassCastException
setValue in class TypedResourceproperty - 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 propertypublic boolean hasPermissions(PermissionCollection permissions)
hasPermissions in interface ISecurablepermissions - the desired permissions
Permission
public boolean hasPermissions(PermissionCollection permissions,
Type type)
hasPermissions in interface ISecurableContainerpermissions - the desired permissionstype - the type for access to be tested on
Permission,
Typepublic ACE[] getRights(Type type)
getRights in interface ISecurableContainertype - the type being controlled by the returned ACL
Type
public void setRights(Type type,
ACE[] acl)
setRights in interface ISecurableContainertype - the type being controlled by the returned ACLacl - the access control list for this projectTypepublic boolean equals(java.lang.Object another)
Object identifies the same
exact Project.
equals in class java.lang.Objectanother - the object to be compared with
public int hashCode()
hashCode in class java.lang.Objectpublic 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()
isDeleted in interface ISecurableisDeleted in interface ISecurableContainerpublic java.lang.String toString()
toString in class TypedResourcepublic View getDefaultView()
The default view is retrieved from the StarTeam Server only if it is not locally cached.
If MPX is enabled, getDefaultView() is optimized to avoid unnecessary server commands.
public void setDefaultItemTypes(TypeCollection types)
types - TypeCollection the set of item types that will be shared upon
creation of a variant view.public TypeCollection getDefaultItemTypes()
public int getID()
getID in interface ISecurablegetID in interface ISecurableContainergetID in class TypedResourcepublic int getPresentationID()
public java.lang.String getDescription()
public Project.Status getStatus()
Project.Status,
Project.Type.StatusProperty,
Project.Type.PropertyCollection.STATUSpublic void setDescription(java.lang.String description)
description - for this projectpublic void setStatus(Project.Status status)
status - The new status value for this project.public boolean getExpandKeywords()
Project.getKeywordExpansionFileExtensions()public void setExpandKeywords(boolean bExpand)
bExpand - set to true if keywords should be expanded on checkoutpublic boolean isRequireLockForCheckin()
public void setRequireLockForCheckin(boolean bRequireLock)
bRequireLock - set to true if locks should be acquired for checkinpublic boolean isForceCheckinReasonRequired()
public void setForceCheckinReasonRequired(boolean bForceComment)
bForceComment - Set to true if a reason is required for checkinpublic java.lang.Boolean getCreateCheckinChangePackage()
public void setCreateCheckinChangePackage(java.lang.Boolean createCP)
createCP - set to Treu to create Checkin Change Packagespublic Project.Methodology getMethodology()
Project.Methodology,
Project.Type.MethodologyProperty,
Project.Type.PropertyCollection.METHODOLOGYpublic void setMethodology(Project.Methodology methodology)
methodology - The new development methodology value for this project.public DateTime getCreatedTime()
getCreatedTime in class LiveObjectpublic Filter[] getFilters(Type typ)
typ - the type whose filters are desired
public Query[] getQueries(Type typ)
typ - the type whose queries are desired
public User getCreatedBy()
User object that created the project.
getCreatedBy in class LiveObjectUser object that created the project.public Server getServer()
getServer in interface ISecurablegetServer in interface ISecurableContainergetServer in class TypedResourcepublic java.lang.String getKeywordExpansionFileExtensions()
public void setKeywordExpansionFileExtensions(java.lang.String fileExtensions)
fileExtensions - the file extensions for keyword expansionpublic boolean isMailUsed()
Project.Type.MailProperty.NAMEpublic java.lang.String getName()
LiveObject.Type.NameProperty.NAMEpublic void setName(java.lang.String name)
name - set the name of the projectpublic Server.EncryptionAlgorithm getEncryptionAlgorithm()
Project.Type.EncryptionAlgorithmProperty.NAMEpublic void setEncryptionAlgorithm(Server.EncryptionAlgorithm encryption)
encryption - - the encryption algorithmProject.Type.EncryptionAlgorithmProperty.NAMEpublic java.lang.String getGUID()
Project.Type.GUIDProperty.NAMEpublic void setGUID(java.lang.String guid)
guid - Project.Type.GUIDProperty.NAMEpublic View[] getViews()
Project.refreshViews()public boolean isRefreshViewsRequired()
Project.refreshViews(),
Server.enableMPX()public View[] getAccessibleViews()
The view list is retrieved from the StarTeam repository only if it has not already been retrieved. Therefore, the views may or may not be up-to-date with respect to the latest information in the repository. To ensure that the views are up-to-date, use refreshViews().
If MPX is enabled, getViews() is optimized to avoid unnecessary server commands.
public void refreshViews()
Project.getViews(),
Project.isRefreshViewsRequired(),
Project.discardViews(),
Server.enableMPX()public void discardViews()
Project.getViews(),
Project.refreshViews(),
Server.enableMPX()public View findView(int viewID)
viewID - The view ID of the desired view.
public View findView(java.lang.String name)
name - The name of the desired view.
public ACE[] getRights()
getRights in interface ISecurableAccessRightsManager.getRights(ISecurable)public void setRights(ACE[] acl)
setRights in interface ISecurableacl - the new access control list or null if to be dropped.ACEpublic void addProjectListener(ProjectListener listener)
Event handlers will be triggered 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,
Project.removeProjectListener(com.starteam.events.ProjectListener),
Server.enableMPX()public void removeProjectListener(ProjectListener listener)
listener - Previously-registered event handler for Project events.ProjectListener,
Project.addProjectListener(com.starteam.events.ProjectListener)public void addViewListener(ViewListener listener)
Event handlers will be triggered 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,
Project.removeViewListener(com.starteam.events.ViewListener),
Server.enableMPX()public void removeViewListener(ViewListener listener)
listener - Previously-registered event handler for View events.ViewListener,
Project.addViewListener(com.starteam.events.ViewListener)public ISecurableContainer getParentContainer()
getParentContainer in interface ISecurablegetParentContainer in interface ISecurableContainerISecurableContainerpublic boolean isProcessItemRequired()
Project.Type.IsProcessItemRequiredProperty.NAME,
ProcessItempublic void setProcessItemRequired(boolean flag)
flag - true if process items are required for this project on add and
checkin operations; false otherwise.Project.Type.IsProcessItemRequiredProperty.NAME,
Project.setActiveProcessItemStateEnabled(com.starteam.EnumeratedValue, boolean),
ProcessItempublic EnumeratedValue[] getAllowedStates(EnumeratedProperty prprty)
prprty - the property whose allowed states are of interest
EnumeratedProperty.getAllValues()
public void setAllowedState(EnumeratedValue value,
boolean isAllowed)
value - the selected valueisAllowed - true to turn this state on, false to turn it offpublic boolean hasSavedStatus(Story.Status sts)
sts - the status to test for in this project context
Project.getStatus(com.starteam.Story.Status)public Task.Status[] getStatus(Story.Status sts)
sts - the story status to test
public void setStatus(Story.Status rfrnc,
Task.Status[] mppdSts)
rfrnc - the reference Story Status to be mappedmppdSts - the Task States to map it to.public EnumeratedValue[] getUDAGroupings(Requirement.RequirementType typ)
typ - the requirement type to test
public void setUDAGroupings(Requirement.RequirementType typ,
EnumeratedValue[] udas)
typ - the requirement type to be mappedudas - the set of UDA Groupingspublic PropertyCollection getVisibleProperties(EnumeratedValue value)
value - an Enumerated Value for a specific Enumerated Property of a chosen type
public void setVisibleProperties(EnumeratedValue value,
PropertyCollection properties)
value - an Enumerated Value for a specific Enumerated Property of a chosen typeproperties - the set of properties marked visible in the context of the specified enumpublic java.lang.String getAlternateEditorPath(Item.Type typ)
typ - the specified (stock or custom) item type
public void setAlternateEditorPath(Item.Type typ,
java.lang.String alternatePath)
typ - the specified (stock or custom) item typealternatePath - the alternate editor path for the specified item typepublic Item.Type[] getProcessItemTypes()
public EnumeratedValue[] getActiveProcessItemStates(Item.Type typ)
typ - the type whose legal active states are desired
public void setActiveProcessItemStateEnabled(EnumeratedValue activeState,
boolean enabled)
activeState - a supported active state for the enumerated propertyenabled - true to enable the statepublic boolean isProcessItemTypeEnabled(Item.Type type)
type - An item type.
Project.isProcessItemRequired(),
Project.isActiveProcessItemStateEnabled(com.starteam.EnumeratedValue)public boolean isActiveProcessItemStateEnabled(EnumeratedValue value)
value - The status value to be tested.
public boolean getMarkUnlockedWorkingFilesReadOnly()
public void setMarkUnlockedWorkingFilesReadOnly(boolean flag)
flag - true if unlocked working files should be marked as read only
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||