Class Comment
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.modules.comment.business.Comment
-
- All Implemented Interfaces:
fr.paris.lutece.plugins.extend.service.extender.facade.IExtendableResourceResult
public class Comment extends java.lang.Object implements fr.paris.lutece.plugins.extend.service.extender.facade.IExtendableResourceResultComment
-
-
Field Summary
Fields Modifier and Type Field Description static intCOMMENT_STATE_PUBLISHEDstatic intCOMMENT_STATE_UN_PUBLISHED
-
Constructor Summary
Constructors Constructor Description Comment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAvatar()Display the avatar of the comment's authorjava.lang.StringgetAvatarUrl()Display the avatar of the comment's authorjava.lang.StringgetBBCodeComment()Get the content of the comment interpreted as BBCodejava.lang.StringgetComment()Returns the commentintgetCommentOrder()java.sql.TimestampgetDateComment()Returns the date of the commentjava.sql.TimestampgetDateLastModif()Get the date of last modification of the commentjava.lang.StringgetEmail()Returns the email of the userjava.lang.StringgetEncryptedLuteceUserName()Get encrypted lutece user namejava.lang.StringgetExtendableResourceType()intgetFirstUnpublishedSubComment()Get the id of the first unpublished sub comment of this commentintgetIdComment()Returns the identifier of the objectjava.lang.StringgetIdExtendableResource()intgetIdParentComment()Get the id of the parent comment of this commentjava.lang.StringgetIpAddress()Returns the IP address of the userbooleangetIsAdminComment()Check if the comment has been written by an admin or by a front office userbooleangetIsImportant()java.util.List<Comment>getListSubComments()Get the list of sub comments of this commentjava.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action>getListWorkflowActions()Get the available actions of the workflow for this appointmentjava.lang.StringgetLuteceUserName()java.lang.StringgetName()Returns the name of the userintgetNumberSubComments()Get the number of sub comments of this commentbooleanisPinned()booleanisPublished()Gets the checks if is published.voidsetComment(java.lang.String strComment)Sets the commentvoidsetCommentOrder(int _nCommentOrder)specify comment order if a comment is pinnedvoidsetDateComment(java.sql.Timestamp dateComment)Sets the date of the commentvoidsetDateLastModif(java.sql.Timestamp dateLastModif)Set the date of last modification of the commentvoidsetEmail(java.lang.String strEmail)Sets the email of the uservoidsetExtendableResourceType(java.lang.String strExtendableResourceType)voidsetIdComment(int nIdComment)Sets the identifier of the objectvoidsetIdExtendableResource(java.lang.String strIdExtendableResource)voidsetIdParentComment(int nIdParentComment)Set the id of the parent comment of this commentvoidsetIpAddress(java.lang.String strIpAddress)Sets the IP address of the uservoidsetIsAdminComment(boolean bIsAdminComment)Set the admin written status of this commentvoidsetIsImportant(boolean _bIsImportant)voidsetListSubComments(java.util.List<Comment> listSubComments)Set the list of sub comments of this comment, and update the number of sub comments.voidsetListWorkflowActions(java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listWorkflowActions)Set the available actions of the workflow for this appointmentvoidsetLuteceUserName(java.lang.String _strLuteceUserName)set the lutece user namevoidsetName(java.lang.String strName)Sets the name of the uservoidsetNumberSubComments(int nNumberSubComments)Set the number of sub comments of this commentvoidsetPinned(boolean bPinned)voidsetPublished(boolean bIsPublished)Sets the published.
-
-
-
Field Detail
-
COMMENT_STATE_PUBLISHED
public static final int COMMENT_STATE_PUBLISHED
- See Also:
- Constant Field Values
-
COMMENT_STATE_UN_PUBLISHED
public static final int COMMENT_STATE_UN_PUBLISHED
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIdExtendableResource
public java.lang.String getIdExtendableResource()
- Specified by:
getIdExtendableResourcein interfacefr.paris.lutece.plugins.extend.service.extender.facade.IExtendableResourceResult- Returns:
- the strIdExtendableResource
-
setIdExtendableResource
public void setIdExtendableResource(java.lang.String strIdExtendableResource)
- Parameters:
strIdExtendableResource- the strIdExtendableResource to set
-
getExtendableResourceType
public java.lang.String getExtendableResourceType()
- Specified by:
getExtendableResourceTypein interfacefr.paris.lutece.plugins.extend.service.extender.facade.IExtendableResourceResult- Returns:
- the extendableResourceType
-
setExtendableResourceType
public void setExtendableResourceType(java.lang.String strExtendableResourceType)
- Parameters:
strExtendableResourceType- the extendableResourceType to set
-
getDateComment
public java.sql.Timestamp getDateComment()
Returns the date of the comment- Returns:
- the date of the comment
-
setDateComment
public void setDateComment(java.sql.Timestamp dateComment)
Sets the date of the comment- Parameters:
dateComment- the new date
-
getDateLastModif
public java.sql.Timestamp getDateLastModif()
Get the date of last modification of the comment- Returns:
- The date of last modification of the comment
-
setDateLastModif
public void setDateLastModif(java.sql.Timestamp dateLastModif)
Set the date of last modification of the comment- Parameters:
dateLastModif- The date of last modification of the comment
-
getIdComment
public int getIdComment()
Returns the identifier of the object- Returns:
- The identifier of the object
-
setIdComment
public void setIdComment(int nIdComment)
Sets the identifier of the object- Parameters:
nIdComment- the new identifier
-
isPublished
public boolean isPublished()
Gets the checks if is published.- Returns:
- the checks if is published
-
setPublished
public void setPublished(boolean bIsPublished)
Sets the published.- Parameters:
bIsPublished- the new published
-
getComment
public java.lang.String getComment()
Returns the comment- Returns:
- the comment
-
setComment
public void setComment(java.lang.String strComment)
Sets the comment- Parameters:
strComment- the new comment
-
getBBCodeComment
public java.lang.String getBBCodeComment()
Get the content of the comment interpreted as BBCode- Returns:
- The content of the comment interpreted as BBCode
-
getEmail
public java.lang.String getEmail()
Returns the email of the user- Returns:
- the email of the user
-
setEmail
public void setEmail(java.lang.String strEmail)
Sets the email of the user- Parameters:
strEmail- the new email
-
getIpAddress
public java.lang.String getIpAddress()
Returns the IP address of the user- Returns:
- the IP address of the user
-
setIpAddress
public void setIpAddress(java.lang.String strIpAddress)
Sets the IP address of the user- Parameters:
strIpAddress- the new IP address
-
getName
public java.lang.String getName()
Returns the name of the user- Returns:
- the name of the user
-
setName
public void setName(java.lang.String strName)
Sets the name of the user- Parameters:
strName- the new name
-
getIdParentComment
public int getIdParentComment()
Get the id of the parent comment of this comment- Returns:
- The id of the parent comment of this comment
-
setIdParentComment
public void setIdParentComment(int nIdParentComment)
Set the id of the parent comment of this comment- Parameters:
nIdParentComment- The id of the parent comment of this comment
-
getListSubComments
public java.util.List<Comment> getListSubComments()
Get the list of sub comments of this comment- Returns:
- The list of sub comments of this comment. An empty list means that this comment has no sub comment. A null value means that the sub comment list has not been initialized.
-
setListSubComments
public void setListSubComments(java.util.List<Comment> listSubComments)
Set the list of sub comments of this comment, and update the number of sub comments.- Parameters:
listSubComments- The list of sub comments of this comment.
-
getNumberSubComments
public int getNumberSubComments()
Get the number of sub comments of this comment- Returns:
- the number of sub comments of this comment, or -1 if this information is not known.
-
setNumberSubComments
public void setNumberSubComments(int nNumberSubComments)
Set the number of sub comments of this comment- Parameters:
nNumberSubComments- the number of sub comments of this comment, or -1 if this information is not known.
-
getIsAdminComment
public boolean getIsAdminComment()
Check if the comment has been written by an admin or by a front office user- Returns:
- True if the comment has been written by an admin, false otherwise
-
setIsAdminComment
public void setIsAdminComment(boolean bIsAdminComment)
Set the admin written status of this comment- Parameters:
bIsAdminComment- True if the comment has been written by an admin, false otherwise
-
getFirstUnpublishedSubComment
public int getFirstUnpublishedSubComment()
Get the id of the first unpublished sub comment of this comment- Returns:
- The id of the first unpublished sub comment, or 0 if it has no sub comments or no unpublished sub comments. 0 is also returned if sub comments of this comment have not been fetched.
-
getAvatar
public java.lang.String getAvatar()
Display the avatar of the comment's author- Returns:
- The HTML code of the avatar
-
getAvatarUrl
public java.lang.String getAvatarUrl()
Display the avatar of the comment's author- Returns:
- The HTML code of the avatar
-
getLuteceUserName
public java.lang.String getLuteceUserName()
- Returns:
- the lutece user name
-
setLuteceUserName
public void setLuteceUserName(java.lang.String _strLuteceUserName)
set the lutece user name- Parameters:
_strLuteceUserName- the lutece user name
-
isPinned
public boolean isPinned()
- Returns:
- true if the comment is pinned
-
setPinned
public void setPinned(boolean bPinned)
- Parameters:
bPinned- true if the comment is pinned
-
getCommentOrder
public int getCommentOrder()
- Returns:
- comment order if a comment is pinned
-
setCommentOrder
public void setCommentOrder(int _nCommentOrder)
specify comment order if a comment is pinned- Parameters:
_nCommentOrder- comment order if a comment is pinned
-
getIsImportant
public boolean getIsImportant()
- Returns:
- true if a comment is important
-
setIsImportant
public void setIsImportant(boolean _bIsImportant)
- Parameters:
_bIsImportant- btrue if a comment is important
-
getListWorkflowActions
public java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> getListWorkflowActions()
Get the available actions of the workflow for this appointment- Returns:
- the actions
-
setListWorkflowActions
public void setListWorkflowActions(java.util.Collection<fr.paris.lutece.plugins.workflowcore.business.action.Action> listWorkflowActions)
Set the available actions of the workflow for this appointment- Parameters:
listWorkflowActions-
-
getEncryptedLuteceUserName
public java.lang.String getEncryptedLuteceUserName()
Get encrypted lutece user name- Returns:
- encrypt lutece user name
-
-