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 String
METADATA_AUTHOR
private static String
METADATA_CONTENT
private static String
METADATA_CREATIONDATE
private static String
METADATA_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 UserIdentity
getAuthor()
Get the author of the postModifiableRichText
getContent()
Get the content of the postDate
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.-
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 thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the JCRPostFactory which created the AmetysObject
-
-
Method Detail
-
getContent
public ModifiableRichText getContent()
Description copied from interface:ModifiablePost
Get the content of the post- Specified by:
getContent
in interfaceModifiablePost
- Specified by:
getContent
in interfacePost
- Returns:
- The content of the post
-
getAuthor
public UserIdentity getAuthor()
Description copied from interface:Post
Get the author of the post
-
setAuthor
public void setAuthor(UserIdentity author)
Description copied from interface:ModifiablePost
Set the author of this post.- Specified by:
setAuthor
in interfaceModifiablePost
- Parameters:
author
- the author
-
getCreationDate
public Date getCreationDate()
Description copied from interface:Post
Get the post's creation date.- Specified by:
getCreationDate
in interfacePost
- Returns:
- the post's creation date.
-
setCreationDate
public void setCreationDate(Date startDate)
Description copied from interface:ModifiablePost
Set the post's creation date.- Specified by:
setCreationDate
in interfaceModifiablePost
- Parameters:
startDate
- the post's creation date.
-
getLastModified
public Date getLastModified()
Description copied from interface:Post
Get the post's last modification date.- Specified by:
getLastModified
in interfacePost
- Returns:
- the post's last modification date.
-
setLastModified
public void setLastModified(Date date)
Description copied from interface:ModifiablePost
Set the post's modification date.- Specified by:
setLastModified
in interfaceModifiablePost
- Parameters:
date
- the last modification date to set.
-
-