public class JCRPost extends DefaultAmetysObject<JCRPostFactory> implements ModifiablePost
Modifier and Type | Field and Description |
---|---|
private static String |
METADATA_AUTHOR |
private static String |
METADATA_CONTENT |
private static String |
METADATA_CREATIONDATE |
private static String |
METADATA_LASTMODIFIED |
PROTECTED_PROPERTIES
Constructor and Description |
---|
JCRPost(Node node,
String parentPath,
JCRPostFactory factory)
Creates an
JCRPost . |
Modifier and Type | Method and Description |
---|---|
UserIdentity |
getAuthor()
Get the author of the post
|
ModifiableRichText |
getContent()
Get the content of the post
|
Date |
getCreationDate()
Get the post's creation date.
|
Date |
getLastModified()
Get the post's last modification date.
|
void |
setAuthor(UserIdentity author)
Set the author of this post.
|
void |
setCreationDate(Date startDate)
Set the post's creation date.
|
void |
setLastModified(Date date)
Set the post's modification date.
|
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, getAllLabels, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getAllRevisions, getBaseNode, getBaseVersion, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, getLabels, getLabels, getNode, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedMetadataHolder, getVersionHistory, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevision
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getMetadataHolder
needsSave, rename, revertChanges, saveChanges
equals, getId, getName, getParent, getParentPath, getPath, hashCode
private static final String METADATA_CONTENT
private static final String METADATA_AUTHOR
private static final String METADATA_CREATIONDATE
private static final String METADATA_LASTMODIFIED
public JCRPost(Node node, String parentPath, JCRPostFactory factory)
JCRPost
.node
- the node backing this AmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the JCRPostFactory which created the AmetysObjectpublic ModifiableRichText getContent()
ModifiablePost
getContent
in interface ModifiablePost
getContent
in interface Post
public UserIdentity getAuthor()
Post
public void setAuthor(UserIdentity author)
ModifiablePost
setAuthor
in interface ModifiablePost
author
- the authorpublic Date getCreationDate()
Post
getCreationDate
in interface Post
public void setCreationDate(Date startDate)
ModifiablePost
setCreationDate
in interface ModifiablePost
startDate
- the post's creation date.public Date getLastModified()
Post
getLastModified
in interface Post
public void setLastModified(Date date)
ModifiablePost
setLastModified
in interface ModifiablePost
date
- the last modification date to set.