Class AggregateImpl
java.lang.Object
org.apache.jackrabbit.vault.fs.impl.AggregateImpl
Collects the items that form an aggregate. The aggregates form a tree on top
of the repository one by invoking the respective aggregators. The aggregates
are controlled via the
AggregateManagerImpl and are loaded dynamically
when traversing through the tree.
The aggregates can then later be used by the aggregators to provide the artifacts of this aggregate.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAggregateImpl(AggregateImpl parent, String path, Aggregator aggregator) Creates a new sub aggregateprotectedAggregateImpl(AggregateManagerImpl mgr, String path, Aggregator aggregator) Creates a new root aggregate -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this artifact node possibly allows children, i.e. is a folder.Creates a new child artifact node with the given name.voiddump(DumpContext ctx, boolean isLast) Dumps some human readable information using the given context.getAggregate(String relPath) Returns the artifacts of this node.Returns the collection of binary properties in this aggregateReturns an artifact output for this node that allows writing the artifacts.Returns the leaves of this aggregate ornull.Returns the artifact manager this node belongs to.getName()Returns the name of this aggregate.String[]getNamespaceURI(String prefix) getNode()getPath()Returns the relative path of this aggregate in respect to it's parent aggregate.Returns the (absolute) repository address to the node that this artifact node represents.booleanhasNode()voidbooleanChecks if this aggregate has an aggregator and its node exists.remove(boolean recursive) Removes this artifact node from the tree.voidwalk(org.apache.jackrabbit.vault.fs.impl.io.AggregateWalkListener aggregateWalkListener) Walks the node tree and invokes the callbacks in the listener according to the configured filters.
-
Field Details
-
log
protected static final org.slf4j.Logger logThe default logger
-
-
Constructor Details
-
AggregateImpl
protected AggregateImpl(AggregateManagerImpl mgr, String path, Aggregator aggregator) throws RepositoryException Creates a new root aggregate- Parameters:
mgr- Aggregate managerpath- the path of the aggregateaggregator- aggregator- Throws:
RepositoryException- if a error occurs
-
AggregateImpl
protected AggregateImpl(AggregateImpl parent, String path, Aggregator aggregator) throws RepositoryException Creates a new sub aggregate- Parameters:
parent- parent aggregatepath- path of aggregateaggregator- aggregator- Throws:
RepositoryException- if a error occurs
-
-
Method Details
-
getNode
- Specified by:
getNodein interfaceAggregate- Throws:
RepositoryException
-
hasNode
- Specified by:
hasNodein interfaceAggregate- Throws:
RepositoryException
-
invalidate
public void invalidate() -
getParent
-
getPath
-
getRepositoryAddress
Description copied from interface:AggregateReturns the (absolute) repository address to the node that this artifact node represents.- Specified by:
getRepositoryAddressin interfaceAggregate- Returns:
- the repository address
- Throws:
RepositoryException- if an error occurs.
-
allowsChildren
public boolean allowsChildren()Description copied from interface:AggregateChecks if this artifact node possibly allows children, i.e. is a folder.- Specified by:
allowsChildrenin interfaceAggregate- Returns:
trueif this artifact node allows children;falseotherwise.
-
getRelPath
Description copied from interface:AggregateReturns the relative path of this aggregate in respect to it's parent aggregate.- Specified by:
getRelPathin interfaceAggregate- Returns:
- the relative path
-
getName
Description copied from interface:AggregateReturns the name of this aggregate. -
getLeaves
Description copied from interface:AggregateReturns the leaves of this aggregate ornull.- Specified by:
getLeavesin interfaceAggregate- Returns:
- the leaves
- Throws:
RepositoryException- if an error occurs
-
getAggregate
- Specified by:
getAggregatein interfaceAggregate- Throws:
RepositoryException
-
getArtifacts
Description copied from interface:AggregateReturns the artifacts of this node.- Specified by:
getArtifactsin interfaceAggregate- Returns:
- the artifacts
- Throws:
RepositoryException- if this file is not attached to the fs, yet.
-
getBuilder
Returns an artifact output for this node that allows writing the artifacts.- Returns:
- an artifact output.
- Throws:
RepositoryException- if this file is not attached to the fs, yet.
-
create
Creates a new child artifact node with the given name. Please note, that the returned node is not attached to the tree.If this artifact node does not allow children a RepositoryException is thrown.
- Parameters:
reposName- the (repository) name for the new node- Returns:
- a new child node.
- Throws:
RepositoryException- if an error occurs.
-
remove
Removes this artifact node from the tree. If this artifact node has directory and non-directory artifacts only the non-directory artifacts are removed unlessrecursiveis specified.- Parameters:
recursive- specifies if directories are removed as well.- Returns:
- infos about the modifications
- Throws:
RepositoryException- if an error occurs.
-
getManager
Description copied from interface:AggregateReturns the artifact manager this node belongs to.- Specified by:
getManagerin interfaceAggregate- Returns:
- the Vault filesystem.
-
isAttached
Description copied from interface:AggregateChecks if this aggregate has an aggregator and its node exists.- Specified by:
isAttachedin interfaceAggregate- Returns:
trueif this aggregate is attached- Throws:
RepositoryException- if an error occurs
-
dump
Dumps some human readable information using the given context. -
getNamespacePrefixes
- Specified by:
getNamespacePrefixesin interfaceAggregate
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceAggregate- Throws:
RepositoryException
-
getBinaries
Description copied from interface:AggregateReturns the collection of binary properties in this aggregate- Specified by:
getBinariesin interfaceAggregate- Returns:
- the binaries or
null
-
walk
public void walk(org.apache.jackrabbit.vault.fs.impl.io.AggregateWalkListener aggregateWalkListener) throws RepositoryException Walks the node tree and invokes the callbacks in the listener according to the configured filters. For each tree there are the following events generated: events := OnWalkBegin { nodeEvent } OnWalkEnd; nodeEvent := OnNodeBegin { propEvent } OnChildBegin { nodeEvent } OnNodeEnd; propEvent := OnProperty;- Parameters:
aggregateWalkListener- the listener that receives the events- Throws:
RepositoryException- if an repository error occurs.
-