Package com.webmethods.bpm.noodle
Interface IWorkspaceServiceProvider
public interface IWorkspaceServiceProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
Specifies a constant to indicate all workspace types; TYPE_ALL is only valid for search queries.static final int
Specifies a constant to indicate an analysis workspace type.static final int
Specifies a constant to indicate an cache only workspace type.static final int
Specifies a constant to indicate a generic workspace type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the in-memory workspace caches.copyWorkspace
(String workspaceID, String folderID) Creates a copy of a workspace in the specified folder.createViewFolder
(String folderID, String newFolderName) Creates a workspace folder of the current user's logical workspace view.createWorkspace
(String name, int type) Creates a workspace for the current user.createWorkspace
(String name, int type, String contextURI) Creates an analysis workspace for the current user and associated with the contextURI that is the analyzed object.createWorkspaceFromTemplate
(String name, int type, String templateURI) Creates a workspace for the current user, using an existing workspace as a template.createWorkspaceFromTemplate
(String name, int type, String templateURI, boolean isTemp) Creates a workspace for the current user using an existing workspace as a template.createWorkspaceFromTemplate
(String name, int type, String templateURI, boolean isTemp, boolean makeUnique) Creates a workspace for the current user with the specified name based on a workspace template.createWorkspaceFromTemplate
(String name, int type, String contextURI, String templateURI) Creates a workspace for the current user with the specified name and associated with a contextURI of the analyzed object based on a workspace template.createWorkspaceFromTemplate
(String name, int type, String contextURI, String templateURI, boolean isTemp, boolean makeUnique) Creates a workspace for the current user with the specified name and associated with the contextURI of the analyzed object based on a workspace template.createWorkspaceView
(String folderID, String wspaceURI) Creates a reference to an existing workspace in the current user's logical workspace view.createWorkspaceWithUI
(String name, int type, String contextURI, String templateURI, boolean createView, boolean createTab, boolean isTemp) Aggregates several workspace and tab service calls when creating a new workspace.boolean
deleteViewFolder
(String folderID) Deletes a workspace folder from the current user's logical workspace view.boolean
deleteWorkspace
(IWorkspace workspace) Deletes a workspace from the current user's storage.boolean
deleteWorkspace
(String workspaceID) Deletes a workspace from the current user's storage.Creates a new instancejavax.jcr.Session
Gets the JCR session object.Gets the instance on the current session, otherwise create a new one and place it on the current session.Gets the user's workspace storage folder ID.getUserWorkspaces
(int type) Gets a list of workspaces of a given type that are accessible to current usergetUserWorkspaces
(int type, boolean ownerOnly) Locates a workspace by the workspace ID.getWorkspacesByContextURI
(String contextURI, int type, boolean ownerOnly) Gets a list of workspace that have the specified contextURI as it's primary context URI.Gets the document representing the user's logical workspace view.boolean
removeWorkspaceView
(String folderID, String workspaceID) Removes a reference to a workspace in the current user's logical workspace view.boolean
renameViewFolder
(String folderID, String folderName) Renames a workspace folder of the current user's logical workspace view.void
renameWorkspace
(IWorkspace workspace, String newName) Renames an existing workspace.void
renameWorkspaceView
(String workspaceID, String newName) Renames a workspace ref in the current user's logical workspace view.void
saveWorkspaceViewDoc
(Document workspaceViewDoc) Saves the document representing the workspace view for the user.searchWorkspaces
(IWorkspaceQuery query) Gets a result list of workspaces matching a workspace query.void
setJcrSession
(javax.jcr.Session jcrSession) Sets the JCR session used by the provider.
-
Field Details
-
TYPE_ALL
static final int TYPE_ALLSpecifies a constant to indicate all workspace types; TYPE_ALL is only valid for search queries.- See Also:
-
TYPE_GENERIC
static final int TYPE_GENERICSpecifies a constant to indicate a generic workspace type.- See Also:
-
TYPE_ANALYSIS
static final int TYPE_ANALYSISSpecifies a constant to indicate an analysis workspace type.- See Also:
-
TYPE_DISPOSABLE
static final int TYPE_DISPOSABLESpecifies a constant to indicate an cache only workspace type.- See Also:
-
DELETE_DISPOSABLE_WORKSPACES_ON_LOGOUT
- See Also:
-
-
Method Details
-
setJcrSession
void setJcrSession(javax.jcr.Session jcrSession) Sets the JCR session used by the provider.- Parameters:
jcrSession
-
-
getJcrSession
Gets the JCR session object.- Returns:
- Returns the JCR session used by the provider.
- Throws:
Exception
-
getUnsavedWorkspaces
- Returns:
- Throws:
Exception
-
getUserWorkspaces
Gets a list of workspaces of a given type that are accessible to current user- Parameters:
type
- The workspace type as a constant, see Workspace Types.- Returns:
- Returns a list of workspace objects representing the current user's workspaces.
- Throws:
Exception
- See Also:
-
getUserWorkspaces
- Throws:
Exception
-
getUserWorkspaceFolderID
Gets the user's workspace storage folder ID.- Returns:
- Returns the ID of the folder used to store the user's workspaces.
- Throws:
Exception
-
getWorkspaceViewDoc
Gets the document representing the user's logical workspace view.- Returns:
- Returns an XML document representing the workspace view.
- Throws:
Exception
-
saveWorkspaceViewDoc
Saves the document representing the workspace view for the user.- Parameters:
workspaceViewDoc
- Specifies the XML document describing the user's logical workspace view.- Throws:
Exception
-
searchWorkspaces
Gets a result list of workspaces matching a workspace query.- Parameters:
query
- Specifies a query to execute.- Returns:
- Returns a list of workspaces that match the query and for which the user has read access.
- Throws:
Exception
-
getWorkspacesByContextURI
List<IWorkspace> getWorkspacesByContextURI(String contextURI, int type, boolean ownerOnly) throws Exception Gets a list of workspace that have the specified contextURI as it's primary context URI.- Parameters:
contextURI
- The context URI of the workspace. This is the URI of the MWS object being analysed by the workspace.type
- The workspace type as a constant, see Workspace Types.ownerOnly
- Specify true to only return workspaces owned by the current user.- Returns:
- Returns a list of IWorkspace objects that match the query and for which the current user has read access.
- Throws:
Exception
-
getWorkspaceByID
Locates a workspace by the workspace ID.- Parameters:
id
- The workspace ID to retrieve.- Returns:
- Returns an IWorkspace object that matchs the workspace ID.
- Throws:
Exception
-
createWorkspace
Creates a workspace for the current user.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
createWorkspace
Creates an analysis workspace for the current user and associated with the contextURI that is the analyzed object.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.contextURI
- The URI of the MWS object that is being analysed by this workspace.- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
createWorkspaceFromTemplate
Creates a workspace for the current user, using an existing workspace as a template.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.- Returns:
- Returns a new IWorkspace object created in the user's workspace storage folder.
- Throws:
Exception
-
createWorkspaceFromTemplate
IWorkspace createWorkspaceFromTemplate(String name, int type, String templateURI, boolean isTemp) throws Exception Creates a workspace for the current user using an existing workspace as a template.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.isTemp
- Specify true to indicate the new workspace as temporary, requiring an explicit save before it is stored permanently.- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
createWorkspaceFromTemplate
IWorkspace createWorkspaceFromTemplate(String name, int type, String templateURI, boolean isTemp, boolean makeUnique) throws Exception Creates a workspace for the current user with the specified name based on a workspace template.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.isTemp
- Specify true to indicate the new workspace as temporary, requiring an explicit save before it is stored permanently.makeUnique
- Generates an unique workspace name if an existing workspace with the same name exists; a number is appended to the name in parentheses to generate the unique name, for example: myworkspace(1).- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
createWorkspaceFromTemplate
IWorkspace createWorkspaceFromTemplate(String name, int type, String contextURI, String templateURI) throws Exception Creates a workspace for the current user with the specified name and associated with a contextURI of the analyzed object based on a workspace template.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.contextURI
- The URI of the object that is being analysed by this workspace.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
createWorkspaceFromTemplate
IWorkspace createWorkspaceFromTemplate(String name, int type, String contextURI, String templateURI, boolean isTemp, boolean makeUnique) throws Exception Creates a workspace for the current user with the specified name and associated with the contextURI of the analyzed object based on a workspace template.- Parameters:
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.contextURI
- The URI of the object that is being analysed by this workspace.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.isTemp
- Specify true to indicate the new workspace as temporary, requiring an explicit save before it is stored permanently.makeUnique
- Generates an unique workspace name if an existing workspace with the same name exists; a number is appended to the name in parentheses to generate the unique name, for example: myworkspace(1).- Returns:
- Returns a new IWorkspace object created in the current user's workspace storage folder.
- Throws:
Exception
-
renameWorkspace
Renames an existing workspace.- Parameters:
workspace
- The IWorkspace object to rename.newName
- The new name for the workspace as a String.- Throws:
Exception
-
deleteWorkspace
Deletes a workspace from the current user's storage.- Parameters:
workspace
- The IWorkspace object to delete.- Returns:
- Returns true if the workspace exists and was successfully deleted.
- Throws:
Exception
-
deleteWorkspace
Deletes a workspace from the current user's storage.- Parameters:
workspace
- The workspace ID as String to delete.- Returns:
- Returns true if the workspace exists and was successfully deleted.
- Throws:
Exception
-
copyWorkspace
Creates a copy of a workspace in the specified folder.- Parameters:
workspace
- The IWorkspace object to delete.folderID
- The ID as String of the target folder for the copy.- Returns:
- Returns a new IWorkspace object created in target folder.
- Throws:
Exception
-
deleteViewFolder
Deletes a workspace folder from the current user's logical workspace view.- Parameters:
folderID
- The ID of the folder to delete.- Returns:
- Returns true if the logical view folder exists and was successfully deleted.
- Throws:
Exception
-
renameViewFolder
Renames a workspace folder of the current user's logical workspace view.- Parameters:
folderID
- The ID of the local view folder to rename.folderName
- The new name for the local view folder.- Returns:
- Returns true if the folder exists and was successfully renamed.
- Throws:
Exception
-
createViewFolder
Creates a workspace folder of the current user's logical workspace view.- Parameters:
folderID
- The ID of the folder in which to create the new folder. Null indicates the root folder.newFolderName
- The name to give the new folder.- Returns:
- Returns a node representing the new logical workspace view folder.
- Throws:
Exception
-
createWorkspaceView
Creates a reference to an existing workspace in the current user's logical workspace view.- Parameters:
folderID
- The ID of the folder in which to create the new workspace reference.wspaceURI
- The URI of the workspace to add to the logical view.- Returns:
- Returns a node representing the new workspace reference.
- Throws:
Exception
-
removeWorkspaceView
Removes a reference to a workspace in the current user's logical workspace view. This does not delete the workspace, it only removes the reference to the workspace from the user's workspace view.- Parameters:
folderID
- Specifies the ID of the workspace parent folder; NULL in folderID indicates the root folder.workspaceID
- The ID of the workspace to remove.- Returns:
- Returns true if the workspace exists and the reference was successfully removed.
- Throws:
Exception
-
renameWorkspaceView
Renames a workspace ref in the current user's logical workspace view.- Parameters:
workspaceID
- The ID of the workspace to rename.newName
- The new name for the workspace.- Throws:
Exception
-
getSessionInstance
Gets the instance on the current session, otherwise create a new one and place it on the current session.- Returns:
- Returns an instance of the workspace provider for the current user session.
- Throws:
Exception
-
getInstance
Creates a new instance- Returns:
- Returns an instance of the workspace provider for the current user session.
- Throws:
Exception
-
createWorkspaceWithUI
String createWorkspaceWithUI(String name, int type, String contextURI, String templateURI, boolean createView, boolean createTab, boolean isTemp) throws Exception Aggregates several workspace and tab service calls when creating a new workspace. The workspace is created from a workspace template, a reference to the workspace is added to the workspace view, and a new tab is created to display the workspace.- Parameters:
name
- name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.contextURI
- The URI of the object that is being analysed by this workspace.templateURI
- The URI of the workspace or folder to use as a template for the new workspace.createView
- Specify true to automatically create a workspace reference in the current user's logical workspace view.createTab
- Specify true automatically create a new view tab for the newly created workspace.isTemp
- Specify true to indicate the new workspace as temporary, requiring an explicit save before it is stored permanently.- Returns:
- Returns the display URI of the newly created workspace as String (usually used as a redirect target URI).
- Throws:
Exception
-
clearCache
Clears the in-memory workspace caches. May be used when workspace storage has been modified manually and the workspace cache is no longer valid.- Throws:
Exception
-