com.starteam
Class View.WebCacheView

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

public static class View.WebCacheView
extends LiveObject.WebCacheLiveObject
implements ArtifactCacheManager.Securable, ArtifactCacheManager.SecurableContainer

View accessor for cached SDK views contained objects are obtained from the artifact cache


Method Summary
 void addLabelListener(WebCacheLabelListener listener)
          Add a listener for WebCacheLabel events Listeners are supported on the tip cache only, since rolled back caches do not change over time
 void addViewMemberListener(WebCacheViewMemberListener listener, ViewMember.Type.WebCacheViewMemberType typ)
          Add a listener for WebCacheViewMember events Listeners are supported on the tip cache only, since rolled back caches do not change over time
static View.WebCacheView create(ArtifactCacheManager.Context cntxt, View.WebCacheView parent, java.lang.String viewName, java.lang.String viewDescription, Folder.WebCacheFolder root, ViewConfiguration baseConfig)
          Creates a View on the server.
 CheckinManager.WebCacheCheckinManager createCheckinManager()
          Create and return a CheckinManager
 CheckoutManager.WebCacheCheckoutManager createCheckoutManager()
          Constructs a CheckoutManager
 Label.WebCacheLabel findLabel(int labelID)
          Returns a label in this view or NULL
 ViewMember.WebCacheViewMember findViewMember(ViewMember.Type.WebCacheViewMemberType typ, int vmid)
          returns a view member identified by it's ID, if visible to the specified user.
 Label.WebCacheLabel[] getActiveLabels()
          Returns all the active (non-deleted) labels for this view.
 ViewMember.Type.WebCacheViewMemberType[] getCachedTypes()
          Returns the set of types cached in the ArtifactCache in the context of a given view The returned Type context is that of the managed server connection
 ViewConfiguration getConfiguration()
          Returns this view's configuration.
 java.lang.String getDefaultPath()
          Returns the default working file path to be used for this view.
 View.WebCacheView[] getDerivedViews()
          Returns the set of views derived from this one.
 java.lang.String getDescription()
          Returns the description of this view.
 DateTime getEndDate()
          Return the end date of this view.
 java.lang.String getFullName()
          Returns the full hierarchical name of this view--that is, the concatenation of the root view and each descendant to this view.
 Label.WebCacheLabel[] getLabels()
          Returns the labels that exist in this view, including both active and deleted labels.
 DateTime getLastUsedAt()
          Returns the time at which this view was last used
 java.lang.String getName()
          Returns the name of this view.
 View.WebCacheView getParentView()
          Returns the parent of this view.
 int getPresentationID()
          Returns the unique integer identifier for this resource.
 Project.WebCacheProject getProject()
          Returns the project to which this view belongs.
 ACE.WebCacheACE[] getRights()
          Return the access rights assigned to this view
 ACE.WebCacheACE[] getRights(Type.WebCacheType typ)
          Query this view for the access rights assigned to the specified type
 Folder.WebCacheFolder getRootFolder()
          Gets the root folder of this view.
 DateTime getStartDate()
          Return the start date of this view.
 ViewMember.WebCacheViewMember[] getViewMembers(ViewMember.Type.WebCacheViewMemberType typ, Filter.WebCacheFilter fltr)
          Returns a set of ViewMembers visible to the specified user, from the entire set of available view members for the type The returned ViewMembers are pure 'data objects' without a Server Connection i.e.
 View.ViewType getViewType()
          Gets the type (Unknown, Main, Sandbox, Release) of this View.
 Workflow.WebCacheWorkflow getWorkflow(ViewMember.Type.WebCacheViewMemberType typ)
          Returns the type specific workflow definition for this view, if any If a workflow has not been defined for the view, but a project wide workflow has been defined for the type, the project workflow is returned If a project wide workflow has not been defined then the server wide workflow for the type is returned.
 boolean isBranch()
          Return true if this view is a Branch view.
 boolean isBranchAll()
          Return true if this view's original branching default was set "All".
 boolean isBranchNone()
          Return true if this view's original branching default was set "None".
 boolean isBranchOnShare()
          Returns true if this view is set to branch shared items.
 boolean isDeleted()
          Determines whether or not this view has been deleted from the server.
 boolean isNonDerived()
          Return true if this view is a Non-Derived view.
 boolean isReadOnly()
          Return true if this is a ReadOnly view, otherwise false.
 boolean isReference()
          Return true if this is a reference view, otherwise false.
 boolean isRoot()
          Return true if this view is a Root view.
 void setDefaultPath(java.lang.String path)
          Sets the default working file path to be used for this view.
 void setDescription(java.lang.String description)
          Sets the description for this view.
 void setEndDate(DateTime endDate)
          Sets the end date of this view.
 void setName(java.lang.String name)
          Set the name of this view.
 void setRights(ACE.WebCacheACE[] aces)
          Assign the specified access rights to this view
 void setRights(Type.WebCacheType typ, ACE.WebCacheACE[] aces)
          Assign the specified access rights to this view contained type
 void setStartDate(DateTime startDate)
          Sets the start date of this view.
 void setViewType(View.ViewType type)
          Sets the type of this View.
 void shareItems(Item.Type.WebCacheItemType typ)
          Share items of the specified type on view creation.
 void update()
          Save this LiveObject to the Repository If the underlying SDK object is new, create it Otherwise, if it has changed, update it This is an atomic operation, not executed in a transaction
 
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
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static View.WebCacheView create(ArtifactCacheManager.Context cntxt,
                                       View.WebCacheView parent,
                                       java.lang.String viewName,
                                       java.lang.String viewDescription,
                                       Folder.WebCacheFolder root,
                                       ViewConfiguration baseConfig)
Creates a View on the server. This view must be saved by assigning additional properties and then calling update() on the WebCacheView object The newly created view starts out with no item types shared Note however that the server automatically shares folders by default

Parameters:
cntxt - the ArtifactCacheManager User Session Context
parent - the parent view of this view.
viewName - the name of the new view
viewDescription - the description of the new view
root - the root folder of the new view
baseConfig - the base configuration for the new view
Returns:
the newly created View.WebCacheView, wrapping a new View
See Also:
to share items of a specific type on view creation View creation is not transactable

getWorkflow

public Workflow.WebCacheWorkflow getWorkflow(ViewMember.Type.WebCacheViewMemberType typ)
Returns the type specific workflow definition for this view, if any If a workflow has not been defined for the view, but a project wide workflow has been defined for the type, the project workflow is returned If a project wide workflow has not been defined then the server wide workflow for the type is returned.

Parameters:
typ - the type for which a specific workflow may have been defined
Returns:
the type specific workflow definition for this view or NULL

getLastUsedAt

public DateTime getLastUsedAt()
Returns the time at which this view was last used

Returns:
the time at which this view was last used or DateTime.VALUE_NOT_SET if this view has not been used

shareItems

public void shareItems(Item.Type.WebCacheItemType typ)
Share items of the specified type on view creation. Instances of a particular type may only be shared on view creation This api does nothing for existing views.

Parameters:
typ - the type whose items will be shared into the view

createCheckoutManager

public CheckoutManager.WebCacheCheckoutManager createCheckoutManager()
Constructs a CheckoutManager

Returns:
CheckoutManager created

update

public void update()
Description copied from class: LiveObject.WebCacheLiveObject
Save this LiveObject to the Repository If the underlying SDK object is new, create it Otherwise, if it has changed, update it This is an atomic operation, not executed in a transaction

Overrides:
update in class LiveObject.WebCacheLiveObject
See Also:
for transacted operations

getProject

public Project.WebCacheProject getProject()
Returns the project to which this view belongs.

Returns:
the project to which this view belongs.

getLabels

public Label.WebCacheLabel[] getLabels()
Returns the labels that exist in this view, including both active and deleted labels. The labels are cached until explicitly refreshed.

Returns:
The labels (both active and deleted) that exist in this view.
See Also:
View.refreshLabels(), View.WebCacheView.getActiveLabels()

getActiveLabels

public Label.WebCacheLabel[] getActiveLabels()
Returns all the active (non-deleted) labels for this view. The labels are cached until explicitly refreshed.

Returns:
The active (non-deleted) labels for this view.
See Also:
View.refreshActiveLabels(), View.WebCacheView.getLabels()

findLabel

public Label.WebCacheLabel findLabel(int labelID)
Returns a label in this view or NULL

Parameters:
labelID - the ID of the label
Returns:
a label in this view or NULL

getDerivedViews

public View.WebCacheView[] getDerivedViews()
Returns the set of views derived from this one.

Returns:
The set of views derived from this one. Returns an empty array if there are no derived views.

getParentView

public View.WebCacheView getParentView()
Returns the parent of this view.

Returns:
the parent of this view, or null if there is no parent.

getRootFolder

public Folder.WebCacheFolder getRootFolder()
Gets the root folder of this view. The Folder hierarchy is cached in the View object, until explicitly refreshed or discarded. The returned Folder will be NULL unless the Folder Type has been cached in the ArtifactCache

Returns:
The root folder of this view or NULL if not yet cached.
See Also:
ArtifactCache.cacheViewMembers(com.starteam.ViewMember.Type.WebCacheViewMemberType[])

setRights

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

Parameters:
aces - the rights

getRights

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

Returns:
the access rights assigned to this view

setRights

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

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

getRights

public ACE.WebCacheACE[] getRights(Type.WebCacheType typ)
Query this view 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

findViewMember

public ViewMember.WebCacheViewMember findViewMember(ViewMember.Type.WebCacheViewMemberType typ,
                                                    int vmid)
returns a view member identified by it's ID, if visible to the specified user. The returned ViewMember is a pure 'data object' without a Server Connection

Parameters:
typ - the type of view member
vmid - the system wide unique integer ID describing a view member
Returns:
a view member matching the given ID or NULL

