|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.portal.tools.resource.ResourceID
public abstract class ResourceID
Abstract, opaque, persistent resource identifier.
| Constructor Summary | |
|---|---|
protected |
ResourceID(ResourceIDBuilder builder)
Constructor. |
|
ResourceID(String resourceURN)
Constructor. |
| Method Summary | ||
|---|---|---|
protected abstract StringBuilder |
appendResourcePath(boolean canonicalResourceURN,
StringBuilder buffer)
Append the resource path of the referrent resource. |
|
protected StringBuilder |
appendResourceTypeNamespaceURI(StringBuilder buffer)
Append the namespace URI of the ResourceType. |
|
protected String |
computeResourceURN(boolean canonicalResourceURN)
Compute the URN of the referrent resource. |
|
protected StringBuilder |
computeResourceURN(boolean canonicalResourceURN,
StringBuilder buffer)
Compute the URN of the referrent resource. |
|
boolean |
equals(Object that)
Determine if the given Object
is equal to this ResourceID. |
|
String |
getCanonicalResourceURN()
Get the canonical URN of the referrent resource. |
|
ResourceEnvironment |
getResourceEnvironment()
Get the ResourceEnvironment of the referrent resource. |
|
protected ResourceIDBuilder |
getResourceIDBuilder()
Get the ResourceIDBuilder. |
|
ResourceType |
getResourceType()
Get the ResourceType of the referrent resource. |
|
String |
getResourceURN()
Get the URN of the referrent resource. |
|
int |
hashCode()
Get the hash code of this ResourceID. |
|
static
|
narrow(Class<T> type,
ResourceID resourceID)
Convert the given ResourceID to an
instance of the specified ResourceID type. |
|
protected void |
setCanonicalResourceURN(String canonicalResourceURN)
|
|
protected void |
setResourceURN(String resourceURN)
|
|
String |
toString()
Get a string representation of this ResourceID. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceID(String resourceURN)
resourceURN - the URN of the referrent resourceprotected ResourceID(ResourceIDBuilder builder)
builder - the ResourceIDBuilder
(must not be null)| Method Detail |
|---|
public static <T extends ResourceID> T narrow(Class<T> type,
ResourceID resourceID)
throws ResourceIDException
ResourceID to an
instance of the specified ResourceID type.
type - the desired ResourceID typeresourceID - the ResourceID
ResourceID
ResourceIDExceptionpublic final int hashCode()
ResourceID.
The hash code is computed from the canonical URN of the referrent resource.
hashCode in class ObjectResourceIDpublic final boolean equals(Object that)
Object
is equal to this ResourceID.
The given Object is considered
to be equal to this ResourceID if and only if
all of these statements are true:
Object is an instance of
ResourceID or a subtype of ResourceID.Object (a ResourceID)
has a ResourceType that equals
the ResourceType of this ResourceID.Object (a ResourceID)
has a canonical resource URN that is identical to
the canonical resource URN.
equals in class Objecttrue if the given Object
is equal to this ResourceID
and false otherwiseprotected ResourceIDBuilder getResourceIDBuilder()
ResourceIDBuilder.
ResourceIDBuilderpublic final ResourceType getResourceType()
ResourceType of the referrent resource.
ResourceType of the referrent resourcepublic ResourceEnvironment getResourceEnvironment()
ResourceEnvironment of the referrent resource.
ResourceEnvironment of the referrent resourcepublic final String getResourceURN()
protected void setResourceURN(String resourceURN)
public final String getCanonicalResourceURN()
This method may return null if the resource type
is invalid or unknown.
protected void setCanonicalResourceURN(String canonicalResourceURN)
protected String computeResourceURN(boolean canonicalResourceURN)
canonicalResourceURN - indicates if the canonical resource
URN should be computed
protected StringBuilder computeResourceURN(boolean canonicalResourceURN,
StringBuilder buffer)
buffer - the StringBuilder
for the URN of the referrent resourcecanonicalResourceURN - indlciates if the canonical resource
URN should be computed
StringBuilder
with the URN of the referrent resource appended to itprotected StringBuilder appendResourceTypeNamespaceURI(StringBuilder buffer)
ResourceType.
buffer - the StringBuilder
for the namespace URI of the ResourceType
StringBuilder
with the namespace URI of the ResourceType appended to it
protected abstract StringBuilder appendResourcePath(boolean canonicalResourceURN,
StringBuilder buffer)
buffer - the StringBuilder
for the resource path of the referrent resourcecanonicalResourceURN - indlciates if the canonical resource
URN should be computed
StringBuilder
with the resource path of the referrent resource appended to itpublic final String toString()
ResourceID.
This method returns the URN of the referrent resource.
toString in class ObjectResourceIDgetResourceURN()
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||