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 the SessionFactory.
Version:
$Id$
Author:
Nicolas Filotto
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
     
    javax.jcr.Session
    Get a JCR session corresponding to the repository defined in the configuration and the default workspace.
    javax.jcr.Session
    getSession(String workspace)
    Get a JCR session corresponding to the repository defined in the configuration and the given workspace.
    javax.jcr.Session
    getSession(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.Session
    getSession(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.
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • setReference

      public void setReference(Reference reference)
      Specified by:
      setReference in interface javax.resource.Referenceable
      See Also:
      • Referenceable.setReference(javax.naming.Reference)
    • getReference

      public Reference getReference() throws NamingException
      Specified by:
      getReference in interface Referenceable
      Throws:
      NamingException
      See Also:
    • getSession

      public javax.jcr.Session getSession() throws javax.jcr.RepositoryException
      Description copied from interface: SessionFactory
      Get a JCR session corresponding to the repository defined in the configuration and the default workspace.
      Specified by:
      getSession in interface SessionFactory
      Returns:
      a JCR session corresponding to the criteria
      Throws:
      javax.jcr.RepositoryException - if the session could not be created
      See Also:
    • getSession

      public javax.jcr.Session getSession(String userName, String password) throws javax.jcr.RepositoryException
      Description copied from interface: SessionFactory
      Get a JCR session corresponding to the repository defined in the configuration and the default workspace, using the given user name and password.
      Specified by:
      getSession in interface SessionFactory
      Parameters:
      userName - the user name to use for the authentication
      password - 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:
    • getSession

      public javax.jcr.Session getSession(String workspace) throws javax.jcr.RepositoryException
      Description copied from interface: SessionFactory
      Get a JCR session corresponding to the repository defined in the configuration and the given workspace.
      Specified by:
      getSession in interface SessionFactory
      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:
    • getSession

      public javax.jcr.Session getSession(String workspace, String userName, String password) throws javax.jcr.RepositoryException
      Description copied from interface: SessionFactory
      Get a JCR session corresponding to the repository defined in the configuration and the given workspace, using the given user name and password.
      Specified by:
      getSession in interface SessionFactory
      Parameters:
      workspace - the name of the expected workspace
      userName - the user name to use for the authentication
      password - 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: