Interface SessionFactory

All Superinterfaces:
Serializable
All Known Implementing Classes:
SessionFactoryImpl

public interface SessionFactory extends Serializable
The equivalent of a ConnectionFactory for the JCR
Version:
$Id$
Author:
Nicolas Filotto
  • 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.
  • Method Details

    • getSession

      javax.jcr.Session getSession() throws javax.jcr.RepositoryException
      Get 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 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
    • 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 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