org.springframework.extensions.surf.resource
Interface Resource

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractResource, AlfrescoResource, CMISResource, URLResource, VirtualizedWebappResource

public interface Resource
extends Serializable

Describes a resource whose binary content retrieval and referencing is resolved by the Web Framework. The following are all valid resources: - a URL describing an image on a remote server - an asset in the web application at a relative path - a document in a CMIS repository at a specific location

Author:
muzquiano

Method Summary
 ResourceContent getContent()
          Gets the content for this resource.
 String getContentURL()
          Gets the content url.
 String getEndpointId()
          Returns the endpoint of the resource
 ResourceContent getMetadata()
          Gets the metadata for this resource.
 String getMetadataURL()
          Gets the metadata url.
 String getName()
          Gets the name.
 String getObjectId()
          Returns the object id of the resource
 String getObjectTypeId()
          Gets the object type id.
 String getProtocolId()
          Gets the protocol id
 String getResourceId()
          Gets the resource id.
 boolean isContainer()
          Checks if the resource is a container.
 void setEndpointId(String endpointId)
          Sets the endpoint of the resource
 void setName(String name)
          Sets the name.
 void setObjectId(String objectId)
          Sets the object id.
 

Method Detail

getResourceId

String getResourceId()
Gets the resource id.

Returns:
the resource id

getProtocolId

String getProtocolId()
Gets the protocol id

Returns:
the protocol id

getObjectId

String getObjectId()
Returns the object id of the resource

Returns:
the object id

setObjectId

void setObjectId(String objectId)
Sets the object id.

Parameters:
objectId - the new object id

getEndpointId

String getEndpointId()
Returns the endpoint of the resource

Returns:
the endpoint

setEndpointId

void setEndpointId(String endpointId)
Sets the endpoint of the resource

Parameters:
endpoint -

getName

String getName()
Gets the name.

Returns:
the name

setName

void setName(String name)
Sets the name.

Parameters:
name - the new name

getMetadata

ResourceContent getMetadata()
                            throws IOException
Gets the metadata for this resource. If there is no metadata for this resource, null will be returned.

Returns:
the metadata or null
Throws:
IOException

getContent

ResourceContent getContent()
                           throws IOException
Gets the content for this resource. If there is no content for this resource, null will be returned.

Returns:
the content or null.
Throws:
IOException

getMetadataURL

String getMetadataURL()
Gets the metadata url. If there is no metadata url for this resource, null will be returned.

Returns:
the metadata url or null.

getContentURL

String getContentURL()
Gets the content url. If there is no content url for this resource, null will be returned.

Returns:
the content url

getObjectTypeId

String getObjectTypeId()
Gets the object type id.

Returns:
the object type id

isContainer

boolean isContainer()
Checks if the resource is a container.

Returns:
true, if is container


Copyright © 2009 SpringSource, Inc. All Rights Reserved.