|
||||||||||
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. |
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. |
Method Detail |
---|
String getId()
String getAuthorUserName()
Date getCreatedTime()
Date getLastModified()
String getDescription()
void setDescription(String description)
description
- the description.String getPath()
String getPermanentPath()
String getMediaType()
int getState()
void setMediaType(String mediaType)
mediaType
- the media type.String getParentPath()
String getProperty(String key)
key
- the property key.
List<String> getPropertyValues(String key)
key
- Key of the property.
Properties getProperties()
void setProperty(String key, String value)
key
- the property key.value
- the property value.void setProperty(String key, List<String> value)
key
- the property key.value
- the property values.void addProperty(String key, String value)
key
- the property key.value
- the property value.void setProperties(Properties properties)
properties
- the properties.void editPropertyValue(String key, String oldValue, String newValue)
key
- the key.oldValue
- the old value.newValue
- the new value.void removeProperty(String key)
key
- the property key.void removePropertyValue(String key, String value)
key
- the property key.value
- the property value.Object getContent() throws RegistryException
RegistryException
- throws if the operation fail.void setContent(Object content) throws RegistryException
content
- the resource.
RegistryException
- throws if the operation fail.String getLastUpdaterUserName()
InputStream getContentStream() throws RegistryException
RegistryException
- throws if the operation fail.void setContentStream(InputStream contentStream) throws RegistryException
contentStream
- the content stream to set.
RegistryException
- throws if the operation fail.List<String> getAspects()
void addAspect(String name)
name
- the name of the aspect.void removeAspect(String name)
name
- the name of the aspect to remove.void discard()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |