org.springframework.extensions.surf.resource
Class AbstractResource

java.lang.Object
  extended by org.springframework.extensions.surf.resource.AbstractResource
All Implemented Interfaces:
Serializable, Resource
Direct Known Subclasses:
AlfrescoResource, CMISResource, URLResource, VirtualizedWebappResource

public abstract class AbstractResource
extends Object
implements Resource

Abstract implementation of a resource. Useful for developers who wish to implement new resource loaders and resource types. ResourceIds arrive in the following format: :///

Author:
muzquiano
See Also:
Serialized Form

Field Summary
protected  byte[] bytes
           
protected  String endpointId
           
protected  String name
           
protected  String objectId
           
protected  String protocolId
           
 
Constructor Summary
AbstractResource(String protocolId, String endpointId, String objectId)
           
 
Method Summary
 String getEndpointId()
          Returns the endpoint of the resource
 String getName()
          Gets the name.
 String getObjectId()
          Returns the object id of the resource
 String getProtocolId()
          Gets the protocol id
 String getResourceId()
          Gets the resource id.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.surf.resource.Resource
getContent, getContentURL, getMetadata, getMetadataURL, getObjectTypeId, isContainer
 

Field Detail

name

protected String name

protocolId

protected String protocolId

objectId

protected String objectId

endpointId

protected String endpointId

bytes

protected byte[] bytes
Constructor Detail

AbstractResource

public AbstractResource(String protocolId,
                        String endpointId,
                        String objectId)
Method Detail

getResourceId

public String getResourceId()
Description copied from interface: Resource
Gets the resource id.

Specified by:
getResourceId in interface Resource
Returns:
the resource id

getProtocolId

public String getProtocolId()
Description copied from interface: Resource
Gets the protocol id

Specified by:
getProtocolId in interface Resource
Returns:
the protocol id

getObjectId

public String getObjectId()
Description copied from interface: Resource
Returns the object id of the resource

Specified by:
getObjectId in interface Resource
Returns:
the object id

setObjectId

public void setObjectId(String objectId)
Description copied from interface: Resource
Sets the object id.

Specified by:
setObjectId in interface Resource
Parameters:
objectId - the new object id

setEndpointId

public void setEndpointId(String endpointId)
Description copied from interface: Resource
Sets the endpoint of the resource

Specified by:
setEndpointId in interface Resource

getEndpointId

public String getEndpointId()
Description copied from interface: Resource
Returns the endpoint of the resource

Specified by:
getEndpointId in interface Resource
Returns:
the endpoint

getName

public String getName()
Description copied from interface: Resource
Gets the name.

Specified by:
getName in interface Resource
Returns:
the name

setName

public void setName(String name)
Description copied from interface: Resource
Sets the name.

Specified by:
setName in interface Resource
Parameters:
name - the new name


Copyright © 2009 SpringSource, Inc. All Rights Reserved.