com.starteam
Class Folder.WebCacheFolder

java.lang.Object
  extended by com.starteam.LiveObject.WebCacheLiveObject
      extended by com.starteam.TrackedObject.WebCacheTrackedObject
          extended by com.starteam.VersionedObject.WebCacheVersionedObject
              extended by com.starteam.ViewMember.WebCacheViewMember
                  extended by com.starteam.Item.WebCacheItem
                      extended by com.starteam.Folder.WebCacheFolder
All Implemented Interfaces:
ArtifactCacheManager.Securable, ArtifactCacheManager.SecurableContainer
Enclosing class:
Folder

public static class Folder.WebCacheFolder
extends Item.WebCacheItem
implements ArtifactCacheManager.SecurableContainer

Item accessor for cached SDK Items contained objects are obtained from the artifact cache


Method Summary
static Folder.WebCacheFolder create(ArtifactCacheManager.Context cntxt, Folder.WebCacheFolder parent)
          Creates a Folder on the server.
 Folder.WebCacheFolder findSubFolder(java.lang.String name)
          Find an immediate sub folder with the given name
 java.lang.String getDescription()
          Returns the description of this folder.
 java.lang.String getEffectiveExcludeList()
          Returns the fully resolved exclude list.
 Folder.ExcludeFlags getExcludeFlags()
          Returns the ExcludeFlags representing the method by which the exclude list is determined.
 java.lang.String getExcludeList()
          Returns the portion of the exclude list that this folder contributes.
 java.lang.String getFolderHierarchy()
          Gets the fully-qualified name of this folder.
 Item.WebCacheItem[] getItems(Item.Type.WebCacheItemType typ, Filter.WebCacheFilter fltr, boolean dscndnts)
          Returns a sorted set of ViewMembers visible to the specified user, from the set of available view members for the type (specified by the filter) sorted, grouped and constrained by the provided filter criteria The returned ViewMembers are pure 'data objects' without a Server Connection No server calls can be made through these objects.
 java.lang.String getName()
          Returns the name of the folder.
 Folder.WebCacheFolder getParentFolder()
          Returns the folder that contains this folder, or null if this is the root folder.
 ACE.WebCacheACE[] getRights(Type.WebCacheType typ)
          Query this folder for the access rights assigned to the specified type
 TreeItem.WebCacheTreeItem[] getRootTreeItems(TreeItem.Type.WebCacheTreeItemType typ, Filter.WebCacheFilter fltr)
          Returns a set of root TreeItems visible to the specified user, from the set of available tree items for the type within the specified folder Root Tree Items are those tree items who have no parent tree item.
 Folder.WebCacheFolder[] getSubFolders(Filter.WebCacheFilter fltr)
          given a Folder from the ArtifactCache, return all those of its children visible to the specified user.
 void setDescription(java.lang.String description)
          Sets this folder's description.
 void setExcludeFlags(Folder.ExcludeFlags flags)
          Sets the exclude flag for this folder.
 void setExcludeList(java.lang.String excludeList)
          Sets this folder's local exclude list.
 void setName(java.lang.String name)
          Sets the name of this folder.
 void setRights(Type.WebCacheType typ, ACE.WebCacheACE[] aces)
          Assign the specified access rights to this folder contained type
 
Methods inherited from class com.starteam.Item.WebCacheItem
create, getLabels, getLinks, moveTo, moveTo
 
Methods inherited from class com.starteam.ViewMember.WebCacheViewMember
getAttachments, getComment, getDisplayValue, getDotNotation, getExternalID, getExternalURL, getHistory, getLocker, getPresentationID, getRights, getShareTree, getTraces, getView, isDeleted, isFloating, isPinned, isUnread, lock, lock, modifyReadStatus, pinTo, setAttachments, setExternalID, setExternalURL, setRights, unlock, unpin, updateRevisionComment
 
Methods inherited from class com.starteam.VersionedObject.WebCacheVersionedObject
getRevisionNumber, getRootObjectID, getViewVersion, isFromHistory
 
Methods inherited from class com.starteam.TrackedObject.WebCacheTrackedObject
getModifiedBy, getModifiedTime
 
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 Folder.WebCacheFolder create(ArtifactCacheManager.Context cntxt,
                                           Folder.WebCacheFolder parent)
Creates a Folder on the server. This folder may be saved by assigning the various properties and then calling update() on the WebCacheFolder object, or it may be added to a WebCacheViewMemberCollection, which is then saved in a transaacted context.

Parameters:
cntxt - the ArtifactCacheManager User Session Context
parent - the parent folder in which this new folder will be created. The parent folder should be from the artifact cache
Returns:
the newly created Folder.WebCacheFolder, wrapping a new Folder

setRights

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

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

getRights

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

getFolderHierarchy

public java.lang.String getFolderHierarchy()
Gets the fully-qualified name of this folder. The names of this folder and all parent folders up to the root are included, separated by and terminated with the platform-specific path separator character.

Returns:
The fully-qualified name of this folder.

getName

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

Returns:
the name of the folder.
See Also:
Folder.Type.PropertyCollection.NAME, LiveObject.Type.NameProperty

getEffectiveExcludeList

