|
Oracle® Collaboration Suite Workspaces API Reference 10g (10.1.1.0.2) Part No. B16233-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.workspaces.session.CwSession
This class represents a valid user session in the workspace application. The reason to make it extend Serializable
is to be able to put into HttpSession in the web tier to make the Workspace application cluster-friendly.
For one specific user, there could be more than one session in the workspace.
Method Summary | |
void |
addToFavoriteWorkspaces(CwUid[] workspaceUids) |
boolean |
canPerformOperation(CwSystemOperation operation) Checks if the current session is authorized to perform the specified system operation |
boolean |
canPerformOperation(CwSystemOperation operation, CwApplicationRole[] appRoles) TBD: Temp Operation to be fixed (see NOTE below) Checks if the current session is authorized to perform the specified system operation |
boolean |
canPerformOperation(CwWorkspaceOperation operation, CwApplicationRole[] appRoles, CwWorkspaceSummary wspcSum) TBD: Temp Operation to be fixed (see NOTE below) Checks if the current session is authorized to perform the specified workspace operation |
CwWorkspace |
createWorkspace(CwWorkspaceDefinition wsDef) Create a workspace with the supplied configurations. |
java.lang.String |
createWorkspaceTemplate(CwWorkspaceTemplateDefinition tmplDef) Creates a template based on a given workspace. |
void |
deleteWorkspaceByPath(java.lang.String path, boolean recursive, boolean ignoreErrors) Remove an existing workspace given the absolute path to the workspace, analogous to deleteWorkspaceByUid(CwUid, boolean, boolean) |
void |
deleteWorkspaceByPath(java.lang.String path, boolean recursive, boolean ignoreErrors, CwResourceDeletionOptions[] resDelOptions) Remove an existing workspace given the absolute path to the workspace, analogous to deleteWorkspaceByUid(CwUid, boolean, boolean, CwResourceDeletionOptions[]) |
void |
deleteWorkspaceByUid(CwUid workspaceUid, boolean recursive, boolean ignoreErrors) Drop an existing workspace given the ID of the workspace |
void |
deleteWorkspaceByUid(CwUid workspaceUid, boolean recursive, boolean ignoreErrors, CwResourceDeletionOptions[] resDelOptions) Drop an existing workspace given the ID of the workspace |
void |
deleteWorkspaceTemplate(java.lang.String templateName) Deletes the named template |
java.util.Map |
getAllCwApplicationProperties() Returns the name-value pairs for all CW application properties |
CwApplicationRole[] |
getApplicationRoles(CwIdentity identity) |
long |
getCreatedTime() Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
java.lang.String |
getCwApplicationPropertyValue(java.lang.String propertyName) Returns the value of the given CW application property |
java.io.Reader |
getCwTemplateSchema() Returns the XML schema for CW templates |
java.lang.Object |
getEntityByUid(CwUid uid) Returns the CW entity with the given CwUid |
java.lang.String |
getId() Returns a string containing the unique identifier assigned to this session. |
java.util.Date |
getLastLoginTime() Returns last SSO login time of the connected user |
java.util.Date |
getLastLogoutTime() Returns last SSO logout time of the connected user |
java.util.Locale |
getLocale() Returns the locale of the connected user |
int |
getMaxInactiveInterval() Get the maximum time interval in seconds. |
CwApplicationRole[] |
getMyApplicationRoles() Returns my own application grant in CW Application |
CwUserPresenceStatus[] |
getPresenceStatus(CwUser[] users) |
CwResourceSession |
getResourceSession(CwResourceType type) Get the attribute |
CwSearchSession |
getSearchSession() Gets a search session object |
boolean |
getSystemAdministratorMode() Get the system administrator mode for the session |
CwUser |
getUser() Get the user associated with this session |
CwWorkspace |
getWorkspaceByPath(java.lang.String path) |
CwWorkspace |
getWorkspaceByUid(CwUid workspaceUid) |
CwWorkspace |
getWorkspaceByUidForAppAdmin(CwUid workspaceUid) An app admin can use this method for fetching a ws of which she is not a member. |
CwWorkspaceTemplate |
getWorkspaceTemplate(java.lang.String templateName) Fetches the named workspace template |
void |
grant(CwApplicationRole appRole, CwIdentity identity) Grant application role to an identity. |
CwWorkspaceSummary[] |
listAllWorkspaces() |
CwWorkspaceRecoveryInfo[] |
listAllWorkspacesRecoveryInfo() |
java.util.Map |
listApplicationRoles() List all the application roles have been directly granted in CW application for all the user/members as a map which is keyed from CwIdentity to oracle.workspaces.authorization.CwApplicationRole[] . |
CwFailedOperationInfo[] |
listFailedSystemOperationInfo() |
CwWorkspaceSummary[] |
listFavoriteWorkspaces() |
CwWorkspaceSummary[] |
listMyWorkspaces() |
CwWorkspaceSummary[] |
listMyWorkspaces(CwQuerySortContext sortCtx) List summaries of all workspaces the connected user is a member of. |
CwWorkspaceRecoveryInfo[] |
listMyWorkspacesRecoveryInfo() |
CwWorkspaceSummary[] |
listNonMemberWorkspaces() Lists the summaries of all publicly listed top-level workspaces of which the connected user is not a member |
CwWorkspaceSummary[] |
listOrphanedWorkspaces() |
CwWorkspaceTemplate[] |
listWorkspaceTemplates() Returns the list of workspace templates stored in the CwRepository |
void |
recoverOperation(long opInstanceId, boolean force) |
void |
recoverWorkspace(CwUid workspaceUid, boolean force) |
void |
removeFromFavoriteWorkspaces(CwUid[] workspaceUids) |
CwResourceSession |
removeResourceSession(CwResourceType type) Remove the attribute |
void |
revoke(CwApplicationRole appRole, CwIdentity identity) Revoke application role from an identity. |
CwSearchResults |
search(oracle.search.Query query) Searches for workspaces/resource items based on their properties or content. |
void |
setCwApplicationPropertyDefaultValues() Sets the default values of all CW application properties |
void |
setCwApplicationPropertyDefaultValues(java.lang.String[] propertyNames) Sets the default values of the given CW application properties |
void |
setCwApplicationPropertyValue(java.lang.String propertyName, java.lang.String propertyValue) Sets the value of the given CW application property |
void |
setCwApplicationPropertyValues(java.util.Map propertyValueMap) Sets the values of the given CW application properties |
void |
setResourceSession(CwResourceType type, CwResourceSession session) Set an object in the session refrerenced by the name. |
void |
setSearchSession(CwSearchSession searchSession) Sets the search session object |
void |
setSystemAdministratorMode(boolean systemAdminMode) Get the maximum time interval in seconds. |
void |
storeWorkspaceTemplate(CwWorkspaceTemplate template) Stores the given template in CwRepository |
void |
storeWorkspaceTemplate(java.lang.String templateSpecification) Stores the given template in CwRepository |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void addToFavoriteWorkspaces(CwUid[] workspaceUids) throws CwException
CwException
public boolean canPerformOperation(CwSystemOperation operation) throws CwException
operation
- The operation to authorize the current session forCwException
public boolean canPerformOperation(CwSystemOperation operation, CwApplicationRole[] appRoles) throws CwException
operation
- The operation to authorize the current session forCwException
public boolean canPerformOperation(CwWorkspaceOperation operation, CwApplicationRole[] appRoles, CwWorkspaceSummary wspcSum) throws CwException
operation
- The operation to authorize the current session fororacle.workspaces.CwWorkspace.canPerformOperation()
should be usedCwException
public CwWorkspace createWorkspace(CwWorkspaceDefinition wsDef) throws CwException
Note: To create a sub workspace under an existing workspace. either set existing workspace ID in the parentId
property of wsDef
parameter or specify the complete path name of the workspace
wsDef
- contains name, description, template, initial set of members etc.CwException
- if the user does not have the privilege to create the workspaceCwException
- if the workspace to be created does not pass the valiation rules, e.g., the name must be unique.public java.lang.String createWorkspaceTemplate(CwWorkspaceTemplateDefinition tmplDef) throws CwException
tmplDef
- options for creating the templateopen: templatizing options
CwException
- if the user is not a workspace administrator or invalid template properties are sepcifiedpublic void deleteWorkspaceByPath(java.lang.String path, boolean recursive, boolean ignoreErrors) throws CwException
deleteWorkspaceByUid(CwUid, boolean, boolean)
CwException
public void deleteWorkspaceByPath(java.lang.String path, boolean recursive, boolean ignoreErrors, CwResourceDeletionOptions[] resDelOptions) throws CwException
deleteWorkspaceByUid(CwUid, boolean, boolean, CwResourceDeletionOptions[])
CwException
public void deleteWorkspaceByUid(CwUid workspaceUid, boolean recursive, boolean ignoreErrors) throws CwException
workspaceUid
- the UID of the workspace to be removedrecursive
- drop the workspace even if the workspace contains resources or sub workspaces.ignoreErrors
- drop the workspace even if errors are encountered. Note: ignoreErrors -> recursiveCwException
- if the user does not have the privilege to delete the workspaceCwException
- if the workspace contains resources or sub workspaces, and the caller specify force
to false
.CwException
- open: if there are active sessions connected to the workspace.CwException
- if a SQL exception is encountered in accessing the CW Repositorypublic void deleteWorkspaceByUid(CwUid workspaceUid, boolean recursive, boolean ignoreErrors, CwResourceDeletionOptions[] resDelOptions) throws CwException
workspaceUid
- the UID of the workspace to be removedrecursive
- drop the workspace even if the workspace contains resources or sub workspaces.ignoreErrors
- drop the workspace even if errors are encountered. Note: ignoreErrors -> recursiveresDelOptions
- resource deletion optionsCwException
- if the user does not have the privilege to delete the workspaceCwException
- if the workspace contains resources or sub workspaces, and the caller specify force
to false
.CwException
- open: if there are active sessions connected to the workspace.CwException
- if a SQL exception is encountered in accessing the CW Repositorypublic void deleteWorkspaceTemplate(java.lang.String templateName) throws CwException
templateName
- name of the template to be droppedCwException
- if the user does not have sufficient privileges to drop the template or properties are sepcifiedpublic java.util.Map getAllCwApplicationProperties() throws CwException
CwException
public CwApplicationRole[] getApplicationRoles(CwIdentity identity) throws CwException
identity
- a user/group, whose grantables are to be listed.CwException
- if the authenticated user does not have sufficient privileges to perform the action.public long getCreatedTime()
public java.lang.String getCwApplicationPropertyValue(java.lang.String propertyName) throws CwException
propertyName
- The name of the propertyCwException
public java.io.Reader getCwTemplateSchema() throws CwException
CwException
public java.lang.Object getEntityByUid(CwUid uid) throws CwException
CwException
public java.lang.String getId()
public java.util.Date getLastLoginTime() throws CwException
CwException
public java.util.Date getLastLogoutTime() throws CwException
CwException
public java.util.Locale getLocale()
public int getMaxInactiveInterval()
public CwApplicationRole[] getMyApplicationRoles() throws CwException
CwException
public CwUserPresenceStatus[] getPresenceStatus(CwUser[] users) throws CwException
CwException
public CwResourceSession getResourceSession(CwResourceType type)
public CwSearchSession getSearchSession()
public boolean getSystemAdministratorMode()
public CwUser getUser()
public CwWorkspace getWorkspaceByPath(java.lang.String path) throws CwException
path
- the absolute path of the workspace requestedCwException
- if the workspace does not exist. If the user does not have the access privilege to the workspace, the user will also get the same exception, ie, the user cannot differentiate between a workspace that does not exist and a workspace to which the user does not have access privilege.public CwWorkspace getWorkspaceByUid(CwUid workspaceUid) throws CwException
workspaceUid
- the UID of the workspace requestedCwException
- if the workspace does not exist. If the user does not have the access privilege to the workspace, the user will also get the same exception, ie, the user cannot differentiate between a workspace that does not exist and a workspace to which the user does not have access privilege.public CwWorkspace getWorkspaceByUidForAppAdmin(CwUid workspaceUid) throws CwException
workspaceUid
- the UID of the workspace requestedCwException
public CwWorkspaceTemplate getWorkspaceTemplate(java.lang.String templateName) throws CwException
templateName
- name of the template to be fetchedCwException
- if the user does not have sufficient privileges to fetch the template or the the template does not exist.public void grant(CwApplicationRole appRole, CwIdentity identity) throws CwException
appRole
- the application-level role to be granted.identity
- a user/group, to whom the role is grantedCwException
- if the authenticated user does not have sufficient privileges to perform the action.CwException
- if the identity already has the rolepublic CwWorkspaceSummary[] listAllWorkspaces() throws CwException
CwException
public CwWorkspaceRecoveryInfo[] listAllWorkspacesRecoveryInfo() throws CwException
CwException
public java.util.Map listApplicationRoles() throws CwException
CwIdentity
to oracle.workspaces.authorization.CwApplicationRole[]
.CwException
- if the retrieval failedpublic CwFailedOperationInfo[] listFailedSystemOperationInfo() throws CwException
CwException
public CwWorkspaceSummary[] listFavoriteWorkspaces() throws CwException
CwException
public CwWorkspaceSummary[] listMyWorkspaces() throws CwException
CwException
public CwWorkspaceSummary[] listMyWorkspaces(CwQuerySortContext sortCtx) throws CwException
open: supporting paging support deferred.
open: support for search criteria deferred.
sortCtx
- sorting specificationCwException
public CwWorkspaceRecoveryInfo[] listMyWorkspacesRecoveryInfo() throws CwException
CwException
public CwWorkspaceSummary[] listNonMemberWorkspaces() throws CwException
CwException
public CwWorkspaceSummary[] listOrphanedWorkspaces() throws CwException
CwException
public CwWorkspaceTemplate[] listWorkspaceTemplates() throws CwException
Open: list only templates matching a given search criteria
CwException
- if the user does not have sufficient privileges to list the templatespublic void recoverOperation(long opInstanceId, boolean force) throws CwException
opInstanceId
- id of the failed operation (e.g., grant application role)force
- if true, errors will be ignoredCwException
- if the authenticated user does not have sufficient privileges to perform the action or if recovery failspublic void recoverWorkspace(CwUid workspaceUid, boolean force) throws CwException
workspaceUid
- CwUid of the workspace to be recoveredforce
- if true, errors will be ignoredCwException
- if the authenticated user does not have sufficient privileges to perform the action or if recovery failspublic void removeFromFavoriteWorkspaces(CwUid[] workspaceUids) throws CwException
CwException
public CwResourceSession removeResourceSession(CwResourceType type)
public void revoke(CwApplicationRole appRole, CwIdentity identity) throws CwException
appRole
- the application-level role to be revoked.identity
- a user/group, to whom the role is grantedCwException
- if the authenticated user does not have sufficient privileges to perform the action.public CwSearchResults search(oracle.search.Query query) throws CwException
query
- the search query to execute. This method can be used to search for workspaces as well as workspace content. To construct the Query, oracle.search.SimpleQuery object can be instantiated and following set methods cane be used to as described.CwException
CwSearchContainer
public void setCwApplicationPropertyDefaultValues() throws CwException
CwException
public void setCwApplicationPropertyDefaultValues(java.lang.String[] propertyNames) throws CwException
propertyNames
- Names of the properties whose default values are to be setCwException
public void setCwApplicationPropertyValue(java.lang.String propertyName, java.lang.String propertyValue) throws CwException
propertyName
- The name of the propertypropertyValue
- The value of the propertyCwException
public void setCwApplicationPropertyValues(java.util.Map propertyValueMap) throws CwException
propertyValueMap
- Map of property name-value pairsCwException
public void setResourceSession(CwResourceType type, CwResourceSession session)
oracle.workspaces.resource.CwResourceSession
could be added here.public void setSearchSession(CwSearchSession searchSession) throws CwException
searchSession
- the search session to be setCwException
public void setSystemAdministratorMode(boolean systemAdminMode) throws CwException
CwException
public void storeWorkspaceTemplate(CwWorkspaceTemplate template) throws CwException
template
- template to be storedCwException
- if the user does not have sufficient privileges or the template already existspublic void storeWorkspaceTemplate(java.lang.String templateSpecification) throws CwException
templateSpecification
- XML specification for the template that conforms to the XML schema for workspace templates (http://www.oracle.com/cw/wstemplate)CwException
- if the user does not have sufficient privileges, an invalid template specification is passed or the template already exists
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |