|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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()
Compute the URN of the referrent resource. |
|
protected StringBuilder |
computeResourceURN(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()
Deprecated use getResourceURN() |
|
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
ResourceIDException
public final int hashCode()
ResourceID
.
The hash code is computed from the URN of the referrent resource.
hashCode
in class Object
ResourceID
public 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 resource URN that is identical to
the resource URN.
equals
in class Object
true
if the given Object
is equal to this ResourceID
and false
otherwiseprotected ResourceIDBuilder getResourceIDBuilder()
ResourceIDBuilder
.
ResourceIDBuilder
public 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()
getResourceURN()
This method may return null
if the resource type
is invalid or unknown.
protected void setCanonicalResourceURN(String canonicalResourceURN)
protected String computeResourceURN()
protected StringBuilder computeResourceURN(StringBuilder buffer)
buffer
- the StringBuilder
for the URN of the referrent resource
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 itprotected abstract StringBuilder appendResourcePath(boolean canonicalResourceURN, StringBuilder buffer)
buffer
- the StringBuilder
for the resource path of the referrent resourcecanonicalResourceURN
- indicates if the canonical resource
URN should be computed. Since this is no longer supported this should
always be true.
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 Object
ResourceID
getResourceURN()
|
Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |