Class JCRPost
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultAmetysObject<JCRPostFactory>
-
- org.ametys.plugins.explorer.threads.jcr.JCRPost
-
- All Implemented Interfaces:
ModifiablePost,Post,ACLAmetysObject,AmetysObject,JCRAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject
public class JCRPost extends DefaultAmetysObject<JCRPostFactory> implements ModifiablePost
Class representing of post, backed by a JCR node.
-
-
Field Summary
Fields Modifier and Type Field Description private static StringMETADATA_AUTHORprivate static StringMETADATA_CONTENTprivate static StringMETADATA_CREATIONDATEprivate static StringMETADATA_LASTMODIFIED-
Fields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description JCRPost(Node node, String parentPath, JCRPostFactory factory)Creates anJCRPost.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserIdentitygetAuthor()Get the author of the postModifiableRichTextgetContent()Get the content of the postDategetCreationDate()Get the post's creation date.DategetLastModified()Get the post's last modification date.voidsetAuthor(UserIdentity author)Set the author of this post.voidsetCreationDate(Date startDate)Set the post's creation date.voidsetLastModified(Date date)Set the post's modification date.-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, disallowInheritance, getAllLabels, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getAllRevisions, getBaseNode, getBaseVersion, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, getLabels, getLabels, getNode, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedDataHolder, getVersionHistory, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevision
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
-
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
-
-
-
Field Detail
-
METADATA_CONTENT
private static final String METADATA_CONTENT
- See Also:
- Constant Field Values
-
METADATA_AUTHOR
private static final String METADATA_AUTHOR
- See Also:
- Constant Field Values
-
METADATA_CREATIONDATE
private static final String METADATA_CREATIONDATE
- See Also:
- Constant Field Values
-
METADATA_LASTMODIFIED
private static final String METADATA_LASTMODIFIED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JCRPost
public JCRPost(Node node, String parentPath, JCRPostFactory factory)
Creates anJCRPost.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the JCRPostFactory which created the AmetysObject
-
-
Method Detail
-
getContent
public ModifiableRichText getContent()
Description copied from interface:ModifiablePostGet the content of the post- Specified by:
getContentin interfaceModifiablePost- Specified by:
getContentin interfacePost- Returns:
- The content of the post
-
getAuthor
public UserIdentity getAuthor()
Description copied from interface:PostGet the author of the post
-
setAuthor
public void setAuthor(UserIdentity author)
Description copied from interface:ModifiablePostSet the author of this post.- Specified by:
setAuthorin interfaceModifiablePost- Parameters:
author- the author
-
getCreationDate
public Date getCreationDate()
Description copied from interface:PostGet the post's creation date.- Specified by:
getCreationDatein interfacePost- Returns:
- the post's creation date.
-
setCreationDate
public void setCreationDate(Date startDate)
Description copied from interface:ModifiablePostSet the post's creation date.- Specified by:
setCreationDatein interfaceModifiablePost- Parameters:
startDate- the post's creation date.
-
getLastModified
public Date getLastModified()
Description copied from interface:PostGet the post's last modification date.- Specified by:
getLastModifiedin interfacePost- Returns:
- the post's last modification date.
-
setLastModified
public void setLastModified(Date date)
Description copied from interface:ModifiablePostSet the post's modification date.- Specified by:
setLastModifiedin interfaceModifiablePost- Parameters:
date- the last modification date to set.
-
-