com.ibm.workplace.wcm.api
Interface Repository


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.


Field Summary
static java.lang.String COPYRIGHT
          Copyright statement
 
Method Summary
 void endWorkspace()
          Close the current Workspace when finished with it.
 Workspace getAnonymousWorkspace()
          Returns a Workspace object representing a view of the repository for the Anonymous user.
 Workspace getWorkspace(java.security.Principal p_principal)
          Returns a Workspace object representing a view of the repository for the specified Principal.
 Workspace getWorkspace(java.lang.String p_username, java.lang.String p_password)
          Returns a Workspace object that represents a view of the repository for a user with the specified credentials.
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
Copyright statement

See Also:
Constant Field Values
Method Detail

getWorkspace

public Workspace getWorkspace(java.lang.String p_username,
                              java.lang.String p_password)
                       throws ServiceNotAvailableException,
                              OperationFailedException
Returns a Workspace object that represents a view of the repository for a user with the specified credentials.

Parameters:
p_username - the username of the user to get a Workspace for
p_password - the user's password
Returns:
a Workspace for the specified user; returns an Anonymous Workspace if the user could not be authenticated.
Throws:
ServiceNotAvailableException - if the WCM service is not available
OperationFailedException - if a Workspace could not be created for this user
java.lang.NullPointerException - if either of the arguments to this method is null

getAnonymousWorkspace

public Workspace getAnonymousWorkspace()
                                throws ServiceNotAvailableException,
                                       OperationFailedException
Returns a Workspace object representing a view of the repository for the Anonymous user.

Returns:
Workspace for the Anonymous user
Throws:
ServiceNotAvailableException - if the WCM service is not available
OperationFailedException - if a workspace could not be created for this user

getWorkspace

public Workspace getWorkspace(java.security.Principal p_principal)
                       throws ServiceNotAvailableException,
                              OperationFailedException
Returns a Workspace object representing a view of the repository for the specified Principal.

Parameters:
p_principal -
Returns:
Workspace for the specified Principal
Throws:
ServiceNotAvailableException - if the WCM service is not available
OperationFailedException - if a workspace could not be created for the specified Principal
java.lang.NullPointerException - if the argument to this method is null

endWorkspace

public void endWorkspace()
Close the current Workspace when finished with it. This will unregister the current thread from its session