|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.registry.core.session.ChrootWrapper
public class ChrootWrapper
Class providing the chroot related functionality. The instance of this is used by the UserRegistry to wrap all the operation for inputs and outputs with chroot
| Field Summary | |
|---|---|
protected String |
basePrefix
The base prefix. |
| Constructor Summary | |
|---|---|
ChrootWrapper(String basePrefix)
Construct a ChrootWrapper with a base prefix. |
|
| Method Summary | |
|---|---|
Collection |
filterSearchResult(Collection collection)
Filter search results, so the results outside the base prefix will be ignored and results inside the base prefix will be converted to relative paths. |
LogEntry[] |
fixLogEntries(LogEntry[] logEntries)
Convert the paths of the log entries to relative values. |
String |
getBasePrefix()
Method to return the base prefix. |
String |
getInPath(String path)
Get an absolute path for the given path argument, taking into account both initial double-slashes (indicating an absolute path) and any basePrefix that has been established. |
Association[] |
getOutAssociations(Association[] associations)
Return the associations array with converting all to relative paths. |
Collection |
getOutCollection(Collection collection)
When returning collection (with pagination) it need to unset the collection content. |
Comment[] |
getOutComments(Comment[] comments)
Method to return the comments with relative paths set. |
String |
getOutPath(String absolutePath)
Take an absolute path in the "real" registry and convert it to a relative path suitable for this particular RemoteRegistry (which may be rooted at a particular place). |
String[] |
getOutPaths(String[] absolutePaths)
returns a set of relative path for the provided absolute paths. |
Resource |
getOutResource(Resource resource)
The resource needed to be modified in case of out resource |
TaggedResourcePath[] |
getOutTaggedResourcePaths(TaggedResourcePath[] taggedResourcePaths)
Method to return the tagged resource after converting to relative paths |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String basePrefix
| Constructor Detail |
|---|
public ChrootWrapper(String basePrefix)
basePrefix - the base prefix.| Method Detail |
|---|
public String getBasePrefix()
public String getInPath(String path)
path - a relative path
public String getOutPath(String absolutePath)
absolutePath - a full path from the root of the registry, starting with "/"
public String[] getOutPaths(String[] absolutePaths)
absolutePaths - the array of absolute paths.
public Resource getOutResource(Resource resource)
throws RegistryException
resource - the resource that should prepared with chroot to return out.
RegistryException - throws if the operation failed.
public Collection getOutCollection(Collection collection)
throws RegistryException
collection - the collection to be prepared with chroot to return out.
RegistryException - throws if the operation failed.public Association[] getOutAssociations(Association[] associations)
associations - the associations that are in absolute paths.
public TaggedResourcePath[] getOutTaggedResourcePaths(TaggedResourcePath[] taggedResourcePaths)
taggedResourcePaths - the set of tagged resource paths.
public Comment[] getOutComments(Comment[] comments)
comments - the comments with absolute paths
public Collection filterSearchResult(Collection collection)
throws RegistryException
collection - unfiltered search results
RegistryException - throws if the operation failed.public LogEntry[] fixLogEntries(LogEntry[] logEntries)
logEntries - the array of log entries to be converted to relative paths.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||