org.wso2.registry
Interface Resource

All Known Subinterfaces:
Collection
All Known Implementing Classes:
CollectionImpl, CollectionVersionImpl, Comment, RemoteResourceImpl, ResourceImpl, ResourceVersionImpl

public interface Resource


Method Summary
 void addAspect(java.lang.String name)
           
 void addProperty(java.lang.String key, java.lang.String value)
           
 void editPropertyValue(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)
           
 java.util.List<java.lang.String> getAspects()
           
 java.lang.String getAuthorUserName()
           
 java.lang.Object getContent()
           
 java.io.InputStream getContentStream()
           
 java.util.Date getCreatedTime()
           
 java.lang.String getDescription()
           
 java.lang.String getId()
           
 java.util.Date getLastModified()
           
 java.lang.String getLastUpdaterUserName()
           
 java.lang.String getMediaType()
           
 java.lang.String getParentPath()
           
 java.lang.String getPath()
           
 java.lang.String getPermanentPath()
          If resource is versioned, the associated version of the resource does not get modified by any means.
 java.util.Properties getProperties()
          Returns all properties of the resource.
 java.lang.String getProperty(java.lang.String key)
           
 java.util.List getPropertyValues(java.lang.String key)
          Returns the list of values for the given property name.
 int getState()
           
 void removeAspect(java.lang.String name)
           
 void removeProperty(java.lang.String key)
           
 void removePropertyValue(java.lang.String key, java.lang.String value)
           
 void setContent(java.lang.Object content)
           
 void setContentStream(java.io.InputStream contentStream)
           
 void setDescription(java.lang.String description)
           
 void setMediaType(java.lang.String mediaType)
           
 void setProperties(java.util.Properties properties)
           
 void setProperty(java.lang.String key, java.util.List<java.lang.String> value)
           
 void setProperty(java.lang.String key, java.lang.String value)
           
 

Method Detail

getId

java.lang.String getId()

getAuthorUserName

java.lang.String getAuthorUserName()

getCreatedTime

java.util.Date getCreatedTime()

getLastModified

java.util.Date getLastModified()

getDescription

java.lang.String getDescription()

setDescription

void setDescription(java.lang.String description)

getPath

java.lang.String getPath()

getPermanentPath

java.lang.String getPermanentPath()
If resource is versioned, the associated version of the resource does not get modified by any means. Therefore, the path of that version is the permanent path (permalink) of the current state of the resource.

Returns:
Permanent path (permalink) of the resource.

getMediaType

java.lang.String getMediaType()

getState

int getState()

setMediaType

void setMediaType(java.lang.String mediaType)

getParentPath

java.lang.String getParentPath()

getProperty

java.lang.String getProperty(java.lang.String key)

getPropertyValues

java.util.List getPropertyValues(java.lang.String key)
Returns the list of values for the given property name. Note that these values are read-only. Changes made to these values will not be persisted on putting the resource.

Parameters:
key - Key of the property.
Returns:
List of values of the given property key.

getProperties

java.util.Properties getProperties()
Returns all properties of the resource. Properties are stored as key (String) -> values (List) pairs. It is not recommended to use this method to access properties. Instead, use other property related Resource API methods provided. Note that these values are read-only. Changes made to these values will not be persisted on putting the resource.

Returns:
All properties of the resource.

setProperty

void setProperty(java.lang.String key,
                 java.lang.String value)

setProperty

void setProperty(java.lang.String key,
                 java.util.List<java.lang.String> value)

addProperty

void addProperty(java.lang.String key,
                 java.lang.String value)

setProperties

void setProperties(java.util.Properties properties)

editPropertyValue

void editPropertyValue(java.lang.String key,
                       java.lang.String oldValue,
                       java.lang.String newValue)

removeProperty

void removeProperty(java.lang.String key)

removePropertyValue

void removePropertyValue(java.lang.String key,
                         java.lang.String value)

getContent

java.lang.Object getContent()
                            throws RegistryException
Throws:
RegistryException

setContent

void setContent(java.lang.Object content)

getLastUpdaterUserName

java.lang.String getLastUpdaterUserName()

getContentStream

java.io.InputStream getContentStream()
                                     throws RegistryException
Throws:
RegistryException

setContentStream

void setContentStream(java.io.InputStream contentStream)

getAspects

java.util.List<java.lang.String> getAspects()

addAspect

void addAspect(java.lang.String name)

removeAspect

void removeAspect(java.lang.String name)


Copyright 2007 Apache Web Services Project. All Rights Reserved.