|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Repository
The entry point into the WCM repository.
This interface provides methods for obtaining a
Workspace
. A Workspace
represents
a view of the repository for the specified user.
Method Summary | |
---|---|
void |
endWorkspace()
Performs a logout from the currently associated Workspace and
unregisters the current thread from its session. |
void |
executeInVP(VirtualPortalContext vpContext,
VirtualPortalScopedAction vpScopedAction)
Execute the VirtualPortalScopedAction within the scope of the Virtual Portal defined by the
VirtualPortalContext . |
VirtualPortalContext |
generateVPContextFromContextPath(java.lang.String contextPath)
Generate a VirtualPortalContext derived from the Virtual Portal context path value. |
VirtualPortalContext |
generateVPContextFromHostname(java.lang.String hostname)
Generate a VirtualPortalContext derived from the Virtual Portal host name. |
VirtualPortalContext |
generateVPContextFromObjectId(ObjectID objectId)
Generate a VirtualPortalContext derived from the Virtual Portal Object ID
If Object ID is null, return base portal by default |
java.util.List<VirtualPortalContext> |
getAllVirtualPortalContexts()
Return a list of all Virtual Portal contexts available on the current system |
Workspace |
getAnonymousWorkspace()
Returns a Workspace object representing a view of the repository
for the Anonymous user. |
java.lang.String |
getClusterName()
Returns the cluster name of the current repository |
VirtualPortalContext |
getCurrentVirtualPortalContext()
Retrieve the current Virtual Portal context or the Base Portal if called outside of a Virtual Portal |
java.lang.String |
getHostName()
Returns the host name of the current repository |
java.lang.String |
getNodeName()
Returns the name of the current node |
Workspace |
getSystemWorkspace()
Returns a Workspace object representing a system view of the repository. |
Workspace |
getWorkspace()
Returns a Workspace object representing a view of the repository
for the current User accessing the system. |
Workspace |
getWorkspace(java.security.Principal principal)
Returns a Workspace object representing a view of the repository
for the specified Principal . |
Workspace |
getWorkspace(java.lang.String username,
java.lang.String password)
Returns a Workspace object that represents a view of the
repository for a user with the specified credentials. |
Workspace |
getWorkspace(com.ibm.portal.um.User user)
Returns a Workspace object representing a view of the repository
for the specified User . |
boolean |
isVirtualPortalScoped()
Determine whether the current system has Virtual Portal Web Content Library scoping enabled as used with Managed Pages |
Method Detail |
---|
Workspace getWorkspace(java.lang.String username, java.lang.String password) throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object that represents a view of the
repository for a user with the specified credentials.
username
- the username of the user to get a
Workspace
forpassword
- the user's password
Workspace
for the specified user; returns an
Anonymous Workspace
if the user could not be authenticated.
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a Workspace
could not be
created for this user
java.lang.NullPointerException
- if either of the arguments to this method is
nullWorkspace getAnonymousWorkspace() throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object representing a view of the repository
for the Anonymous user.
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a workspace could not be
created for this userWorkspace getWorkspace(java.security.Principal principal) throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object representing a view of the repository
for the specified Principal
.
principal
- The java.security.Principal to retrieve a Workspace for.
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a workspace could not be
created for the specified Principal
java.lang.NullPointerException
- if the argument to this method is
nullWorkspace getWorkspace(com.ibm.portal.um.User user) throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object representing a view of the repository
for the specified User
.
user
- The com.ibm.portal.um.User to retrieve a Workspace for.
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a workspace could not be
created for the specified Principal
java.lang.NullPointerException
- if the argument to this method is
nullWorkspace getWorkspace() throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object representing a view of the repository
for the current User
accessing the system. If no user is currently
logged into the system an anonymous Workspace
will be returned
User
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a workspace could not be
created for the current User
java.lang.NullPointerException
- if the argument to this method is
nullWorkspace getSystemWorkspace() throws com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException, com.ibm.workplace.wcm.api.exceptions.OperationFailedException
Workspace
object representing a system view of the repository.
Workspace
object representing a system view of the repository.
com.ibm.workplace.wcm.api.exceptions.ServiceNotAvailableException
- if the WCM service is not available
com.ibm.workplace.wcm.api.exceptions.OperationFailedException
- if a workspace could not be
created for the specified Principal
java.lang.NullPointerException
- if the argument to this method is
nullvoid endWorkspace()
Workspace
and
unregisters the current thread from its session.
N.B. You don't need to call endWorkspace() when using a JSP component as
rendering and session management is handled by Web Content Manager.
java.lang.String getNodeName()
java.lang.String getHostName()
java.lang.String getClusterName()
void executeInVP(VirtualPortalContext vpContext, VirtualPortalScopedAction vpScopedAction) throws WCMException
VirtualPortalScopedAction
within the scope of the Virtual Portal defined by the
VirtualPortalContext
. This will allow WCM API code to access all WCM assets located within the
target Virtual Portal.
The access rights used for accessing artifacts in the target Virtual Portal will be based on the security configuration of the Virtual Portal. It is possible to configure a Virtual Portal to use a completely separate LDAP and this makes it necessary within the scope of the Virtual Portal to use the Repository.getWorkspace with credentials for a valid user of the Virtual Portal.
Note that it is not allow to stack multiple calls to execute within different Virtual Portals.
Objects that are taken out of this Virtual Portal scope will no longer be able to access their repository and all actions will be performed as if the item belonged to the base portal workspace.
vpContext
- the Virtual Portal to target.vpScopedAction
- the action to perform within the scope of the target Virtual Portal
WCMException
- if an exception is thrown by the VirtualPortalScopedAction
or if the target Virtual Portal defined by
VirtualPortalContext
could not be foundVirtualPortalContext generateVPContextFromHostname(java.lang.String hostname) throws VirtualPortalNotFoundException
VirtualPortalContext
derived from the Virtual Portal host name. Only use this if the host name
uniquely identifies the target Virtual Portal. If the target virtual portal and the base portal share the same host name
then the base portal will be returned as the context.
If hostname is null, return base portal by default
hostname
- the host name of the target Virtual Portal
VirtualPortalNotFoundException
- if a Virtual Portal with the target host name could not be foundVirtualPortalContext generateVPContextFromContextPath(java.lang.String contextPath) throws VirtualPortalNotFoundException
VirtualPortalContext
derived from the Virtual Portal context path value.
If contextPath is null, return base portal by default
contextPath
- the context path of the target Virtual Portal
VirtualPortalNotFoundException
- if a Virtual Portal with the specified context path could not be foundjava.util.List<VirtualPortalContext> getAllVirtualPortalContexts()
List
of all Virtual Portal contextsVirtualPortalContext generateVPContextFromObjectId(ObjectID objectId)
VirtualPortalContext
derived from the Virtual Portal Object ID
If Object ID is null, return base portal by default
objectId
- the ObjectID for the target Virtual Portal
VirtualPortalContext getCurrentVirtualPortalContext()
boolean isVirtualPortalScoped()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |