Interface SessionFactory
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SessionFactoryImpl
The equivalent of a
ConnectionFactory for the JCR- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Method Summary
Modifier and TypeMethodDescriptionjavax.jcr.SessionGet a JCR session corresponding to the repository defined in the configuration and the default workspace.javax.jcr.SessiongetSession(String workspace) Get a JCR session corresponding to the repository defined in the configuration and the given workspace.javax.jcr.SessiongetSession(String userName, String password) Get a JCR session corresponding to the repository defined in the configuration and the default workspace, using the given user name and password.javax.jcr.SessiongetSession(String workspace, String userName, String password) Get a JCR session corresponding to the repository defined in the configuration and the given workspace, using the given user name and password.
-
Method Details
-
getSession
javax.jcr.Session getSession() throws javax.jcr.RepositoryExceptionGet a JCR session corresponding to the repository defined in the configuration and the default workspace.- Returns:
- a JCR session corresponding to the criteria
- Throws:
javax.jcr.RepositoryException- if the session could not be created
-
getSession
Get a JCR session corresponding to the repository defined in the configuration and the default workspace, using the given user name and password.- Parameters:
userName- the user name to use for the authenticationpassword- the password to use for the authentication- Returns:
- a JCR session corresponding to the criteria
- Throws:
javax.jcr.RepositoryException- if the session could not be created
-
getSession
Get a JCR session corresponding to the repository defined in the configuration and the given workspace.- Parameters:
workspace- the name of the expected workspace- Returns:
- a JCR session corresponding to the criteria
- Throws:
javax.jcr.RepositoryException- if the session could not be created
-
getSession
javax.jcr.Session getSession(String workspace, String userName, String password) throws javax.jcr.RepositoryException Get a JCR session corresponding to the repository defined in the configuration and the given workspace, using the given user name and password.- Parameters:
workspace- the name of the expected workspaceuserName- the user name to use for the authenticationpassword- the password to use for the authentication- Returns:
- a JCR session corresponding to the criteria
- Throws:
javax.jcr.RepositoryException- if the session could not be created
-