Class SessionFactoryImpl
- java.lang.Object
-
- org.exoplatform.connectors.jcr.impl.adapter.SessionFactoryImpl
-
- All Implemented Interfaces:
Serializable,Referenceable,javax.resource.Referenceable,SessionFactory
public class SessionFactoryImpl extends Object implements SessionFactory, javax.resource.Referenceable
The default implementation of theSessionFactory.- Version:
- $Id$
- Author:
- Nicolas Filotto
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReferencegetReference()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.voidsetReference(Reference reference)
-
-
-
Method Detail
-
setReference
public void setReference(Reference reference)
- Specified by:
setReferencein interfacejavax.resource.Referenceable- See Also:
Referenceable.setReference(javax.naming.Reference)
-
getReference
public Reference getReference() throws NamingException
- Specified by:
getReferencein interfaceReferenceable- Throws:
NamingException- See Also:
Referenceable.getReference()
-
getSession
public javax.jcr.Session getSession() throws javax.jcr.RepositoryExceptionDescription copied from interface:SessionFactoryGet a JCR session corresponding to the repository defined in the configuration and the default workspace.- Specified by:
getSessionin interfaceSessionFactory- Returns:
- a JCR session corresponding to the criteria
- Throws:
javax.jcr.RepositoryException- if the session could not be created- See Also:
SessionFactory.getSession()
-
getSession
public javax.jcr.Session getSession(String userName, String password) throws javax.jcr.RepositoryException
Description copied from interface:SessionFactoryGet a JCR session corresponding to the repository defined in the configuration and the default workspace, using the given user name and password.- Specified by:
getSessionin interfaceSessionFactory- 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- See Also:
SessionFactory.getSession(java.lang.String, java.lang.String)
-
getSession
public javax.jcr.Session getSession(String workspace) throws javax.jcr.RepositoryException
Description copied from interface:SessionFactoryGet a JCR session corresponding to the repository defined in the configuration and the given workspace.- Specified by:
getSessionin interfaceSessionFactory- 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- See Also:
SessionFactory.getSession(java.lang.String)
-
getSession
public javax.jcr.Session getSession(String workspace, String userName, String password) throws javax.jcr.RepositoryException
Description copied from interface:SessionFactoryGet a JCR session corresponding to the repository defined in the configuration and the given workspace, using the given user name and password.- Specified by:
getSessionin interfaceSessionFactory- 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- See Also:
SessionFactory.getSession(java.lang.String, java.lang.String, java.lang.String)
-
-