|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionFactory
Entry point into the OpenCMIS Client API. The SessionFactory
class implementation needs to be retrieved by any runtime lookup call. This
can for instance be a J2EE JNDI lookup or an OSGi service lookup.
The entries of parameter map are defined by SessionParameter
class which is part of the commons package. Parameters specify connection
settings (user name, authentication, connection url, binding type (soap or
atom pub) ...).
The Session
class which is constructed is either the
session
base class which is the default implementation or it can
be derived from that implementing special behavior for the session. Which
session finally is returned can be controlled by the
SessionParameter.SESSION_TYPE
parameter.
Example Coding:
SessionFactory factory = ... // use a runtime lookup service
Map
parameters.put(SessionParameter.USER, "username");
parameters.put(SessionParameter.URL, "http://...");
parameters.put(SessionParameter.SESSION_TYPE, SessionType.TRANSIENT.value());
...
TransientSession s = factory.createSession(parameters);
If the SessionType
parameter is not specified then the default
persistent session is returned.
Method Summary | ||
---|---|---|
|
createSession(Map<String,String> parameters)
Obtain a new session using parameter configuration. |
|
List<Repository> |
getRepositories(Map<String,String> parameters)
Returns all repositories that are available at the endpoint. |
Method Detail |
---|
<T extends Session> T createSession(Map<String,String> parameters)
T
- A from the Session
interface derived sub typeparameters
- a Map
of name/value pairs with parameters for the
session. See class SessionParameter
.
session
to the CMIS repository specified by the parameters
.List<Repository> getRepositories(Map<String,String> parameters)
createSession(Map)
for parameter details. The parameter SessionParameter.REPOSITORY_ID
should not be set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |