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 SummaryFields inherited from class org.ametys.plugins.explorer.resources.jcr.JCRResourceCONTRIBUTOR_NODE_NAME, CREATION_DATE, CREATOR_NODE_NAMEFields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject__VERSION_COMPARATOR, PROTECTED_PROPERTIES
- 
Constructor SummaryConstructorsConstructorDescriptionFile(javax.jcr.Node node, String parentPath, FileFactory factory) Creates anFile.
- 
Method SummaryModifier 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.JCRResourcecopyTo, 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.DefaultLockableAmetysObjectgetLockOwner, isLocked, lock, setLockInfoOnCurrentContext, unlockMethods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObjectaddAllowedGroups, 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.AbstractAmetysObjectequals, hashCode, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObjectequals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObjectgetNodeMethods inherited from interface org.ametys.plugins.repository.lock.LockableAmetysObjectlock, setLockInfoOnCurrentContext, unlockMethods inherited from interface org.ametys.plugins.repository.lock.LockAwareAmetysObjectgetLockOwner, isLockedMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObjectneedsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObjectgetMetadataHolderMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObjectremove
- 
Constructor Details- 
FileCreates anFile.- Parameters:
- node- the node backing this- AmetysObject
- parentPath- the parentPath in the Ametys hierarchy
- factory- the DefaultAmetysObjectFactory which created the AmetysObject
 
 
- 
- 
Method Details- 
createCommentDescription copied from interface:CommentableAmetysObjectCreates a comment- Specified by:
- createCommentin interface- CommentableAmetysObject<Comment>
- Returns:
- The new comment
 
- 
createCommentDescription 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 interface- CommentableAmetysObject<Comment>
- Parameters:
- commentId- the comment's id
- creationDate- the comment's creation date
- Returns:
- the new comment
 
- 
getCommentDescription copied from interface:CommentableAmetysObjectGet a comment- Specified by:
- getCommentin interface- CommentableAmetysObject<Comment>
- Parameters:
- commentId- The comment
- Returns:
- The comment
- Throws:
- AmetysRepositoryException- if error occurs
 
- 
getCommentspublic 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 interface- CommentableAmetysObject<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
 
 
-