Interface HippoRepository


public interface HippoRepository
Instances of this class represent a connection to the Repository. This interface is mainly provided to add some convenience methods, additional functionality and provide a basis for starting transactional access to the repository. The primary usage is to use create an authenticated session which can be used to retrieve and store data. For this usage, some convenience login() methods are accessible though this interface, but these are essentially the same as implemented in the JSR-170 based JCR repository, as would be returned by the method getRepository().
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the repository connection.
    Get the location where the repository stores information.
    Returns the JCR-170 compliant repository object in use.
    This call is not (yet) part of the API, but under evaluation.
    javax.transaction.UserTransaction
    Get a UserTransaction from the JTA transaction manager through JNDI.
    javax.transaction.UserTransaction
    getUserTransaction(javax.transaction.TransactionManager tm, Session session)
    Get a UserTransaction from the JTA transaction manager through JNDI.
    Creates a new Session for the current user, which might involve opening an anonymous session.
    login(String username, char[] password)
    Creates a new Session for the user identifier with the indicated username and password.
    login(Credentials credentials)
    Creates a new Session for the user identifier with the indicated credentials.
    login(SimpleCredentials credentials)
    Deprecated.
    since 2.26.00 use #login(javax.jcr.Credentials) instead
  • Method Details

    • login

      Creates a new Session for the current user, which might involve opening an anonymous session. If a user identity and credentials are available through the application container, then use JAAS to obtain the credentials and use login(SimpleCredentials).
      Throws:
      LoginException
      RepositoryException
      See Also:
    • login

      Session login(String username, char[] password) throws LoginException, RepositoryException
      Creates a new Session for the user identifier with the indicated username and password.
      Parameters:
      username - the username to use as part of the credentials
      password - the password to use as part of the credentials
      Throws:
      LoginException
      RepositoryException
      See Also:
    • login

      Creates a new Session for the user identifier with the indicated credentials.
      Throws:
      LoginException
      RepositoryException
      See Also:
    • login

      Deprecated.
      since 2.26.00 use #login(javax.jcr.Credentials) instead
      Creates a new Session for the user identifier with the indicated credentials.
      Throws:
      LoginException
      RepositoryException
      See Also:
    • close

      void close()
      Closes the repository connection. When the repository is running locally, this also involves shutting down the repository.
    • getUserTransaction

      javax.transaction.UserTransaction getUserTransaction(Session session) throws RepositoryException, javax.transaction.NotSupportedException
      Get a UserTransaction from the JTA transaction manager through JNDI.
      Parameters:
      session - the session for which the transaction support is requested
      Returns:
      a new JTA UserTransaction object
      Throws:
      RepositoryException - generic error such as a connection error
      javax.transaction.NotSupportedException - indicates transactions are not supported in the set up
    • getUserTransaction

      javax.transaction.UserTransaction getUserTransaction(javax.transaction.TransactionManager tm, Session session) throws javax.transaction.NotSupportedException
      Get a UserTransaction from the JTA transaction manager through JNDI.
      Parameters:
      tm - the JTA transaction manager to use
      session - the JCR session for which to start the transaction
      Returns:
      a new UserTransaction object
      Throws:
      javax.transaction.NotSupportedException - indicates transactions are not supported in the set up
    • getLocation

      String getLocation()
      Get the location where the repository stores information.
      Returns:
      the URL of direct file path which is used to store information by the repository.
    • getRepository

      Repository getRepository()
      Returns the JCR-170 compliant repository object in use.
      Returns:
      the JCR repository
    • getRepositoryMap

      RepositoryMap getRepositoryMap(Node node) throws RepositoryException
      This call is not (yet) part of the API, but under evaluation.

      Returns a java.util.Map representation of the subtree starting with the indicated node in the repository.

      Parameters:
      node - the starting node of the subtree to map as a java.util.Map
      Returns:
      a map representation of the content in the repository
      Throws:
      RepositoryException - in case of a generic error occurs communicating with the repository