|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.registry.ResourceImpl
public class ResourceImpl
Represents any file or collection stored in the registry. It encapsulates both the content of the entity and its metadata. In addition to files and collections, instances of Resource are used to represent results of runtime queries. In such secenarios, comments, tags, ratings as well as collections of comments, etc. are also represented by Resource objects. Each resource instance contains a unique path within a Registry instance. Registry.get(...) method invocation using this path gives an instance of that resource. This path can be combined with the base URL of the registry server to generate a URI for the resource.
Field Summary | |
---|---|
protected java.lang.Object |
content
Content of the resource. |
protected java.util.List<java.lang.String> |
dependencies
Paths of the resources on which this resource depends on. |
protected java.util.List<java.lang.String> |
dependents
Paths of the resources that depends on this resource. |
protected java.util.Properties |
properties
Properties associated with the resource. |
Constructor Summary | |
---|---|
ResourceImpl()
|
Method Summary | |
---|---|
void |
addDependency(java.lang.String dependencyPath)
|
void |
addDependent(java.lang.String dependentPath)
|
void |
addProperty(java.lang.String key,
java.lang.String value)
|
java.lang.String |
getAuthorUserName()
|
java.lang.Object |
getContent()
|
java.io.InputStream |
getContentStream()
|
java.util.Date |
getCreatedTime()
|
java.lang.String[] |
getDependencies()
|
java.lang.String[] |
getDependents()
|
java.lang.String |
getDescription()
|
long |
getId()
|
java.util.Date |
getLastModified()
|
java.lang.String |
getLastUpdaterUserName()
|
java.lang.String |
getMediaType()
|
java.lang.String |
getParentPath()
|
java.lang.String |
getPath()
|
java.util.Properties |
getProperties()
|
java.lang.String |
getProperty(java.lang.String key)
|
java.util.List |
getPropertyValues(java.lang.String key)
|
int |
getState()
|
long |
getVersionNumber()
|
boolean |
isContentModified()
|
boolean |
isDirectory()
|
void |
setAuthorUserName(java.lang.String authorUserName)
|
void |
setContent(java.lang.Object content)
|
void |
setContentModified(boolean contentModified)
This method is used to explicitly set the content modified state of the resource. |
void |
setContentStream(java.io.InputStream contentStream)
|
void |
setCreatedTime(java.util.Date createdTime)
|
void |
setDataSource(javax.sql.DataSource dataSource)
|
void |
setDependencies(java.lang.String[] dependencies)
|
void |
setDependents(java.lang.String[] dependents)
|
void |
setDescription(java.lang.String description)
|
void |
setId(long id)
|
void |
setLastModified(java.util.Date lastModified)
|
void |
setLastUpdaterUserName(java.lang.String lastUpdaterUserName)
|
void |
setMediaType(java.lang.String mediaType)
|
void |
setParentPath(java.lang.String parentPath)
|
void |
setPath(java.lang.String path)
|
void |
setProperties(java.util.Properties properties)
|
void |
setProperty(java.lang.String key,
java.lang.String value)
|
void |
setState(int state)
|
void |
setVersionNumber(long versionNumber)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Properties properties
protected java.util.List<java.lang.String> dependencies
protected java.util.List<java.lang.String> dependents
protected java.lang.Object content
Constructor Detail |
---|
public ResourceImpl()
Method Detail |
---|
public void setDataSource(javax.sql.DataSource dataSource)
public long getId()
public void setId(long id)
public long getVersionNumber()
public void setVersionNumber(long versionNumber)
public java.lang.String getAuthorUserName()
getAuthorUserName
in interface Resource
public void setAuthorUserName(java.lang.String authorUserName)
public java.util.Date getCreatedTime()
getCreatedTime
in interface Resource
public void setCreatedTime(java.util.Date createdTime)
public java.util.Date getLastModified()
getLastModified
in interface Resource
public void setLastModified(java.util.Date lastModified)
public java.lang.String getDescription()
getDescription
in interface Resource
public void setDescription(java.lang.String description)
setDescription
in interface Resource
public java.lang.String getPath()
getPath
in interface Resource
public void setPath(java.lang.String path)
public java.lang.String getMediaType()
getMediaType
in interface Resource
public void setMediaType(java.lang.String mediaType)
setMediaType
in interface Resource
public java.lang.String getParentPath()
getParentPath
in interface Resource
public void setParentPath(java.lang.String parentPath)
public int getState()
getState
in interface Resource
public void setState(int state)
public java.lang.String getProperty(java.lang.String key)
getProperty
in interface Resource
public java.util.List getPropertyValues(java.lang.String key)
getPropertyValues
in interface Resource
public java.util.Properties getProperties()
getProperties
in interface Resource
public void setProperty(java.lang.String key, java.lang.String value)
setProperty
in interface Resource
public void addProperty(java.lang.String key, java.lang.String value)
addProperty
in interface Resource
public void setProperties(java.util.Properties properties)
setProperties
in interface Resource
public java.io.InputStream getContentStream() throws RegistryException
getContentStream
in interface Resource
RegistryException
public void setContentStream(java.io.InputStream contentStream)
setContentStream
in interface Resource
public java.lang.Object getContent() throws RegistryException
getContent
in interface Resource
RegistryException
public void setContent(java.lang.Object content)
setContent
in interface Resource
public java.lang.String getLastUpdaterUserName()
getLastUpdaterUserName
in interface Resource
public void setLastUpdaterUserName(java.lang.String lastUpdaterUserName)
public boolean isDirectory()
public java.lang.String[] getDependents()
getDependents
in interface Resource
public void setDependents(java.lang.String[] dependents)
setDependents
in interface Resource
public void addDependent(java.lang.String dependentPath)
addDependent
in interface Resource
public java.lang.String[] getDependencies()
getDependencies
in interface Resource
public void setDependencies(java.lang.String[] dependencies)
setDependencies
in interface Resource
public void addDependency(java.lang.String dependencyPath)
addDependency
in interface Resource
public boolean isContentModified()
public void setContentModified(boolean contentModified)
contentModified
- true if we want to add a new version upon putting this to the
registry. false otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |