|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wso2.carbon.registry.core.ResourceImpl
org.wso2.carbon.registry.core.Comment
public class Comment
Represents comments and its meta data. Note that only the Comment.text field needs to be filled when adding new comments. All other attributes are ignored and they are filled with appropriate values for the current context. Therefore, when constructing an instance of this class outside the Registry impl, it is recommended to use new Comment("my comment text") constructor.
Field Summary |
---|
Fields inherited from class org.wso2.carbon.registry.core.ResourceImpl |
---|
authorUserName, content, contentModified, createdTime, dataAccessManager, dbBasedContentID, description, directory, id, lastModified, lastUpdaterUserName, matchingSnapshotID, mediaType, name, parentPath, path, pathID, permanentPath, properties, propertiesModified, resourceDAO, snapshotID, state, tenantId, userName, userRealm, versionableChange, versionNumber |
Constructor Summary | |
---|---|
Comment()
Default constructor to create an empty comment. |
|
Comment(Comment comment)
A copy constructor used to create a shallow-copy of this comment. |
|
Comment(String commentText)
Construct a comment with a text. |
Method Summary | |
---|---|
String |
getAuthorUserName()
Method to get the author user name. |
long |
getCommentID()
Method to get the comment id. |
String |
getCommentPath()
Method to get the comment path. |
Object |
getContent()
Get the comment text. |
String |
getDescription()
Get the description. |
String |
getResourcePath()
Get the path of the resource of the comment. |
String |
getText()
Get the comment text. |
Date |
getTime()
Deprecated. please use ResourceImpl.getCreatedTime() instead |
String |
getUser()
Get the commenting user. |
void |
setCommentID(long commentID)
Method to set the comment id. |
void |
setCommentPath(String commentPath)
Method to set the comment path. |
void |
setCreatedTime(Date createdTime)
Method to set the created time. |
void |
setResourcePath(String resourcePath)
Set the path of the resource of the comment. |
void |
setText(String text)
Set the comment text. |
void |
setTime(Date time)
Deprecated. please use setCreatedTime(java.util.Date) instead |
void |
setUser(String user)
Set the commenting user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.wso2.carbon.registry.api.Resource |
---|
addAspect, addProperty, discard, editPropertyValue, getAspects, getContentStream, getCreatedTime, getId, getLastModified, getLastUpdaterUserName, getMediaType, getParentPath, getPath, getPermanentPath, getProperties, getProperty, getPropertyValues, getState, removeAspect, removeProperty, removePropertyValue, setContent, setContentStream, setDescription, setMediaType, setProperties, setProperty, setProperty |
Constructor Detail |
---|
public Comment()
public Comment(String commentText)
commentText
- the comment textpublic Comment(Comment comment)
comment
- the comment of which the copy is created.Method Detail |
---|
public String getText()
getText
in interface org.wso2.carbon.registry.api.Comment
public void setText(String text)
setText
in interface org.wso2.carbon.registry.api.Comment
text
- the textpublic String getUser()
getUser
in interface org.wso2.carbon.registry.api.Comment
public void setUser(String user)
setUser
in interface org.wso2.carbon.registry.api.Comment
user
- the commenting user@Deprecated public Date getTime()
ResourceImpl.getCreatedTime()
instead
@Deprecated public void setTime(Date time)
setCreatedTime(java.util.Date)
instead
time
- the timepublic void setCreatedTime(Date createdTime)
setCreatedTime
in class ResourceImpl
createdTime
- the created time.public String getResourcePath()
public void setResourcePath(String resourcePath)
resourcePath
- the resource path.public Object getContent() throws RegistryException
getContent
in interface org.wso2.carbon.registry.api.Resource
getContent
in class ResourceImpl
RegistryException
- throws if the operation fail.public String getDescription()
getDescription
in interface org.wso2.carbon.registry.api.Resource
getDescription
in class ResourceImpl
public String getCommentPath()
getCommentPath
in interface org.wso2.carbon.registry.api.Comment
public void setCommentPath(String commentPath)
setCommentPath
in interface org.wso2.carbon.registry.api.Comment
commentPath
- the comment pathpublic String getAuthorUserName()
getAuthorUserName
in interface org.wso2.carbon.registry.api.Resource
getAuthorUserName
in class ResourceImpl
public long getCommentID()
getCommentID
in interface org.wso2.carbon.registry.api.Comment
public void setCommentID(long commentID)
setCommentID
in interface org.wso2.carbon.registry.api.Comment
commentID
- the comment id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |