Class File
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<FileFactory>
org.ametys.plugins.repository.jcr.DefaultAmetysObject<FileFactory>
org.ametys.plugins.repository.jcr.DefaultLockableAmetysObject<FileFactory>
org.ametys.plugins.explorer.resources.jcr.JCRResource<FileFactory>
org.ametys.plugins.workspaces.documents.jcr.File
- All Implemented Interfaces:
CommentableAmetysObject<Comment>,ModifiableResource,Resource,ACLAmetysObject,AmetysObject,CopiableAmetysObject,DublinCoreAwareAmetysObject,ModifiableDublinCoreAwareAmetysObject,JCRAmetysObject,LockableAmetysObject,LockAwareAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,TrashableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject
Implementation of
Resource used for document module of workspaces and can handle comments, backed by a JCR node.-
Field Summary
Fields inherited from class org.ametys.plugins.explorer.resources.jcr.JCRResource
CONTRIBUTOR_NODE_NAME, CREATION_DATE, CREATOR_NODE_NAMEFields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
__VERSION_COMPARATOR, PROTECTED_PROPERTIES -
Constructor Summary
ConstructorsConstructorDescriptionFile(javax.jcr.Node node, String parentPath, FileFactory factory) Creates anFile. -
Method Summary
Modifier and TypeMethodDescriptionCreates a commentcreateComment(String commentId, ZonedDateTime creationDate) Creates a comment with the given id and creation date This method allow to create a comment from existing data (ex: data import from archive) The id is not generated here, the source is trusted.getComment(String commentId) Get a commentgetComments(boolean includeNotValidatedComments, boolean includeValidatedComments) Get the list of available comments (validated, not validated, both or none :))Methods inherited from class org.ametys.plugins.explorer.resources.jcr.JCRResource
copyTo, copyTo, getAuthorFromRevision, getCreationDate, getCreator, getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType, getInputStream, getKeywords, getKeywordsAsString, getLastContributor, getLastModified, getLength, getMimeType, getResourcePath, getTags, moveToTrash, restoreFromNode, restoreFromTrash, setCreationDate, setCreator, setData, setDCContributor, setDCCoverage, setDCCreator, setDCDate, setDCDescription, setDCFormat, setDCIdentifier, setDCLanguage, setDCPublisher, setDCRelation, setDCRights, setDCSource, setDCSubject, setDCTitle, setDCType, setKeywords, setKeywords, setLastContributor, setLastModified, setMimeType, tag, untagMethods inherited from class org.ametys.plugins.repository.jcr.DefaultLockableAmetysObject
getLockOwner, isLocked, lock, setLockInfoOnCurrentContext, unlockMethods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, disallowInheritance, getAllLabels, getAllRevisions, getBaseNode, getBaseVersion, getLabels, getLabels, getNode, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedDataHolder, getVersionHistory, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromRevision, switchToLabel, switchToRevisionMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.plugins.repository.lock.LockableAmetysObject
lock, setLockInfoOnCurrentContext, unlockMethods inherited from interface org.ametys.plugins.repository.lock.LockAwareAmetysObject
getLockOwner, isLockedMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Constructor Details
-
File
Creates anFile.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
createComment
Description copied from interface:CommentableAmetysObjectCreates a comment- Specified by:
createCommentin interfaceCommentableAmetysObject<Comment>- Returns:
- The new comment
-
createComment
Description copied from interface:CommentableAmetysObjectCreates a comment with the given id and creation date This method allow to create a comment from existing data (ex: data import from archive) The id is not generated here, the source is trusted. Be careful using this method- Specified by:
createCommentin interfaceCommentableAmetysObject<Comment>- Parameters:
commentId- the comment's idcreationDate- the comment's creation date- Returns:
- the new comment
-
getComment
Description copied from interface:CommentableAmetysObjectGet a comment- Specified by:
getCommentin interfaceCommentableAmetysObject<Comment>- Parameters:
commentId- The comment- Returns:
- The comment
- Throws:
AmetysRepositoryException- if error occurs
-
getComments
public List<Comment> getComments(boolean includeNotValidatedComments, boolean includeValidatedComments) throws AmetysRepositoryException Description copied from interface:CommentableAmetysObjectGet the list of available comments (validated, not validated, both or none :))- Specified by:
getCommentsin interfaceCommentableAmetysObject<Comment>- Parameters:
includeNotValidatedComments- true to get the non validated comments.includeValidatedComments- true to get the validated comment.- Returns:
- A non null list of comments on the ametys object.
- Throws:
AmetysRepositoryException- if an error occurred
-