public interface IURI extends Cloneable, Serializable
IURI is the interface used to represent an object that references a particular portal resource. All objects in the system can be looked up via an IURI.
All URIs point to one distinct object in the system. The URIs are looked up via the PortalSystem.lookup(com.webmethods.portal.system.IURI)
method, where the corresponding service resolves the URI into portal object. URIs are obtained via the PortalSystem.acquireURI(java.lang.String)
method, where the corresponding service constructs the unique URI for the object, and are in the form
/[service name]/[service dependent string]
.
Also URIs are pooled by default, meaning a reference should not be cached for a URI beyond the scope of a
request. If a URI is required to held for longer, use the clone()
method should be used to obtain
a non-pooled copy of the URI object.
Modifier and Type | Method and Description |
---|---|
Object |
clone()
This creates a non-pooled clone of the object.
|
String |
getSegment(int segment)
Get the specified segment.
|
String |
getSegments(int start)
Get the partial URI starting with the supplied segment to the end of the URI.
|
String |
getSegments(int start,
int end)
Get the segments that fall within the given range, inclusively.
|
String |
getServiceName()
Returns the service name to which the identified resource belongs,
or null if not determined.
|
int |
getSize()
Get the number of segments in this URI
|
void |
initialize(String uri)
Initialize this URI with the given String.
|
String |
toString()
Gets the resource's string id.
|
void initialize(String uri) throws PortalException
uri
- the String version of the URIPortalException
- if invalid uriString getServiceName()
int getSize()
String getSegment(int segment)
segment
- the index of the segment to retrieve (0 based)String getSegments(int start, int end)
start
- the starting segmentend
- the last segment to retrieveString getSegments(int start)
start
- the segment to start the URIObject clone() throws CloneNotSupportedException
CloneNotSupportedException