Package com.wavemaker.commons.io
Class JailedResourcePath
- java.lang.Object
-
- com.wavemaker.commons.io.JailedResourcePath
-
public final class JailedResourcePath extends java.lang.ObjectAResourcePaththat is jailed to a specific location.
-
-
Constructor Summary
Constructors Constructor Description JailedResourcePath()Create a newJailedResourcePathwith a root jail and root path.JailedResourcePath(ResourcePath jailPath, ResourcePath path)Create a newJailedResourcePathinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)JailedResourcePathget(java.lang.String path)Get a new path relative to this one.ResourcePathgetJailPath()Returns the jail path.JailedResourcePathgetParent()Returns the parentJailedResourcePathof this instance or null if there is no parent.ResourcePathgetPath()Returns the path.ResourcePathgetUnjailedPath()Returns the complete unjailed pathinthashCode()java.lang.StringtoString()Return thepathstring.java.lang.StringtoString(ResourceStringFormat format)JailedResourcePathunjail()Unjail the specified resource path
-
-
-
Constructor Detail
-
JailedResourcePath
public JailedResourcePath(ResourcePath jailPath, ResourcePath path)
Create a newJailedResourcePathinstance.- Parameters:
jailPath- the jail pathpath- the path
-
JailedResourcePath
public JailedResourcePath()
Create a newJailedResourcePathwith a root jail and root path.
-
-
Method Detail
-
getJailPath
public ResourcePath getJailPath()
Returns the jail path.- Returns:
- the jail
-
getPath
public ResourcePath getPath()
Returns the path.- Returns:
- the path
-
getParent
public JailedResourcePath getParent()
Returns the parentJailedResourcePathof this instance or null if there is no parent.- Returns:
- the parent.
-
get
public JailedResourcePath get(java.lang.String path)
Get a new path relative to this one.- Parameters:
path- the path- Returns:
- a new
JailedResourcePath
-
getUnjailedPath
public ResourcePath getUnjailedPath()
Returns the complete unjailed path- Returns:
- the unjailed path
-
unjail
public JailedResourcePath unjail()
Unjail the specified resource path- Returns:
- the unjailed version
-
toString
public java.lang.String toString()
Return thepathstring.- Overrides:
toStringin classjava.lang.Object
-
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(ResourceStringFormat format)
-
-