com.starteam
Class Project.WebCacheProject

java.lang.Object
  extended by com.starteam.LiveObject.WebCacheLiveObject
      extended by com.starteam.Project.WebCacheProject
All Implemented Interfaces:
ArtifactCacheManager.Securable, ArtifactCacheManager.SecurableContainer
Enclosing class:
Project

public static class Project.WebCacheProject
extends LiveObject.WebCacheLiveObject
implements ArtifactCacheManager.Securable, ArtifactCacheManager.SecurableContainer

Project accessor for cached SDK projects contained objects are obtained from the artifact cache


Method Summary
 void addViewListener(WebCacheViewListener listener)
          Add a listener for WebCacheView events Listeners are supported on the tip cache only, since rolled back caches do not change over time
static Project.WebCacheProject create(ArtifactCacheManager.Context cntxt, java.lang.String name, java.lang.String defaultFolder)
          Creates a Project on the server.
 View.WebCacheView findView(int viewID)
          return an accessible view on this project or NULL Note that the view will be accessible to the user in this session context and that this view may not have been cached by the ArtifactCache If it is however, the cached view is returned in preference to the unacached one
 View.WebCacheView findView(java.lang.String name)
          return an accessible view on this project or NULL Note that the view will be accessible to the user in this session context and that this view may not have been cached by the ArtifactCache If it is however, the cached view is returned in preference to the unacached one
 EnumeratedValue[] getAllowedStates(EnumeratedProperty.WebCacheEnumeratedProperty prprty)
          Return the subset of enumerated values that are visible for the specified Enumerated property in the context of this project.
 View.WebCacheView getDefaultView()
          Gets the default View for this Project.
 java.lang.String getDescription()
          Returns the description of this project.
 boolean getExpandKeywords()
          Returns true if keywords are expanded when files are checked out.
 Filter.WebCacheFilter[] getFilters(Type.WebCacheType wct)
          returns the set of filters associated with this project
 Group.WebCacheGroup[] getGroups(PermissionCollection permissions)
          Return the set of Groups that have access rights to this project as defined by the specified permissions
 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.
 int getPresentationID()
          Returns the unique integer identifier for this resource.
 Query.WebCacheQuery[] getQueries(Type.WebCacheType wct)
          returns the set of queries associated with this project
 ACE.WebCacheACE[] getRights()
          Return the access rights assigned to this project
 ACE.WebCacheACE[] getRights(Type.WebCacheType typ)
          Query this project for the access rights assigned to the specified type
 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.
 Trace.WebCacheTrace[] getTraces()
          Returns the set of Traces mapping this Project to other artifacts for InfoStreams (or other purposes)
 EnumeratedValue[] getUDAGroupings(Requirement.RequirementType typ)
          Return the subset of Requirement UDA Grouping values that match the specified Requirement Type for this project.
 View.WebCacheView[] getViews()
          Returns the subset of views (from the specific project) that are accessible by this User The returned view context is that of the managed server connection of the tip cache However, the returned views may or may not be cached in the tip cache.
 Property.WebCacheProperty[] getVisibleProperties(EnumeratedValue value)
          Return the subset of properties that are visible in the context of the specified Enumerated Value
 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 isCached(int viewID)
          Returns true if the view has been cached in the ArtifactCache and is visible in this user context.
 boolean isDeleted()
          Determines whether or not this project has been deleted from the server.
 void setAllowedState(EnumeratedValue value, boolean isAllowed)
          Set an enumerated value of a given property as an allowed or legal state for this project.
 void setDescription(java.lang.String description)
          Set the description for this project
 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 setRights(ACE.WebCacheACE[] aces)
          Assign the specified access rights to this project
 void setRights(Type.WebCacheType typ, ACE.WebCacheACE[] aces)
          Assign the specified access rights to this project contained type
 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.
 void setVisibleProperties(EnumeratedValue value, Property.WebCacheProperty[] properties)
          Define a subset of properties of a given type that are marked visible
 
Methods inherited from class com.starteam.LiveObject.WebCacheLiveObject
addTo, equals, getContext, getCreatedBy, getCreatedTime, getDisplayName, getID, getObjectID, getServer, getType, getValue, getValue, hashCode, hasValue, isDirty, isNew, refresh, remove, removeFrom, setValue, setValue, toStarTeamURL, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static Project.WebCacheProject create(ArtifactCacheManager.Context cntxt,
                                             java.lang.String name,
                                             java.lang.String defaultFolder)
Creates a Project on the server. This project must be saved by assigning the various properties and then calling update() on the WebCacheProject object Project creation is not transactable

Parameters:
cntxt - the ArtifactCacheManager User Session Context
name - the name of the Project.
defaultFolder - the default folder on disk that the Project maps to
Returns:
the newly created Project.WebCacheProject, wrapping a new Project

getExpandKeywords

public boolean getExpandKeywords()
Returns true if keywords are expanded when files are checked out. Only files matching a keyword file extension will be expanded.

Returns:
true if keywords are expanded when files are checked out.
See Also:
Project.getKeywordExpansionFileExtensions()

setRights

public void setRights(ACE.WebCacheACE[] aces)
Assign the specified access rights to this project

Parameters:
aces - the rights

getRights

public ACE.WebCacheACE[] getRights()
Return the access rights assigned to this project

Returns:
the access rights assigned to this project

setRights

public void setRights(Type.WebCacheType typ,
                      ACE.WebCacheACE[] aces)
Assign the specified access rights to this project contained type

Parameters:
typ - the type to assign rights for
aces - the rights

getRights

public ACE.WebCacheACE[] getRights(Type.WebCacheType typ)
Query this project for the access rights assigned to the specified type

Parameters:
typ - the contained type
Returns:
the access rights assigned to the type in this container

getDefaultView

public View.WebCacheView getDefaultView()
Gets the default View for this Project. If this view has been cached in the artifact cache, the cached view is returned in preference to the uncached one

Returns:
The default WebCacheView for this WebCacheProject.

getViews

public View.WebCacheView[] getViews()
Returns the subset of views (from the specific project) that are accessible by this User The returned view context is that of the managed server connection of the tip cache However, the returned views may or may not be cached in the tip cache. If they are, the cached views are returned in preference to the uncached ones

Returns:
the set of views accessible by this User

getName

public java.lang.String getName()
Returns the name of this project.

Returns:
the name of this project.
See Also:
LiveObject.Type.NameProperty.NAME

getPresentationID

public int getPresentationID()
Returns the unique integer identifier for this resource. on pre 14.0 servers, it returns the projectID

Returns:
the unique integer identifier for this resource.

setName

public void setName(java.lang.String name)
set the name of the project

Parameters:
name - set the name of the project

getDescription

public java.lang.String getDescription()
Returns the description of this project.

Returns:
the description of this project.

isDeleted

public boolean isDeleted()
Determines whether or not this project has been deleted from the server.

Returns:
True if the project has been deleted from the server; false otherwise.

setDescription

public void setDescription(java.lang.String description)
Set the description for this project

Parameters:
description - for this project

getStatus

public Project.Status getStatus()
Returns the status (Active, Parked, etc.) of this Project. This property is new to 12.0+ servers

Returns:
The status (Active, Parked, etc.) of this Project.
See Also:
Project.Status, Project.Type.StatusProperty, Project.Type.PropertyCollection.STATUS

getTraces

public Trace.WebCacheTrace[] getTraces()
Returns the set of Traces mapping this Project to other artifacts for InfoStreams (or other purposes)

Returns:
the set of Traces mapped directly from this project, saved as URLs.

setStatus

public void setStatus(Project.Status status)
Sets the status of this project. This property is new to 12.0+ servers

Parameters:
status - The new status value for this project.

getMethodology

public Project.Methodology getMethodology()
Returns the development methodology used for this Project (Supported methodologies include Agile, Kanban, Waterfall, Migration). This property is new to 12.5+ servers

Returns:
The project methodology (Agile, Kanban, Waterfall, Migration).
See Also:
Project.Methodology, Project.Type.MethodologyProperty, Project.Type.PropertyCollection.METHODOLOGY

setMethodology

public void setMethodology(Project.Methodology methodology)
Sets the development methodology for this project. (Supported methodologies include Agile, Kanban, Waterfall, Migration). This property is new to 12.5+ servers

Parameters:
methodology - The new methodology for this project.

getAllowedStates

public EnumeratedValue[] getAllowedStates(EnumeratedProperty.WebCacheEnumeratedProperty prprty)
Return the subset of enumerated values that are visible for the specified Enumerated property in the context of this project. Note that Enumerated Properties are (and continue to be) type specific. However, an application can choose to store a subset of the values as applicable (legal) to a given type. This subset may be disjoint or may overlap. The application decides Other than storing the relationships between a project, an enumerated property and its values the SDK makes no attempt to (and in reality cannot) validate the usage of Enumerated Values for item types in the context of a given project

Parameters:
prprty - the property whose allowed states are of interest
Returns:
the set of allowed enumerated values (if specified)
See Also:
EnumeratedProperty.WebCacheEnumeratedProperty.getAllValues()

setAllowedState

public void setAllowedState(EnumeratedValue value,
                            boolean isAllowed)
Set an enumerated value of a given property as an allowed or legal state for this project. Note that Enumerated Properties are (and continue to be) type specific. However, an application can choose to store a subset of the values as applicable (legal) to a given type. Other than storing the relationships between a project, an enumerated property and its values the SDK makes no attempt to (and in reality cannot) validate the usage of Enumerated Values for item types in the context of a given project Note that this api is not supported for pre 12.5 servers

