Class AggregateManagerImpl

    • Method Detail

      • mount

        public static AggregateManager mount​(VaultFsConfig config,
                                             WorkspaceFilter wspFilter,
                                             RepositoryAddress mountpoint,
                                             javax.jcr.Session session)
                                      throws javax.jcr.RepositoryException
        Creates a new artifact manager that is rooted at the given node.
        Parameters:
        config - fs config
        wspFilter - the workspace filter
        mountpoint - the address of the mountpoint
        session - the repository session
        Returns:
        an artifact manager
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • mount

        public static AggregateManager mount​(VaultFsConfig config,
                                             WorkspaceFilter wspFilter,
                                             javax.jcr.Repository rep,
                                             javax.jcr.Credentials credentials,
                                             RepositoryAddress mountpoint)
                                      throws javax.jcr.RepositoryException
        Creates a new artifact manager that is rooted at the given path using the provided repository, credentials and workspace to create the session.
        Parameters:
        config - fs config
        wspFilter - the workspace filter
        rep - the jcr repository
        credentials - the credentials
        mountpoint - the address of the mountpoint
        Returns:
        an artifact manager
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getDefaultConfig

        public static VaultFsConfig getDefaultConfig()
        Returns the default config
        Returns:
        the default config
      • getDefaultBinaryReferencesConfig

        public static VaultFsConfig getDefaultBinaryReferencesConfig()
        Returns the default config
        Returns:
        the default config
      • getDefaultWorkspaceFilter

        public static DefaultWorkspaceFilter getDefaultWorkspaceFilter()
        Returns the default workspace filter
        Returns:
        the default workspace filter
      • unmount

        public void unmount()
                     throws javax.jcr.RepositoryException
        Description copied from interface: AggregateManager
        Releases all resources attached to this artifact manager
        Specified by:
        unmount in interface AggregateManager
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getRoot

        public AggregateImpl getRoot()
                              throws javax.jcr.RepositoryException
        Description copied from interface: AggregateManager
        Returns the root aggregate of the tree
        Specified by:
        getRoot in interface AggregateManager
        Returns:
        the root aggregate.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • addNodeTypes

        public void addNodeTypes​(javax.jcr.Node node)
                          throws javax.jcr.RepositoryException
        Add the primary and mixin node types of that node to the internal set of used node types.
        Specified by:
        addNodeTypes in interface NodeTypesCollector
        Parameters:
        node - the node
        Throws:
        javax.jcr.RepositoryException - if an error occurs
      • getNamespaceURI

        public String getNamespaceURI​(String prefix)
                               throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • onAggregateCreated

        public void onAggregateCreated()
      • onAggregateCollected

        public void onAggregateCollected()
      • onAggregatePrepared

        public void onAggregatePrepared()
      • getAggregator

        public Aggregator getAggregator​(javax.jcr.Node node,
                                        String path)
                                 throws javax.jcr.RepositoryException
        Description copied from interface: AggregateManager
        Returns the aggregator for the given node or null if none found.
        Specified by:
        getAggregator in interface AggregateManager
        Parameters:
        node - for which the aggregator is to be returned
        path - the path of the node or null
        Returns:
        the aggregator or null
        Throws:
        javax.jcr.RepositoryException - if a repository error occurs.
      • writeAggregate

        public ImportInfo writeAggregate​(AggregateImpl node,
                                         String reposName,
                                         ArtifactSetImpl artifacts)
                                  throws javax.jcr.RepositoryException,
                                         IOException
        Writes the artifact set back to the repository.
        Parameters:
        node - the artifact node to write
        reposName - the name of the new node or null
        artifacts - the artifact to write
        Returns:
        infos about the modifications
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        IOException - if an I/O error occurs.
      • isMounted

        public boolean isMounted()
        Description copied from interface: AggregateManager
        Checks if this tree is still mounted and if the attached session is still live.
        Specified by:
        isMounted in interface AggregateManager
        Returns:
        true if still mounted
      • getUserId

        public String getUserId()
                         throws javax.jcr.RepositoryException
        Description copied from interface: AggregateManager
        Returns the user id of the session of this manager.
        Specified by:
        getUserId in interface AggregateManager
        Returns:
        the user id.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getWorkspace

        public String getWorkspace()
                            throws javax.jcr.RepositoryException
        Description copied from interface: AggregateManager
        Returns the name of the workspace of this manager.
        Specified by:
        getWorkspace in interface AggregateManager
        Returns:
        the name of the workspace.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getSession

        public javax.jcr.Session getSession()
        Description copied from interface: AggregateManager
        Returns the session of this manager.
        Specified by:
        getSession in interface AggregateManager
        Returns:
        the jcr session