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:
    Repository
    • Method Detail

      • 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