Parameters:
value - the selected value
isAllowed - true to turn this state on, false to turn it off

getStatus

public Task.Status[] getStatus(Story.Status sts)
Return the subset of Task Status values that match the specified Story Status for this project. Story Status of NOT_STARTED and COMPLETED may return at most one corresponding Task Status. Story Status of STARTED may return a subset of Task Status The returned subsets across all three Story States are disjoint. This feature was introduced in the 13.0 server

Parameters:
sts - the story status to test
Returns:
a mapping set of Task States or an empty array

hasSavedStatus

public 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

Parameters:
sts - the status to test for in this project context
Returns:
true if an explicit Story Status mapped to a Task Status (or set) has been saved for this project
See Also:
Project.WebCacheProject.getStatus(com.starteam.Story.Status)

setStatus

public void setStatus(Story.Status rfrnc,
                      Task.Status[] mppdSts)
Map a subset of Task Status values to specific Story States for the given project. Story Status of NOT_STARTED and COMPLETED must map to one and only one equivalent Task Status Story Status of STARTED may map to a subset of Task States, provided that all mappings are unique and disjoint. The calling application is responsible for ensuring that each Story Status is mapped to one or more Task States as the case demands. This feature was introduced in the 13.0 server

Parameters:
rfrnc - the reference Story Status to be mapped
mppdSts - the Task States to map it to.

getUDAGroupings

public EnumeratedValue[] getUDAGroupings(Requirement.RequirementType typ)
Return the subset of Requirement UDA Grouping values that match the specified Requirement Type for this project. This feature was introduced in the 14.0 server

Parameters:
typ - the requirement type to test
Returns:
a mapping set of UDA Groupings or an empty array

setUDAGroupings

public void setUDAGroupings(Requirement.RequirementType typ,
                            EnumeratedValue[] udas)
Map a subset of UDA Grouping values to specific Requirement Types for the given project.

Parameters:
typ - the requirement type to be mapped
udas - the set of UDA Groupings

getVisibleProperties

public Property.WebCacheProperty[] getVisibleProperties(EnumeratedValue value)
Return the subset of properties that are visible in the context of the specified Enumerated Value

Parameters:
value - an Enumerated Value for a specific Enumerated Property of a chosen type
Returns:
the subset of properties of the same Type that are marked visible in the context of this enum

setVisibleProperties

public void setVisibleProperties(EnumeratedValue value,
                                 Property.WebCacheProperty[] properties)
Define a subset of properties of a given type that are marked visible

Parameters:
value - an Enumerated Value for a specific Enumerated Property of a chosen type
properties - the set of properties marked visible in the context of the specified enum

findView

public View.WebCacheView findView(int viewID)
return an accessible view on this project or NULL Note that the view will be accessible to the user in this session context and that this view may not have been cached by the ArtifactCache If it is however, the cached view is returned in preference to the unacached one

Parameters:
viewID - the id of the view
Returns:
an accessible view or NULL

findView

public View.WebCacheView findView(java.lang.String name)
return an accessible view on this project or NULL Note that the view will be accessible to the user in this session context and that this view may not have been cached by the ArtifactCache If it is however, the cached view is returned in preference to the unacached one

Parameters:
name - the name of the view
Returns:
an accessible view or NULL

isCached

public boolean isCached(int viewID)
Returns true if the view has been cached in the ArtifactCache and is visible in this user context. Note that views cached in the ArtifactCache need not be visible in the context of a user without the appropriate access rights. In other words, it is possible for this api to return true in the administrator context, but false in an unauthorized user context

Parameters:
viewID - the view to check for
Returns:
true if the view is cached in the Artifact Cache

getGroups

public Group.WebCacheGroup[] getGroups(PermissionCollection permissions)
Return the set of Groups that have access rights to this project as defined by the specified permissions

Parameters:
permissions - the permissions needing to be satisfied
Returns:
the set of Groups that can access this project

addViewListener

public void addViewListener(WebCacheViewListener listener)
Add a listener for WebCacheView events Listeners are supported on the tip cache only, since rolled back caches do not change over time

Parameters:
listener - a listener for WebCacheView events

getFilters

public Filter.WebCacheFilter[] getFilters(Type.WebCacheType wct)
returns the set of filters associated with this project

Parameters:
wct - the type whose filters are desired
Returns:
the set of filters associated with this project

getQueries

public Query.WebCacheQuery[] getQueries(Type.WebCacheType wct)
returns the set of queries associated with this project

Parameters:
wct - the type whose queries are desired
Returns:
the set of queries associated with this project


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.