Class HierarchicalContentProxy
- java.lang.Object
-
- ch.systemsx.cisd.openbis.common.io.hierarchical_content.api.HierarchicalContentProxy
-
- All Implemented Interfaces:
IHierarchicalContent
public class HierarchicalContentProxy extends java.lang.Object implements IHierarchicalContent
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExecuteOnAccessMethod(IHierarchicalContentExecuteOnAccess executeOnAccessMethod)voidclose()Cleans resources (e.g.booleanequals(java.lang.Object obj)IHierarchicalContentNodegetNode(java.lang.String relativePath)Returns node with specified relativePath starting from root node.static IHierarchicalContentgetProxyFor(IHierarchicalContent hierarchicalContent, java.util.List<IHierarchicalContentExecuteOnAccess> executeOnAccessList)IHierarchicalContentNodegetRootNode()Returns root node.inthashCode()java.util.List<IHierarchicalContentNode>listMatchingNodes(java.lang.String relativePathPattern)Returns list of all file nodes in this hierarchy with relative paths matching given relativePathPattern.java.util.List<IHierarchicalContentNode>listMatchingNodes(java.lang.String startingPath, java.lang.String fileNamePattern)Returns list of all file nodes in this hierarchy starting from startingPath with file names matching given fileNamePattern.java.lang.StringtoString()IHierarchicalContentNodetryGetNode(java.lang.String relativePath)Returns node with specified relativePath starting from root node, ornull, if this path does not exist.
-
-
-
Method Detail
-
getProxyFor
public static IHierarchicalContent getProxyFor(IHierarchicalContent hierarchicalContent, java.util.List<IHierarchicalContentExecuteOnAccess> executeOnAccessList)
-
addExecuteOnAccessMethod
public void addExecuteOnAccessMethod(IHierarchicalContentExecuteOnAccess executeOnAccessMethod)
-
getRootNode
public IHierarchicalContentNode getRootNode()
Description copied from interface:IHierarchicalContentReturns root node.- Specified by:
getRootNodein interfaceIHierarchicalContent
-
getNode
public IHierarchicalContentNode getNode(java.lang.String relativePath) throws java.lang.IllegalArgumentException
Description copied from interface:IHierarchicalContentReturns node with specified relativePath starting from root node. If the path isnullor an empty string then the root node is returned.- Specified by:
getNodein interfaceIHierarchicalContent- Throws:
java.lang.IllegalArgumentException- if resource with given relativePath doesn't exist under the root of this content.
-
tryGetNode
public IHierarchicalContentNode tryGetNode(java.lang.String relativePath)
Description copied from interface:IHierarchicalContentReturns node with specified relativePath starting from root node, ornull, if this path does not exist. If the path isnullor an empty string then the root node is returned.- Specified by:
tryGetNodein interfaceIHierarchicalContent
-
listMatchingNodes
public java.util.List<IHierarchicalContentNode> listMatchingNodes(java.lang.String relativePathPattern)
Description copied from interface:IHierarchicalContentReturns list of all file nodes in this hierarchy with relative paths matching given relativePathPattern.NOTE: this operation may be expensive for huge hierarchies. If prefix of relative path is constant use
IHierarchicalContent.listMatchingNodes(String, String)instead with pattern for filename.- Specified by:
listMatchingNodesin interfaceIHierarchicalContent
-
listMatchingNodes
public java.util.List<IHierarchicalContentNode> listMatchingNodes(java.lang.String startingPath, java.lang.String fileNamePattern)
Description copied from interface:IHierarchicalContentReturns list of all file nodes in this hierarchy starting from startingPath with file names matching given fileNamePattern.- Specified by:
listMatchingNodesin interfaceIHierarchicalContent- Parameters:
startingPath- Relative path from which the search should start. Use empty string to start in root.
-
close
public void close()
Description copied from interface:IHierarchicalContentCleans resources (e.g. releases locks) acquired to access this hierarchical content.For now accessing
IHierarchicalContentNodefrom a closed content doesn't fail immediately but it is unpredictable (e.g. files may no longer be accessible). One shouldn't call any methods ofIHierarchicalContentNode-s that were acquired from a content which is closed at the time of invocation of the methods. In future version such operations will fail immediately.- Specified by:
closein interfaceIHierarchicalContent
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-