Interface SessionFactory
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SessionFactoryImpl
public interface SessionFactory extends Serializable
The equivalent of aConnectionFactoryfor the JCR- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.jcr.SessiongetSession()Get 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 Detail
-
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
javax.jcr.Session getSession(String userName, String password) throws javax.jcr.RepositoryException
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
javax.jcr.Session getSession(String workspace) throws javax.jcr.RepositoryException
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
-
-