public java.lang.String getEffectiveExcludeList()
Returns the fully resolved exclude list. This may be the concatenation of this folder's exclude list with its parent exclude list depending on the exclude list types.

Returns:
the fully resolved exclude list for this folder.
See Also:
Folder.WebCacheFolder.getExcludeFlags()

setName

public void setName(java.lang.String name)
Sets the name of this folder.

Parameters:
name - the new folder name.
See Also:
Folder.Type.PropertyCollection.NAME, LiveObject.Type.NameProperty

getDescription

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

Returns:
the description of this folder.
See Also:
LiveObject.Type.DescriptionProperty, Folder.Type.PropertyCollection.DESCRIPTION

setDescription

public void setDescription(java.lang.String description)
Sets this folder's description.

Parameters:
description - the new description for this folder.
See Also:
LiveObject.Type.DescriptionProperty, Folder.Type.PropertyCollection.DESCRIPTION

getSubFolders

public Folder.WebCacheFolder[] getSubFolders(Filter.WebCacheFilter fltr)
given a Folder from the ArtifactCache, return all those of its children visible to the specified user. Note that the returned results may be a subset of all subFolders

Parameters:
fltr - the Filter to be applied for sorting or NULL.
Returns:
an array of visible child folders (may be empty, but never NULL)

findSubFolder

public Folder.WebCacheFolder findSubFolder(java.lang.String name)
Find an immediate sub folder with the given name

Parameters:
name - the name of the subfolder
Returns:
a sub folder with the given name or NULL

getExcludeFlags

public Folder.ExcludeFlags getExcludeFlags()
Returns the ExcludeFlags representing the method by which the exclude list is determined.

Returns:
the exclude type being used for this folder's exclude list
See Also:
Folder.ExcludeFlags.NONE, Folder.ExcludeFlags.LOCAL, Folder.ExcludeFlags.INHERIT

setExcludeFlags

public void setExcludeFlags(Folder.ExcludeFlags flags)
Sets the exclude flag for this folder. This is the method by which the exclude list is determined.

Parameters:
flags - the exclude type to be used for this folder's exclude list
See Also:
Folder.ExcludeFlags.NONE, Folder.ExcludeFlags.LOCAL, Folder.ExcludeFlags.INHERIT

getExcludeList

public java.lang.String getExcludeList()
Returns the portion of the exclude list that this folder contributes. Use getEffectiveExcludeList to get the full exclude list which may include specifications inherited from the parent folder.

Returns:
the portion of the exclude list that this folder contributes.
See Also:
Folder.WebCacheFolder.getEffectiveExcludeList()

setExcludeList

public void setExcludeList(java.lang.String excludeList)
Sets this folder's local exclude list.

Parameters:
excludeList - this folder's local exclude list
See Also:
Folder.WebCacheFolder.getExcludeList(), Folder.WebCacheFolder.getEffectiveExcludeList(), Folder.WebCacheFolder.getExcludeFlags()

getParentFolder

public Folder.WebCacheFolder getParentFolder()
Returns the folder that contains this folder, or null if this is the root folder.

Overrides:
getParentFolder in class Item.WebCacheItem
Returns:
this folder's parent folder or null if root.
Throws:
DisembodiedException - if the Folder is disembodied
See Also:
ViewMember.isDisembodied()

getRootTreeItems

public TreeItem.WebCacheTreeItem[] getRootTreeItems(TreeItem.Type.WebCacheTreeItemType typ,
                                                    Filter.WebCacheFilter fltr)
Returns a set of root TreeItems visible to the specified user, from the set of available tree items for the type within the specified folder Root Tree Items are those tree items who have no parent tree item. However, all root & non-root tree items live in the same folder 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 Will always return an empty collection if the specified type has not yet been cached in the ArtifactCache

Parameters:
typ - The type of artifact to be retrieved
fltr - the Filter to be applied for sorting or NULL.
Returns:
a collection of view members visible to the user.
See Also:
ArtifactCache.cacheViewMembers(com.starteam.ViewMember.Type.WebCacheViewMemberType[])

getItems

public Item.WebCacheItem[] getItems(Item.Type.WebCacheItemType typ,
                                    Filter.WebCacheFilter fltr,
                                    boolean dscndnts)
Returns a sorted set of ViewMembers visible to the specified user, from the set of available view members for the type (specified by the filter) sorted, grouped and constrained by the provided filter criteria The returned ViewMembers are pure 'data objects' without a Server Connection No server calls can be made through these objects. An application intending to manipulate data on the server must use the WebCache domain objects The collection may be empty but never null. Visibility is verified by testing both parent container & individual view members Will always return an empty collection if the specified type has not yet been cached in the ArtifactCache

Parameters:
typ - The type of artifact to be retrieved, may NOT be NULL
fltr - The filter which defines the constraints to be applied, including the query to be evaluated, sorting & grouping May or may not be NULL, If NULL, the returned results are not sorted. If fltr is not NULL, then fltr MUST be of the same type as typ
dscndnts - true if descendant folders should be included
Returns:
an array of view members visible to the user.
See Also:
ArtifactCache.cacheViewMembers(com.starteam.ViewMember.Type.WebCacheViewMemberType[])


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