com.starbase.starteam
Class RecycleBin

java.lang.Object
  |
  +--com.starbase.starteam.CacheRef
        |
        +--com.starbase.starteam.NamedCacheRef
              |
              +--com.starbase.starteam.TypedResource
                    |
                    +--com.starbase.starteam.SimpleTypedResource
                          |
                          +--com.starbase.starteam.View
                                |
                                +--com.starbase.starteam.RecycleBin
All Implemented Interfaces:
java.lang.Cloneable, ISecurable, ISecurableContainer, ISecurableObject

public class RecycleBin
extends View

Provides access to the items that have been deleted from a view.

For example:

     RecycleBin bin = view.getRecycleBin();
     Folder root = bin.getRootFolder();
     Item[] files = root.getItems(TypeNames.FILE);
     for (int i = 0; i < files.length; i++) {
         assertTrue(files[i].isDeleted());
     }
 
The RecycleBin has properties that may be used to control which items are included. For example, IncludeDeletedFolders determines whether or not deleted folders are included in the folder tree; IncludeActiveItems determines whether or not active items are included along with deleted ones. For example:
     // Include both active and deleted items.
     bin.setIncludeActiveItems(true);
     bin.setIncludeDeletedItems(true);

     root.refreshItems(TypeNames.FILE);
     Item[] files = root.getItems(TypeNames.FILE);
     for (int i = 0; i < files.length; i++) {
         if (files[i].isDeleted()) {
             // ...
         }
     }
 
Note that the recycle bin for a View with a rolled back ViewConfiguration (that is, a configuration other than the tip) reflects the state of deleted items as of the configuration time. If an item was active at the configuration time and deleted afterwards, it does not appear deleted in the recycle bin.

See Also:
View.getRecycleBin(), Item.isDeleted(), SupportedFeatures.hasDeletedItems()

Method Summary
 OLEDate getDeletedAsOf()
          Used to limit deleted folders and items to those that were after a given time.
 boolean getIncludeActiveItems()
          Determines whether or not the resulting folders may contain active items.
 boolean getIncludeDeletedFolders()
          Determines whether or not deleted child folders will be inserted into the copy of the folder tree.
 boolean getIncludeDeletedItems()
          Determines whether or not the resulting folders may contain deleted items.
 void setDeletedAsOf(OLEDate deletedAsOf)
          Used to limit deleted folders and items to those that were after a given time.
 void setIncludeActiveItems(boolean isIncluded)
          Sets whether or not the resulting folders may contain active items.
 void setIncludeDeletedFolders(boolean isIncluded)
          Sets whether or not deleted folders will be inserted into the copy of the folder tree.
 void setIncludeDeletedItems(boolean isIncluded)
          Sets whether or not the resulting folders may contain deleted items.
 
Methods inherited from class com.starbase.starteam.View
acquireOwnership, addFolderListener, addFolderUpdateListener, addItemListener, addItemListener, addItemUpdateListener, addLabelListener, addViewListener, cloneRevisionLabel, cloneViewLabel, close, copy, createCheckinManager, createCheckinManager, createCheckoutManager, createCheckoutManager, createChildViewShareAllItems, createChildViewShareDefaultItems, createChildViewShareNoItems, createChildViewShareTheseItems, createRevisionLabel, createViewLabel, discard, discardActiveLabels, discardFolders, discardLabels, equals, fetchAllLabels, fetchAllLabelsFromView, findFolder, findItem, get, getACL, getActiveLabels, getAlternatePath, getBaseConfiguration, getConfiguration, getContainerLevelACL, getCreatedBy, getCreatedTime, getDefaultPath, getDerivedViews, getDescription, getDisembodiedItem, getFileStatusManager, getFullName, getHaveAccessRights, getHistoryForItemID, getID, getLabels, getName, getNewNotificationItems, getOwner, getParentContainer, getParentView, getPath, getProject, getPromotionModel, getRecycleBin, getRootFolder, getServer, getStatusMethodOverride, getViewID, hashCode, hasNewNotificationItems, hasPermission, hasPermission, isBranch, isBranchAll, isBranchNone, isBranchOnShare, isDeleted, isEqualTo, isNonDerived, isReadOnly, isReference, isRefreshActiveLabelsRequired, isRefreshFoldersRequired, isRefreshLabelsRequired, isRefreshRequired, isRoot, modifyItemsFlagForUser, modifyItemsReadStatusForUser, populate, put, putByPropertyID, refresh, refreshActiveLabels, refreshFolders, refreshLabels, refreshPromotionModel, remove, removeFolderListener, removeFolderUpdateListener, removeItemListener, removeItemUpdateListener, removeLabelListener, removeViewListener, resolveLinkEndpoint, setACL, setAlternatePath, setBranchOnShare, setContainerLevelACL, setDefaultPath, setDescription, setName, setStatusMethodOverride, toString, update
 
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
 

Method Detail

getIncludeDeletedFolders

public boolean getIncludeDeletedFolders()
Determines whether or not deleted child folders will be inserted into the copy of the folder tree.

Returns:
true if deleted folders are included in the folder tree; false if only active folders are included. Default value is true.

setIncludeDeletedFolders

public void setIncludeDeletedFolders(boolean isIncluded)
Sets whether or not deleted folders will be inserted into the copy of the folder tree.

Parameters:
isIncluded - true to include deleted folders in the folder tree; false to include only active folders. Default value is true.

getIncludeDeletedItems

public boolean getIncludeDeletedItems()
Determines whether or not the resulting folders may contain deleted items.

Returns:
true if the resulting folders may contain deleted items; false if they may contain only active items. Default value is true. At least one of IncludeDeletedItems and IncludeActiveItems is always set.

setIncludeDeletedItems

public void setIncludeDeletedItems(boolean isIncluded)
Sets whether or not the resulting folders may contain deleted items.

Parameters:
isIncluded - if the resulting folders may contain deleted items; false if they may contain only active items. Default value is true. At least one of IncludeDeletedItems and IncludeActiveItems is always set.

getIncludeActiveItems

public boolean getIncludeActiveItems()
Determines whether or not the resulting folders may contain active items.

Returns:
true if the resulting folders may contain active items; false if they may contain only deleted items. Default value is false. At least one of IncludeDeletedItems and IncludeActiveItems is always set.

setIncludeActiveItems

public void setIncludeActiveItems(boolean isIncluded)
Sets whether or not the resulting folders may contain active items.

Parameters:
isIncluded - if the resulting folders may contain active items; false if they may contain only deleted items. Default value is false. At least one of IncludeDeletedItems and IncludeActiveItems is always set.

getDeletedAsOf

public OLEDate getDeletedAsOf()
Used to limit deleted folders and items to those that were after a given time.

Returns:
The deletion time. Only folders and/or item deleted after this time are included. Default value is null, indicating that all deleted folders and/or items are included.

setDeletedAsOf

public void setDeletedAsOf(OLEDate deletedAsOf)
Used to limit deleted folders and items to those that were after a given time. Zero copies just this folder, 1 copies this folder and immediate children, and so on. Specifying -1 copies this folder and all children to any depth.

Parameters:
deletedAsOf - The deletion time. Only folders and/or item deleted after this time are included. Default value is null, indicating that all deleted folders and/or items are included.


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.