getPresentationID

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

Returns:
the unique integer identifier for this resource.

getViewMembers

public ViewMember.WebCacheViewMember[] getViewMembers(ViewMember.Type.WebCacheViewMemberType typ,
                                                      Filter.WebCacheFilter fltr)
Returns a set of ViewMembers visible to the specified user, from the entire set of available view members for the type The returned ViewMembers are pure 'data objects' without a Server Connection i.e. No server calls can be made through these objects. An application intending to manipulate data on the server must use the JobRunner The collection may be empty but never null Visibility is verified by testing both parent container & individual view members

Parameters:
typ - The type of artifact to be retrieved
fltr - A filter which defines the constraints to be applied, including the query to be evaluated, sorting and grouping the returned ViewMembers, may be NULL
Returns:
an array of view members visible to the user.

getFullName

public java.lang.String getFullName()
Returns the full hierarchical name of this view--that is, the concatenation of the root view and each descendant to this view.

Returns:
the full hierarchical name of this view.

isDeleted

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

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

isReference

public boolean isReference()
Return true if this is a reference view, otherwise false.

Returns:
true if this is a reference view, otherwise false.

isReadOnly

public boolean isReadOnly()
Return true if this is a ReadOnly view, otherwise false.

Returns:
true if this view is ReadOnly, otherwise false.

isRoot

public boolean isRoot()
Return true if this view is a Root view.

Returns:
true if this view is a Root view.

isBranch

public boolean isBranch()
Return true if this view is a Branch view.

Returns:
true if this view is a Branch view.

isNonDerived

public boolean isNonDerived()
Return true if this view is a Non-Derived view.

Returns:
true if this view is Non-Derived view.

isBranchAll

public boolean isBranchAll()
Return true if this view's original branching default was set "All".

Returns:
true if this view's original branching default was set "All".

isBranchNone

public boolean isBranchNone()
Return true if this view's original branching default was set "None".

Returns:
true if this view's original branching default was set "None".

isBranchOnShare

public boolean isBranchOnShare()
Returns true if this view is set to branch shared items.

Returns:
true if this view is set to branch shared items.

getName

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

Returns:
the name of this view.

setName

public void setName(java.lang.String name)
Set the name of this view.

Parameters:
name - - the name of this view.

getStartDate

public DateTime getStartDate()
Return the start date of this view.

Returns:
start date of this View
See Also:
View.Type.StartDateProperty

setStartDate

public void setStartDate(DateTime startDate)
Sets the start date of this view.

Parameters:
startDate - start Date of this view.
See Also:
View.Type.StartDateProperty

getEndDate

public DateTime getEndDate()
Return the end date of this view.

Returns:
end date of this view.
See Also:
View.Type.EndDateProperty

setEndDate

public void setEndDate(DateTime endDate)
Sets the end date of this view.

Parameters:
endDate - end date of this view.
See Also:
View.Type.EndDateProperty

getDescription

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

Returns:
the description of this view.

setDescription

public void setDescription(java.lang.String description)
Sets the description for this view.

Parameters:
description - the description for this view

createCheckinManager

public CheckinManager.WebCacheCheckinManager createCheckinManager()
Create and return a CheckinManager

Returns:
a new Checkin Manager

setViewType

public void setViewType(View.ViewType type)
Sets the type of this View. This property is new to 12.0+ servers Supported values include Main, Sandbox, Release and unknown.

Parameters:
type - The new type value for this view

getViewType

public View.ViewType getViewType()
Gets the type (Unknown, Main, Sandbox, Release) of this View. This property is new to 12.0+ servers

Returns:
type (Unknown, Main, Sandbox, Release) of this View
See Also:
View.ViewType, View.Type.TypeProperty, View.Type.PropertyCollection.TYPE

getCachedTypes

public ViewMember.Type.WebCacheViewMemberType[] getCachedTypes()
Returns the set of types cached in the ArtifactCache in the context of a given view The returned Type context is that of the managed server connection

Returns:
the set of types cached in the context of a given view

getConfiguration

public ViewConfiguration getConfiguration()
Returns this view's configuration.

Returns:
this view's configuration.

addViewMemberListener

public void addViewMemberListener(WebCacheViewMemberListener listener,
                                  ViewMember.Type.WebCacheViewMemberType typ)
Add a listener for WebCacheViewMember events Listeners are supported on the tip cache only, since rolled back caches do not change over time

Parameters:
listener - a listener for WebCacheViewMember events
typ - the type for which events are registered

addLabelListener

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

Parameters:
listener - a listener for WebCacheLabel events

setDefaultPath

public void setDefaultPath(java.lang.String path)
Sets the default working file path to be used for this view. This is the value stored in the repository.

Parameters:
path - the new default path

getDefaultPath

public java.lang.String getDefaultPath()
Returns the default working file path to be used for this view. This is the value stored in the repository.

Returns:
the default working file path to be used for this view.


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