wt.epm.workspaces
Interface EPMWorkspaceManager

All Known Implementing Classes:
EPMStandardWorkspaceManager, EPMWorkspaceManagerFwd

public interface EPMWorkspaceManager



Supported API: true

Extendable: false


Method Summary
 EPMWorkspace addToWorkspace(EPMWorkspace workspace, WTCollection baselineables)
          Add the specified baselineable objects and family table objectsto the Workspace.
 WTSet checkin(EPMWorkspace workspace, WTKeyedMap toCheckin)
          Checks in the given list of working copies or new objects.
 WTValuedMap checkout(EPMWorkspace workspace, WTCollection objects)
          Checks out the given list of objects to the given workspace folder.
 Folder getDefaultFolder(EPMWorkspace workspace, WTContainerRef containerRef, Class classObject)
          Returns the default folder to where a new object of the given class in the given workspace and container will be checked in.
 WTSet getNewObjects(EPMWorkspace workspace)
          Returns a set of new objects in the given workspace.
 WTSet getNewObjects(WTCollection objects)
          Given a list of objects, returns a set of new objects.
 WTSet getObjectsInWorkspace(EPMWorkspace workspace, Class classObject)
          Get the set of objects included in the Checkpoint associated with the workspace.
 WTKeyedMap getRefreshCandidates(EPMWorkspace workspace, WTCollection baselineables)
          Return a map whose keys are the input originals and whose values are the refreshed candidates.
 WTKeyedMap getTargetFolder(WTCollection docsAndParts, boolean returnFolderPath)
          Given a collection of new EPMDocument and WTPart, returns the target folders.
 WTKeyedMap getTargetLocation(EPMWorkspace workspace, WTCollection docsAndParts, boolean returnFolderPath)
          Given a list of EPMDocument or WTPart, returns the default target folder location for new objects, the folder to where the objects will be checked in for checked out objects, and the current folder location for any other objects.
 WTKeyedMap getUpdateCounter(EPMWorkspace workspace)
          Returns the update counter associated with the trackables in the given workspace.
 WTKeyedMap getUpdateCounter(WTCollection trackables)
          Returns the update counter associated with Trackables.
 WTSet getWorkspaces(WTPrincipal user, WTContainerRef solution)
          Returns all of the workspaces associated with a given user and container.
 Integer getWorkspaceUpdateCounter(EPMWorkspace workspace)
          Returns the update counter associated with the given workspace.
 EPMWorkspace populateWorkspace(EPMWorkspace workspace, WTCollection baselineables)
          Adds the Baselineable item iterations to the Workspace.
 EPMWorkspace removeFromWorkspace(EPMWorkspace workspace, WTCollection baselinables)
          Remove the specified objects from the Workspace.
 void setTargetFolder(WTKeyedMap targetFolders)
          Sets the location to the given folder for the given a collection of new objects.
 WTSet undoCheckout(EPMWorkspace workspace, WTCollection workingCopies)
          Undoes check out the given list of working copies from the given workspace folder.
 WTSet undoCheckoutAndRestoreInWorkspace(EPMWorkspace workspace, WTCollection workingCopies)
          Undoes check out the given list of working copies from the given workspace folder and restores originals in Workspace baseline.
 

Method Detail

checkout

public WTValuedMap checkout(EPMWorkspace workspace,
                            WTCollection objects)
                     throws WTException
Checks out the given list of objects to the given workspace folder. Returns a map whose keys are the given list of object and whose values are the working copies.

Supported API: true

Parameters:
workspace -
objects - A collection of objects to be checked out.
Returns:
WTValuedMap
Throws:
WTException

undoCheckout

public WTSet undoCheckout(EPMWorkspace workspace,
                          WTCollection workingCopies)
                   throws WTException
Undoes check out the given list of working copies from the given workspace folder. Returns a WTSet of originals. Please note that the object is removed from the workspace. If the desired behavior is to restore the original to the workspace, use undoCheckoutAndRestoreInWorkspace.

Supported API: true

Parameters:
workspace -
workingCopies - A collection of objects to be checked out.
Returns:
WTSet
Throws:
WTException

checkin

public WTSet checkin(EPMWorkspace workspace,
                     WTKeyedMap toCheckin)
              throws WTException
Checks in the given list of working copies or new objects.

Supported API: true

Parameters:
workspace -
toCheckin - The keys are the working copies to be checked in and the values are CheckinOption objects. If the CheckinOption is null, the checkin comment is set to an empty string and the object is moved to the target folder.
Returns:
WTSet
Throws:
WTException

setTargetFolder

public void setTargetFolder(WTKeyedMap targetFolders)
                     throws WTException
Sets the location to the given folder for the given a collection of new objects. The collection of new objects must be EPMDocument or WTPart newly created in a workspace folder. An exception is thrown if one or more of the given objects is not new EPMDocument or WTPart.

Supported API: false

Parameters:
targetFolders - The keys of the map are new EPMDocument or WTPart that are newly created in a workspace folder, the values are the target folder references.
Throws:
WTException

getTargetFolder

public WTKeyedMap getTargetFolder(WTCollection docsAndParts,
                                  boolean returnFolderPath)
                           throws WTException
Given a collection of new EPMDocument and WTPart, returns the target folders. An exception is thrown if one or more of the given objects is not new EPMDocument or WTPart. The keys of the returned map are the objects. If returnFolderPath is true, the values are the folder paths. The folder path is a String or an Exception object if the corresponding folder cannot be retrieved, or its path cannot be determined. If the target folder is not specified, its folder path is an empty string. If returnFolderPath is false, the values are Folder objects. If the target folder is not specified, a null folder is returned.

Supported API: false

Parameters:
docsAndParts - A collection of EPMDocument or WTPart newly created in a workspace.
returnFolderPath - Folder path is returned if true. Othewise, returns folder.
Returns:
WTKeyedMap
Throws:
WTException

getTargetLocation

public WTKeyedMap getTargetLocation(EPMWorkspace workspace,
                                    WTCollection docsAndParts,
                                    boolean returnFolderPath)
                             throws WTException
Given a list of EPMDocument or WTPart, returns the default target folder location for new objects, the folder to where the objects will be checked in for checked out objects, and the current folder location for any other objects. The keys of the returned map are the objects. If returnFolderPath is true, the values of the returned WTKeyedMap are the folder paths. The folder path is a String or an Exception object if the corresponding folder cannot be retrieved, or its path cannot be determined. If returnFolderPath is false, the values are Folder objects.

Supported API: false

Parameters:
workspace -
docsAndParts - A collection of EPMDocument or WTPart
returnFolderPath - Folder path is returned if true. Othewise, returns folder.
Returns:
WTKeyedMap
Throws:
WTException

getUpdateCounter

public WTKeyedMap getUpdateCounter(WTCollection trackables)
                            throws WTException
Returns the update counter associated with Trackables. Returns the Map where ObjectReference to Trackable object is key and updateCounter is value.

Supported API: false

Parameters:
trackables - A collection of Trackable objects
Returns:
WTKeyedMap
Throws:
WTException

addToWorkspace

public EPMWorkspace addToWorkspace(EPMWorkspace workspace,
                                   WTCollection baselineables)
                            throws WTException
Add the specified baselineable objects and family table objectsto the Workspace. If another item in theWorkspace has the same Master as the Baselineable, then the current item in the Workspace is replaced with this Baselineable. If the iteration is currently part of theWorkspace, then nothing occurs and no exception is thrown

Supported API: true

Parameters:
workspace - The workspace to be affected by the call.
baselineables -
Returns:
EPMWorkspace
Throws:
WTException

removeFromWorkspace

public EPMWorkspace removeFromWorkspace(EPMWorkspace workspace,
                                        WTCollection baselinables)
                                 throws WTException
Remove the specified objects from the Workspace.

Supported API: true

Parameters:
workspace - The workspace to be affected by the call.
baselinables -
Returns:
EPMWorkspace
Throws:
WTException

getRefreshCandidates

public WTKeyedMap getRefreshCandidates(EPMWorkspace workspace,
                                       WTCollection baselineables)
                                throws WTException
Return a map whose keys are the input originals and whose values are the refreshed candidates.

Supported API: false

Parameters:
workspace -
baselineables -
Returns:
WTKeyedMap
Throws:
WTException

populateWorkspace

public EPMWorkspace populateWorkspace(EPMWorkspace workspace,
                                      WTCollection baselineables)
                               throws WTException
Adds the Baselineable item iterations to the Workspace.

Supported API: true

Parameters:
workspace - The workspace to be affected by the call.
baselineables - A collection of objects to be added (together with the related items determined by the populareRule) to the workspace.
Returns:
EPMWorkspace
Throws:
WTException

getObjectsInWorkspace

public WTSet getObjectsInWorkspace(EPMWorkspace workspace,
                                   Class classObject)
                            throws WTException
Get the set of objects included in the Checkpoint associated with the workspace.

Supported API: true

Parameters:
workspace - The workspace to be affected by the call.
classObject -
Returns:
WTSet
Throws:
WTException

getWorkspaces

public WTSet getWorkspaces(WTPrincipal user,
                           WTContainerRef solution)
                    throws WTException
Returns all of the workspaces associated with a given user and container. If user is not specified, current principal is used. If container is not specified, all the workspaces of the user are returned. If the container is a reference to a PDMLink container, returns all the workspaces of that solution and not that specific PDMLink container. In order to get the workspaces associated with that specific PDMLink container, filters the returns set accordingly.

Supported API: true

Parameters:
user -
solution -
Returns:
WTSet
Throws:
WTException

getNewObjects

public WTSet getNewObjects(WTCollection objects)
                    throws WTException
Given a list of objects, returns a set of new objects. An object is new if it is an EPMDocument or a WTPart that has never been checked in, thus, there is no iteration in any other folders except the workspace folder.

Supported API: false

Parameters:
objects - A collection of EPMDocument or WTPart
Returns:
WTSet
Throws:
WTException

getDefaultFolder

public Folder getDefaultFolder(EPMWorkspace workspace,
                               WTContainerRef containerRef,
                               Class classObject)
                        throws WTException
Returns the default folder to where a new object of the given class in the given workspace and container will be checked in.

Supported API: false

Parameters:
workspace -
containerRef -
classObject - EPMDocument.class or WTPart.class
Returns:
Folder
Throws:
WTException

undoCheckoutAndRestoreInWorkspace

public WTSet undoCheckoutAndRestoreInWorkspace(EPMWorkspace workspace,
                                               WTCollection workingCopies)
                                        throws WTException
Undoes check out the given list of working copies from the given workspace folder and restores originals in Workspace baseline. Returns a WTSet of originals.

Supported API: true

Parameters:
workspace -
workingCopies - A collection of objects to be checked out.
Returns:
WTSet
Throws:
WTException

getUpdateCounter

public WTKeyedMap getUpdateCounter(EPMWorkspace workspace)
                            throws WTException
Returns the update counter associated with the trackables in the given workspace. Returns the Map where ObjectReference to Trackable object is key and updateCounter is value.

Supported API: false

Parameters:
workspace -
Returns:
WTKeyedMap
Throws:
WTException

getWorkspaceUpdateCounter

public Integer getWorkspaceUpdateCounter(EPMWorkspace workspace)
                                  throws WTException
Returns the update counter associated with the given workspace.

Supported API: false

Parameters:
workspace -
Returns:
Integer
Throws:
WTException

getNewObjects

public WTSet getNewObjects(EPMWorkspace workspace)
                    throws WTException
Returns a set of new objects in the given workspace. A new object is either an EPMDocument or a WTPart that has never been checked in, thus, there is no iteration in any other folders except the workspace folder.

Supported API: false

Parameters:
workspace -
Returns:
WTSet
Throws:
WTException