|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.core.model.portal.PortalObjectPath
public class PortalObjectPath
A path for a portal object.
Nested Class Summary | |
---|---|
static class |
PortalObjectPath.CanonicalFormat
|
static class |
PortalObjectPath.Format
The format of a string representation of an id. |
static class |
PortalObjectPath.LegacyFormat
|
Field Summary | |
---|---|
static PortalObjectPath.Format |
CANONICAL_FORMAT
Canonical format, smth like /a/b/c. |
static PortalObjectPath.Format |
LEGACY_BASE64_FORMAT
|
static PortalObjectPath.Format |
LEGACY_FORMAT
The internal format when it is persisted, smth like a.b.c . |
static PortalObjectPath |
ROOT_PATH
This statement must be executed before the previous one otherwise the empty string array will be null. |
Constructor Summary | |
---|---|
PortalObjectPath()
|
|
PortalObjectPath(PortalObjectPath that)
Copy constructor. |
|
PortalObjectPath(java.lang.String[] names)
Build an id directly from its composing names. |
|
PortalObjectPath(java.lang.String value,
PortalObjectPath.Format format)
Build an id by parsing a string representation. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
Lexicographical order based implementation on the names atoms. |
boolean |
equals(java.lang.Object obj)
|
PortalObjectPath |
getChild(java.lang.String name)
|
int |
getLength()
|
java.lang.String |
getName(int index)
|
PortalObjectPath |
getParent()
Return the parent or null if this is the root id. |
int |
hashCode()
|
java.util.Iterator |
names()
Return an iterator over the different names. |
static PortalObjectPath |
parse(java.lang.String value,
PortalObjectPath.Format format)
|
java.lang.String |
toString()
Returns the canonical representation. |
java.lang.String |
toString(PortalObjectPath.Format format)
Returns a string representation using a specified format |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final PortalObjectPath ROOT_PATH
public static final PortalObjectPath.Format CANONICAL_FORMAT
public static final PortalObjectPath.Format LEGACY_FORMAT
public static final PortalObjectPath.Format LEGACY_BASE64_FORMAT
Constructor Detail |
---|
public PortalObjectPath()
public PortalObjectPath(PortalObjectPath that) throws java.lang.IllegalArgumentException
that
- the id to clone
java.lang.IllegalArgumentException
- if the argument to clone is nullpublic PortalObjectPath(java.lang.String[] names) throws java.lang.IllegalArgumentException
names
- the id names
java.lang.IllegalArgumentException
- if any argument is null or not well formedpublic PortalObjectPath(java.lang.String value, PortalObjectPath.Format format) throws java.lang.IllegalArgumentException
value
- the string representationformat
- the string format
java.lang.IllegalArgumentException
- if any argument is null or not well formedMethod Detail |
---|
public PortalObjectPath getParent()
public PortalObjectPath getChild(java.lang.String name)
public int getLength()
public java.lang.String getName(int index)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.util.Iterator names()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(PortalObjectPath.Format format)
format
- the output format
public static PortalObjectPath parse(java.lang.String value, PortalObjectPath.Format format)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |