com.ibm.portal.cp.resources
Interface Resource

All Superinterfaces:
Identifiable, Localized, TimeStamped
All Known Subinterfaces:
CustomResource, ModifiableCustomResource, ModifiableResource
All Known Implementing Classes:
AbstractCustomResource

public interface Resource
extends Identifiable, TimeStamped, Localized

A resource, i.e. an entity uniquely identifiable (addressable) via an ObjectID or a URI. A URI is comprised of a (type) schema and an scheme specific part. The (type) schema and the scheme specific part are simple, unmanaged Strings. NoteIt is essential to implement the equals and the hashCode methods, a simple implementation might just delegate to the ObjectID implementation.

Since:
7.0.0
Note:
This interface is designed to be implemented by clients.

Method Summary
 java.util.Date getCreated()
          Returns a creation date related to the context used to create this Resource instance.
 java.util.Date getLastModified()
          Returns a modification date related to the context used to create this Resource instance.
 ObjectID getObjectID()
          Returns the ObjectID of this resource.
 java.lang.String getSchemeSpecificPart()
          Returns the scheme specific part of this resource.
 java.lang.String getTypeSchema()
          Returns the (type) schema of this resource.
 java.net.URI getURI()
          Returns the unique identifier of the object
 
Methods inherited from interface com.ibm.portal.Localized
getDescription, getLocales, getTitle
 

Method Detail

getObjectID

ObjectID getObjectID()
Returns the ObjectID of this resource.

Specified by:
getObjectID in interface Identifiable
Returns:
The ObjectID of this resource.

getTypeSchema

java.lang.String getTypeSchema()
Returns the (type) schema of this resource. Together with getSchemeSpecificPart() this forms the URI which identifies this resource.

Returns:
The (type) schema of this resource.

getSchemeSpecificPart

java.lang.String getSchemeSpecificPart()
Returns the scheme specific part of this resource. Together with getTypeSchema() this forms the URI which identifies this resource.

Returns:
The scheme specific part of this resource.

getURI

java.net.URI getURI()
                    throws java.net.URISyntaxException
Returns the unique identifier of the object

Returns:
URI of the object, never null
Throws:
java.net.URISyntaxException - - if the URL cannot be constructed

getCreated

java.util.Date getCreated()
Returns a creation date related to the context used to create this Resource instance.

Specified by:
getCreated in interface TimeStamped
Returns:
the creation date, never null.

getLastModified

java.util.Date getLastModified()
Returns a modification date related to the context used to create this Resource instance.

Specified by:
getLastModified in interface TimeStamped
Returns:
the modification date, never null.