public interface IWorkspaceServiceProvider
Modifier and Type | Field and Description |
---|---|
static String |
DELETE_DISPOSABLE_WORKSPACES_ON_LOGOUT |
static int |
TYPE_ALL
Specifies a constant to indicate all workspace types; TYPE_ALL is only valid for search queries.
|
static int |
TYPE_ANALYSIS
Specifies a constant to indicate an analysis workspace type.
|
static int |
TYPE_DISPOSABLE
Specifies a constant to indicate an cache only workspace type.
|
static int |
TYPE_GENERIC
Specifies a constant to indicate a generic workspace type.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the in-memory workspace caches.
|
IWorkspace |
copyWorkspace(String workspaceID,
String folderID)
Creates a copy of a workspace in the specified folder.
|
INdlNode |
createViewFolder(String folderID,
String newFolderName)
Creates a workspace folder of the current user's logical workspace view.
|
IWorkspace |
createWorkspace(String name,
int type)
Creates a workspace for the current user.
|
IWorkspace |
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.
|
IWorkspace |
createWorkspaceFromTemplate(String name,
int type,
String templateURI)
Creates a workspace for the current user, using an existing workspace as a template.
|
IWorkspace |
createWorkspaceFromTemplate(String name,
int type,
String templateURI,
boolean isTemp)
Creates a workspace for the current user using an existing workspace as a template.
|
IWorkspace |
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.
|
IWorkspace |
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.
|
IWorkspace |
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.
|
INdlNode |
createWorkspaceView(String folderID,
String wspaceURI)
Creates a reference to an existing workspace in the current user's logical workspace view.
|
String |
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.
|
IWorkspaceServiceProvider |
getInstance()
Creates a new instance
|
javax.jcr.Session |
getJcrSession()
Gets the JCR session object.
|
IWorkspaceServiceProvider |
getSessionInstance()
Gets the instance on the current session, otherwise create a new one and place it on
the current session.
|
List<IWorkspace> |
getUnsavedWorkspaces() |
String |
getUserWorkspaceFolderID()
Gets the user's workspace storage folder ID.
|
List<IWorkspace> |
getUserWorkspaces(int type)
Gets a list of workspaces of a given type that are accessible to current user
|
List<IWorkspace> |
getUserWorkspaces(int type,
boolean ownerOnly) |
IWorkspace |
getWorkspaceByID(String id)
Locates a workspace by the workspace ID.
|
List<IWorkspace> |
getWorkspacesByContextURI(String contextURI,
int type,
boolean ownerOnly)
Gets a list of workspace that have the specified contextURI as it's
primary context URI.
|
Document |
getWorkspaceViewDoc()
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.
|
List<IWorkspace> |
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.
|
static final int TYPE_ALL
static final int TYPE_GENERIC
static final int TYPE_ANALYSIS
static final int TYPE_DISPOSABLE
static final String DELETE_DISPOSABLE_WORKSPACES_ON_LOGOUT
void setJcrSession(javax.jcr.Session jcrSession)
jcrSession
- javax.jcr.Session getJcrSession() throws Exception
Exception
List<IWorkspace> getUnsavedWorkspaces() throws Exception
Exception
List<IWorkspace> getUserWorkspaces(int type) throws Exception
type
- The workspace type as a constant, see Workspace Types.Exception
IWorkspace
List<IWorkspace> getUserWorkspaces(int type, boolean ownerOnly) throws Exception
Exception
String getUserWorkspaceFolderID() throws Exception
Exception
Document getWorkspaceViewDoc() throws Exception
Exception
void saveWorkspaceViewDoc(Document workspaceViewDoc) throws Exception
workspaceViewDoc
- Specifies the XML document describing the user's logical workspace view.Exception
List<IWorkspace> searchWorkspaces(IWorkspaceQuery query) throws Exception
query
- Specifies a query to execute.Exception
List<IWorkspace> getWorkspacesByContextURI(String contextURI, int type, boolean ownerOnly) throws Exception
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.Exception
IWorkspace getWorkspaceByID(String id) throws Exception
id
- The workspace ID to retrieve.Exception
IWorkspace createWorkspace(String name, int type) throws Exception
name
- The name to give the newly created workspace.type
- The workspace type as a constant, see Workspace Types.Exception
IWorkspace createWorkspace(String name, int type, String contextURI) throws Exception
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.Exception
IWorkspace createWorkspaceFromTemplate(String name, int type, String templateURI) throws Exception
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.Exception
IWorkspace createWorkspaceFromTemplate(String name, int type, String templateURI, boolean isTemp) throws Exception
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.Exception
IWorkspace createWorkspaceFromTemplate(String name, int type, String templateURI, boolean isTemp, boolean makeUnique) throws Exception
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).Exception
IWorkspace createWorkspaceFromTemplate(String name, int type, String contextURI, String templateURI) throws Exception
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.Exception
IWorkspace createWorkspaceFromTemplate(String name, int type, String contextURI, String templateURI, boolean isTemp, boolean makeUnique) throws Exception
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).Exception
void renameWorkspace(IWorkspace workspace, String newName) throws Exception
workspace
- The IWorkspace object to rename.newName
- The new name for the workspace as a String.Exception
boolean deleteWorkspace(IWorkspace workspace) throws Exception
workspace
- The IWorkspace object to delete.Exception
boolean deleteWorkspace(String workspaceID) throws Exception
workspace
- The workspace ID as String to delete.Exception
IWorkspace copyWorkspace(String workspaceID, String folderID) throws Exception
workspace
- The IWorkspace object to delete.folderID
- The ID as String of the target folder for the copy.Exception
boolean deleteViewFolder(String folderID) throws Exception
folderID
- The ID of the folder to delete.Exception
boolean renameViewFolder(String folderID, String folderName) throws Exception
folderID
- The ID of the local view folder to rename.folderName
- The new name for the local view folder.Exception
INdlNode createViewFolder(String folderID, String newFolderName) throws Exception
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.Exception
INdlNode createWorkspaceView(String folderID, String wspaceURI) throws Exception
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.Exception
boolean removeWorkspaceView(String folderID, String workspaceID) throws Exception
folderID
- Specifies the ID of the workspace parent folder; NULL in folderID indicates the root folder.workspaceID
- The ID of the workspace to remove.Exception
void renameWorkspaceView(String workspaceID, String newName) throws Exception
workspaceID
- The ID of the workspace to rename.newName
- The new name for the workspace.Exception
IWorkspaceServiceProvider getSessionInstance() throws Exception
Exception
IWorkspaceServiceProvider getInstance() throws Exception
Exception
String createWorkspaceWithUI(String name, int type, String contextURI, String templateURI, boolean createView, boolean createTab, boolean isTemp) throws Exception
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.Exception