RepositoryManager Interface

com.bea.content.manager
RepositoryManager Interface

public interface RepositoryManager

    extends Serializable

This class acts as a virtual repository to all configured repositories. It is the entry point to connect to and operate on the repositories. For each available Repository, a RepositorySession will be created and added to the returned array. A connection may also be attempted to a specific Repository in which case, the RepositorySession for that attempted connection will be added to the RepositorySession array and returned. The RepositoryManager may be cached (perhaps in the HttpSession). If this is the case, it is up to the client to keep RepositorySessions in sync with the user's connection and disconnections to Repositories.


All Superinterfaces
Serializable

Method Summary

public void
addSession(String repositoryName, RepositorySession session)
Adds a RepositorySession.
public RepositorySession[]
connect()
Attempts to connect to all availble Repositories with the current user's Credenntials.
public RepositorySession
connect(String repositoryName)
Attempts to connect to a specific repository using the current user's credentials and returns the RepositorySession based on the attempt.
public RepositorySession
connect(String repositoryName, String userName, String password)
Attempts to connect to a specific repository and returns the RepositorySession based on the attempt.
public NodeOps
getNodeOps()
Gets a NodeOps service.
public ObjectClassOps
getObjectClassOps()
Gets a ObjectClassOps service.
public RepositoryOps
getRepositoryOps()
Gets a RepositoryOps service.
public SearchOps
getSearchOps()
Gets a SearchOps service.
public RepositorySession[]
getSessions()
Gets the RepositorySessions.
public WorkspaceOps
getWorkspaceOps()
Gets a WorkspaceOps service object
public void
removeSession(String repositoryName)
Removes a RepositorySession

Method Detail

addSession(String, RepositorySession) Method

public void addSession(String repositoryName, 
                       RepositorySession session)
Adds a RepositorySession.

Parameters

repositoryName
- the name of the Repository to which the RepositorySession is for.
session
- the RepositorySession for the the Repository.

connect() Method

public RepositorySession[] connect()
throws NoRepositoriesDefinedException, RepositoryException
Attempts to connect to all availble Repositories with the current user's Credenntials. A RepositorySession is created for each Repository and added to the returned array. Any error in connecting is described by the RepositorySession's state.

Returns

RepositorySession[] - an array of the RepositiorySessions, one for each Repository that a connection was attempted.

Exceptions

NoRepositoriesDefinedException
- if there isn't any Repository defined to connect to.
RepositoryException
if an error occurs.

connect(String) Method

public RepositorySession connect(String repositoryName)
Attempts to connect to a specific repository using the current user's credentials and returns the RepositorySession based on the attempt. Any error in connecting is described by the RepositorySession's state.

Parameters

repositoryName
the name of the Repository to connect to.

connect(String, String, String) Method

public RepositorySession connect(String repositoryName, 
                                 String userName, 
                                 String password)
Attempts to connect to a specific repository and returns the RepositorySession based on the attempt. Any error in connecting is described by the RepositorySession's state.

Parameters

repositoryName
- the name of the Repository to connect to.
userName
- the username to connect with.
password
- the password to connect with.

Returns

RepositorySession - the session that contains the state of the connection attempt.

getNodeOps() Method

public NodeOps getNodeOps()
Gets a NodeOps service.

Returns

NodeOps - the NodeOps manager.

getObjectClassOps() Method

public ObjectClassOps getObjectClassOps()
Gets a ObjectClassOps service.

Returns

ObjectClassOps - the ObjectClassOps manager.

getRepositoryOps() Method

public RepositoryOps getRepositoryOps()
Gets a RepositoryOps service.

Returns

RepositoryOps - the RepositoryOps manager.

getSearchOps() Method

public SearchOps getSearchOps()
Gets a SearchOps service.

Returns

SearchOps - the SearchOps manager.

getSessions() Method

public RepositorySession[] getSessions()
Gets the RepositorySessions.


getWorkspaceOps() Method

public WorkspaceOps getWorkspaceOps()
Gets a WorkspaceOps service object

Returns

WorkspaceOps - the WorkspaceOps service.

removeSession(String) Method

public void removeSession(String repositoryName)
Removes a RepositorySession

Parameters

repositoryName
- the name of the repository to remove the RepositorySession for.