|
||||||||||
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, dataSource, 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(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 |
Constructor Detail |
---|
public Comment()
public Comment(String commentText)
commentText
- the comment textMethod Detail |
---|
public String getText()
public void setText(String text)
text
- the textpublic String getUser()
public void setUser(String user)
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 Resource
getContent
in class ResourceImpl
RegistryException
- throws if the operation fail.public String getDescription()
getDescription
in interface Resource
getDescription
in class ResourceImpl
public String getCommentPath()
public void setCommentPath(String commentPath)
commentPath
- the comment pathpublic String getAuthorUserName()
getAuthorUserName
in interface Resource
getAuthorUserName
in class ResourceImpl
public long getCommentID()
public void setCommentID(long commentID)
commentID
- the comment id.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |