|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Resource
Interface to represent a resource.
| Method Summary | |
|---|---|
void |
addAspect(String name)
Method to add an aspect. |
void |
addProperty(String key,
String value)
Add a property value for the provided key. |
void |
discard()
Method to discard the resource |
void |
editPropertyValue(String key,
String oldValue,
String newValue)
Edit property value. |
List<String> |
getAspects()
Get the aspects associated with the resource. |
String |
getAuthorUserName()
Get the user name of the resource author. |
Object |
getContent()
Method to get the content of the resource. |
InputStream |
getContentStream()
Method to get the content stream. |
Date |
getCreatedTime()
Method to get the created time. |
String |
getDescription()
Method to get the description. |
String |
getId()
The Resource ID, In the default implementation this returns the path. |
Date |
getLastModified()
Method to get the last modified date. |
String |
getLastUpdaterUserName()
Method to get the last updated user name. |
String |
getMediaType()
Get media type. |
String |
getParentPath()
Get the parent path. |
String |
getPath()
Method to get the path. |
String |
getPermanentPath()
If resource is version-ed, the associated version of the resource does not get modified by any means. |
Properties |
getProperties()
Returns all properties of the resource. |
String |
getProperty(String key)
Get the property value for the given key, if there are multiple value for that key, it will return the first value. |
List<String> |
getPropertyValues(String key)
Returns the list of values for the given property name. |
int |
getState()
Method to get the state. |
String |
getUUID()
Method to get the UUID of a resource |
boolean |
isVersionableChange()
Check whether there are any changes that need to make a version |
void |
removeAspect(String name)
Method to remove an aspect. |
void |
removeProperty(String key)
Remove property. |
void |
removePropertyValue(String key,
String value)
Remove property value. |
void |
setContent(Object content)
Set the content of the resource. |
void |
setContentStream(InputStream contentStream)
Method to set the content stream. |
void |
setDescription(String description)
Method to set the description. |
void |
setMediaType(String mediaType)
Set media type. |
void |
setProperties(Properties properties)
Set properties. |
void |
setProperty(String key,
List<String> value)
Set a property with multiple value. |
void |
setProperty(String key,
String value)
Set a property with single value. |
void |
setUUID(String uuid)
Method to set the UUID for a resource |
void |
setVersionableChange(boolean versionableChange)
Method to set whether there are any changes that need to make a version |
| Method Detail |
|---|
String getId()
getId in interface org.wso2.carbon.registry.api.ResourceString getAuthorUserName()
getAuthorUserName in interface org.wso2.carbon.registry.api.ResourceDate getCreatedTime()
getCreatedTime in interface org.wso2.carbon.registry.api.ResourceDate getLastModified()
getLastModified in interface org.wso2.carbon.registry.api.ResourceString getDescription()
getDescription in interface org.wso2.carbon.registry.api.Resourcevoid setDescription(String description)
setDescription in interface org.wso2.carbon.registry.api.Resourcedescription - the description.String getPath()
getPath in interface org.wso2.carbon.registry.api.ResourceString getPermanentPath()
getPermanentPath in interface org.wso2.carbon.registry.api.ResourceString getMediaType()
getMediaType in interface org.wso2.carbon.registry.api.Resourceint getState()
getState in interface org.wso2.carbon.registry.api.Resourcevoid setMediaType(String mediaType)
setMediaType in interface org.wso2.carbon.registry.api.ResourcemediaType - the media type.String getParentPath()
getParentPath in interface org.wso2.carbon.registry.api.ResourceString getProperty(String key)
getProperty in interface org.wso2.carbon.registry.api.Resourcekey - the property key.
List<String> getPropertyValues(String key)
getPropertyValues in interface org.wso2.carbon.registry.api.Resourcekey - Key of the property.
Properties getProperties()
getProperties in interface org.wso2.carbon.registry.api.Resource
void setProperty(String key,
String value)
setProperty in interface org.wso2.carbon.registry.api.Resourcekey - the property key.value - the property value.
void setProperty(String key,
List<String> value)
setProperty in interface org.wso2.carbon.registry.api.Resourcekey - the property key.value - the property values.
void addProperty(String key,
String value)
addProperty in interface org.wso2.carbon.registry.api.Resourcekey - the property key.value - the property value.void setProperties(Properties properties)
setProperties in interface org.wso2.carbon.registry.api.Resourceproperties - the properties.
void editPropertyValue(String key,
String oldValue,
String newValue)
editPropertyValue in interface org.wso2.carbon.registry.api.Resourcekey - the key.oldValue - the old value.newValue - the new value.void removeProperty(String key)
removeProperty in interface org.wso2.carbon.registry.api.Resourcekey - the property key.
void removePropertyValue(String key,
String value)
removePropertyValue in interface org.wso2.carbon.registry.api.Resourcekey - the property key.value - the property value.
Object getContent()
throws RegistryException
getContent in interface org.wso2.carbon.registry.api.ResourceRegistryException - throws if the operation fail.
void setContent(Object content)
throws RegistryException
setContent in interface org.wso2.carbon.registry.api.Resourcecontent - the resource.
RegistryException - throws if the operation fail.String getLastUpdaterUserName()
getLastUpdaterUserName in interface org.wso2.carbon.registry.api.Resource
InputStream getContentStream()
throws RegistryException
getContentStream in interface org.wso2.carbon.registry.api.ResourceRegistryException - throws if the operation fail.
void setContentStream(InputStream contentStream)
throws RegistryException
setContentStream in interface org.wso2.carbon.registry.api.ResourcecontentStream - the content stream to set.
RegistryException - throws if the operation fail.List<String> getAspects()
getAspects in interface org.wso2.carbon.registry.api.Resourcevoid addAspect(String name)
addAspect in interface org.wso2.carbon.registry.api.Resourcename - the name of the aspect.void removeAspect(String name)
removeAspect in interface org.wso2.carbon.registry.api.Resourcename - the name of the aspect to remove.void discard()
discard in interface org.wso2.carbon.registry.api.Resourceboolean isVersionableChange()
void setVersionableChange(boolean versionableChange)
versionableChange - whether version-able change is made or not.void setUUID(String uuid)
uuid - the UUID to be set to the resourceString getUUID()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||