Package org.ametys.cms.repository
Class ModifiableDefaultContent<F extends ModifiableContentFactory>
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultAmetysObject<F>
org.ametys.cms.repository.DefaultContent<F>
org.ametys.cms.repository.ModifiableDefaultContent<F>
- Type Parameters:
F- the actual type of factory.
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,IndexableDataHolder,ModifiableIndexableDataHolder,CommentableContent,ContributorCommentableAmetysObject,ContributorCommentableContent,CommentableAmetysObject<Comment>,Content,ModifiableContent,ModifiableWorkflowAwareContent,ReactionableObject,ReportableObject,WorkflowAwareContent,ACLAmetysObject,AmetysObject,CopiableAmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,DublinCoreAwareAmetysObject,ModifiableDublinCoreAwareAmetysObject,JCRAmetysObject,JCRTraversableAmetysObject,LockableAmetysObject,LockAwareAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,TraversableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject,WorkflowAwareAmetysObject
- Direct Known Subclasses:
AbstractProgramPart,Course,CoursePart,OrgUnit,Person
public class ModifiableDefaultContent<F extends ModifiableContentFactory>
extends DefaultContent<F>
implements CommentableContent, ContributorCommentableContent, LockableAmetysObject, ModifiableWorkflowAwareContent
Default implementation of a
Content, also versionable, lockable and workflow-aware.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.repository.Content
Content.ReferencingContentsSearchNested classes/interfaces inherited from interface org.ametys.cms.repository.ReactionableObject
ReactionableObject.ReactionType -
Field Summary
Fields inherited from class org.ametys.cms.repository.DefaultContent
_mixins, _outgoingReferences, _types, ATTACHMENTS_NODE_NAME, DEFAULT_CONTENT_LOCALE, METADATA_CONTENTTYPE, METADATA_CONTRIBUTOR, METADATA_CREATION, METADATA_CREATOR, METADATA_FIRST_VALIDATION, METADATA_FIRST_VALIDATOR, METADATA_LANGUAGE, METADATA_LAST_MAJOR_VALIDATOR, METADATA_LAST_MAJORVALIDATION, METADATA_LAST_VALIDATION, METADATA_LAST_VALIDATOR, METADATA_MIXINCONTENTTYPES, METADATA_MODIFIED, METADATA_OUTGOING_REFERENCE_NODETYPE, METADATA_OUTGOING_REFERENCE_PROPERTY, METADATA_OUTGOING_REFERENCES, METADATA_OUTGOING_REFERENCES_PATH_PROPERTY, METADATA_ROOT_OUTGOING_REFERENCESFields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
__VERSION_COMPARATOR, PROTECTED_PROPERTIESFields inherited from interface org.ametys.cms.repository.Content
ATTRIBUTE_TITLEFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionModifiableDefaultContent(javax.jcr.Node node, String parentPath, F factory) Creates a JCR-based Content. -
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.Creates a contributor commentcreateContributorComment(String commentId, ZonedDateTime creationDate) Creates a contributor comment with the given id and creation date This method allow to create a contributor comment from existing data (ex: data import from archive) The id is not generated here, the source is trusted.voidfillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) Fills the current content with the values from the providedNode.getComment(String commentId) Get a commentgetComments(boolean includeNotValidatedComments, boolean includeValidatedComments) Get the list of available comments (validated, not validated, both or none :))getContributorComment(String commentId) Get a contributor commentGet the list of available contributor commentslongRetrieves the current step id of the Ametys objectReturns theDataHolderof thisAmetysObject.Returns the owner of the lock, or null if noneRetrieves the date at which the content was proposed for validation, i.e.longRetrieves the workflow id associated with the Ametys object.booleanisLocked()Returns true if thisAmetysObjectis lockedvoidlock()Locks thisAmetysObjectvoidsetCreationDate(ZonedDateTime creationDate) Set the creation date.voidsetCreator(UserIdentity user) Set the login of the creator.voidsetCurrentStepId(long stepId) Set the current step id of the Ametys objectvoidsetDCContributor(String contributor) Set the Dublin Core contributor.voidsetDCCoverage(String coverage) Set the Dublin Core coverage.voidsetDCCreator(String creator) Set the Dublin Core creator.voidSet the Dublin Core date.voidsetDCDescription(String description) Set the Dublin Core description.voidsetDCFormat(String format) Set the Dublin Core format.voidsetDCIdentifier(String identifier) Set the Dublin Core identifier.voidsetDCLanguage(String language) Set the Dublin Core language.voidsetDCPublisher(String publisher) Set the Dublin Core publisher.voidsetDCRelation(String relation) Set the Dublin Core relation.voidsetDCRights(String rights) Set the Dublin Core rights.voidsetDCSource(String source) Set the Dublin Core source.voidsetDCSubject(String[] subject) Set the Dublin Core subject.voidsetDCTitle(String title) Set the Dublin Core title.voidSet the Dublin Core type.voidsetFirstValidationDate(ZonedDateTime validationDate) Set the first validation datevoidSet the identity of the first validator.voidSet the login of the last contributor.voidsetLastMajorValidationDate(ZonedDateTime validationDate) Set the last validation date resulting from a major modificationvoidSet the identity of the last major validator.voidsetLastModified(ZonedDateTime lastModified) Set the last modification date.voidsetLastValidationDate(ZonedDateTime validationDate) Set the last validation datevoidsetLastValidator(UserIdentity user) Set the identity of the last validator.voidSets a lock info on the current context for this objectvoidsetOutgoingReferences(Map<String, OutgoingReferences> references) Store the outgoing references of the content.voidsetProposalDate(ZonedDateTime proposalDate) Set the date at which the content was proposed for validation, i.e.voidSet the title.voidSet the title from the given localevoidsetWorkflowId(long workflowId) Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.voidTags.voidunlock()Unlocks thisAmetysObjectvoidUntags.Methods inherited from class org.ametys.cms.repository.DefaultContent
addReaction, addReport, clearReports, copyTo, copyTo, copyTo, copyTo, createChild, getChild, getChildren, getCreationDate, getCreator, getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType, getFirstValidationDate, getFirstValidator, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastMajorValidator, getLastModified, getLastValidationDate, getLastValidator, getMixinTypes, getOutgoingReferences, getReactionUsers, getReferencingContents, getReportsCount, getRootAttachments, getSystemPropertyExtensionPoint, getTags, getTitle, getTitle, getTypes, hasChild, hasReferencingContents, removeReaction, searchReferencingContents, setLanguage, setMixinTypes, setReportsCount, setType, setTypes, toSAXMethods 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, restoreFromNode, 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.ACLAmetysObject
getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, isInheritanceDisallowedMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.cms.repository.Content
getCreationDate, getCreator, getFirstValidationDate, getFirstValidator, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastMajorValidator, getLastModified, getLastValidationDate, getLastValidator, getMixinTypes, getOutgoingReferences, getReferencingContents, getRootAttachments, getTitle, getTitle, getTypes, hasReferencingContents, searchReferencingContents, setLanguage, setMixinTypes, setType, setTypes, toSAXMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAXMethods inherited from interface org.ametys.plugins.repository.dublincore.DublinCoreAwareAmetysObject
getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCTypeMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getComposite, getExternalComposite, getExternalRepeater, getLocalComposite, getLocalRepeater, getParentDataHolder, getRepeater, getRootDataHolder, getSystemPropertyExtensionPoint, indexData, indexDataMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAXForEdition, getComments, getDataNames, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToJSON, dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultipleMethods inherited from interface org.ametys.plugins.repository.ModifiableACLAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, disallowInheritance, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsersMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryDataMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTagsMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Constructor Details
-
ModifiableDefaultContent
Creates a JCR-based Content.- Parameters:
node- the JCR Node backing this Content.parentPath- the parent path in the Ametys hierarchy.factory- the correspondingContentFactory.
-
-
Method Details
-
setTitle
Description copied from interface:ModifiableContentSet the title from the given locale- Specified by:
setTitlein interfaceModifiableContent- Parameters:
title- the title.locale- The locale- Throws:
AmetysRepositoryException- if an error occurs.
-
setTitle
Description copied from interface:ModifiableContentSet the title. Be careful ! Use only if content's title is not a multilingual string. If not sure useModifiableContent.setTitle(String, Locale)instead.- Specified by:
setTitlein interfaceModifiableContent- Parameters:
title- the title.- Throws:
AmetysRepositoryException- if an error occurs.
-
setCreator
Description copied from interface:ModifiableContentSet the login of the creator.- Specified by:
setCreatorin interfaceModifiableContent- Parameters:
user- the creator.- Throws:
AmetysRepositoryException- if an error occurs.
-
setCreationDate
Description copied from interface:ModifiableContentSet the creation date.- Specified by:
setCreationDatein interfaceModifiableContent- Parameters:
creationDate- the creation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastContributor
Description copied from interface:ModifiableContentSet the login of the last contributor.- Specified by:
setLastContributorin interfaceModifiableContent- Parameters:
user- the last contributor.
-
setLastModified
Description copied from interface:ModifiableContentSet the last modification date.- Specified by:
setLastModifiedin interfaceModifiableContent- Parameters:
lastModified- the last modification date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setFirstValidator
Description copied from interface:ModifiableContentSet the identity of the first validator.- Specified by:
setFirstValidatorin interfaceModifiableContent- Parameters:
user- the first validator.- Throws:
AmetysRepositoryException- if an error occurs.
-
setFirstValidationDate
Description copied from interface:ModifiableContentSet the first validation date- Specified by:
setFirstValidationDatein interfaceModifiableContent- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastValidator
Description copied from interface:ModifiableContentSet the identity of the last validator.- Specified by:
setLastValidatorin interfaceModifiableContent- Parameters:
user- the last validator.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastValidationDate
Description copied from interface:ModifiableContentSet the last validation date- Specified by:
setLastValidationDatein interfaceModifiableContent- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastMajorValidator
Description copied from interface:ModifiableContentSet the identity of the last major validator.- Specified by:
setLastMajorValidatorin interfaceModifiableContent- Parameters:
user- the last major validator.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastMajorValidationDate
public void setLastMajorValidationDate(ZonedDateTime validationDate) throws AmetysRepositoryException Description copied from interface:ModifiableContentSet the last validation date resulting from a major modification- Specified by:
setLastMajorValidationDatein interfaceModifiableContent- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setOutgoingReferences
public void setOutgoingReferences(Map<String, OutgoingReferences> references) throws AmetysRepositoryExceptionDescription copied from interface:ModifiableContentStore the outgoing references of the content.- Specified by:
setOutgoingReferencesin interfaceModifiableContent- Parameters:
references- A non null map of outgoing references grouped by metadata (key are metadata path)- Throws:
AmetysRepositoryException- if an error occurs.
-
tag
Description copied from interface:TaggableAmetysObjectTags.- Specified by:
tagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to add.- Throws:
AmetysRepositoryException- if an error occurs.
-
untag
Description copied from interface:TaggableAmetysObjectUntags.- Specified by:
untagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to remove.- Throws:
AmetysRepositoryException- if an error occurs.
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowIdin interfaceWorkflowAwareAmetysObject- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectSet the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.- Specified by:
setWorkflowIdin interfaceWorkflowAwareAmetysObject- Parameters:
workflowId- the workflow id of the object.- Throws:
AmetysRepositoryException- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the current step id of the Ametys object- Specified by:
getCurrentStepIdin interfaceWorkflowAwareAmetysObject- Returns:
- the current step id
- Throws:
AmetysRepositoryException- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectSet the current step id of the Ametys object- Specified by:
setCurrentStepIdin interfaceWorkflowAwareAmetysObject- Parameters:
stepId- the step id to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getProposalDate
Description copied from interface:WorkflowAwareContentRetrieves the date at which the content was proposed for validation, i.e. put in a workflow step in which it's awaiting validation.- Specified by:
getProposalDatein interfaceWorkflowAwareContent- Returns:
- the date at which the content was proposed for validation.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setProposalDate
Description copied from interface:WorkflowAwareContentSet the date at which the content was proposed for validation, i.e. put in a workflow step in which it's awaiting validation.- Specified by:
setProposalDatein interfaceWorkflowAwareContent- Parameters:
proposalDate- the date at which the content was proposed for validation, or null to remove it.- Throws:
AmetysRepositoryException- if an error occurs.
-
lock
Description copied from interface:LockableAmetysObjectLocks thisAmetysObject- Specified by:
lockin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if a problem occurs
-
unlock
Description copied from interface:LockableAmetysObjectUnlocks thisAmetysObject- Specified by:
unlockin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if a problem occurs
-
setLockInfoOnCurrentContext
Description copied from interface:LockableAmetysObjectSets a lock info on the current context for this object- Specified by:
setLockInfoOnCurrentContextin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if an error occurs
-
isLocked
Description copied from interface:LockAwareAmetysObjectReturns true if thisAmetysObjectis locked- Specified by:
isLockedin interfaceLockAwareAmetysObject- Returns:
- true if this
AmetysObjectis locked - Throws:
AmetysRepositoryException- if a problem occurs
-
getLockOwner
Description copied from interface:LockAwareAmetysObjectReturns the owner of the lock, or null if none- Specified by:
getLockOwnerin interfaceLockAwareAmetysObject- Returns:
- the owner of the lock, or null if none
- Throws:
AmetysRepositoryException- if a problem occurs
-
setDCTitle
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core title.- Specified by:
setDCTitlein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
title- the Dublin Core title to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCCreator
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core creator.- Specified by:
setDCCreatorin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
creator- the Dublin Core creator to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCSubject
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core subject.- Specified by:
setDCSubjectin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
subject- the Dublin Core subject to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCDescription
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core description.- Specified by:
setDCDescriptionin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
description- the Dublin Core description to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCPublisher
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core publisher.- Specified by:
setDCPublisherin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
publisher- the Dublin Core publisher to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCContributor
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core contributor.- Specified by:
setDCContributorin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
contributor- the Dublin Core contributor to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCDate
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core date.- Specified by:
setDCDatein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
date- the Dublin Core date to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCType
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core type. You can use a constant from org.ametys.plugins.repository.dublincore.DCMITypes.- Specified by:
setDCTypein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
type- the Dublin Core type to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCFormat
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core format.- Specified by:
setDCFormatin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
format- the Dublin Core format to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCIdentifier
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core identifier.- Specified by:
setDCIdentifierin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
identifier- the Dublin Core identifier to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCSource
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core source.- Specified by:
setDCSourcein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
source- the Dublin Core source to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCLanguage
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core language.- Specified by:
setDCLanguagein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
language- the Dublin Core language to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCRelation
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core relation.- Specified by:
setDCRelationin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
relation- the Dublin Core relation to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCCoverage
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core coverage.- Specified by:
setDCCoveragein interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
coverage- the Dublin Core coverage to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
setDCRights
Description copied from interface:ModifiableDublinCoreAwareAmetysObjectSet the Dublin Core rights.- Specified by:
setDCRightsin interfaceModifiableDublinCoreAwareAmetysObject- Parameters:
rights- the Dublin Core rights to set. Can be null.- Throws:
AmetysRepositoryException- if an error occurs.
-
createComment
Description copied from interface:CommentableAmetysObjectCreates a comment- Specified by:
createCommentin interfaceCommentableAmetysObject<F extends ModifiableContentFactory>- 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<F extends ModifiableContentFactory>- 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<F extends ModifiableContentFactory>- 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<F extends ModifiableContentFactory>- 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
-
createContributorComment
Description copied from interface:ContributorCommentableAmetysObjectCreates a contributor comment- Specified by:
createContributorCommentin interfaceContributorCommentableAmetysObject- Returns:
- The new comment
-
createContributorComment
Description copied from interface:ContributorCommentableAmetysObjectCreates a contributor comment with the given id and creation date This method allow to create a contributor 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:
createContributorCommentin interfaceContributorCommentableAmetysObject- Parameters:
commentId- the comment's idcreationDate- the comment's creation date- Returns:
- the new comment
-
getContributorComment
Description copied from interface:ContributorCommentableAmetysObjectGet a contributor comment- Specified by:
getContributorCommentin interfaceContributorCommentableAmetysObject- Parameters:
commentId- The comment- Returns:
- The contributor comment
- Throws:
AmetysRepositoryException- if error occurs
-
getContributorComments
Description copied from interface:ContributorCommentableAmetysObjectGet the list of available contributor comments- Specified by:
getContributorCommentsin interfaceContributorCommentableAmetysObject- Returns:
- A non null list of contributor comments on the ametys object.
- Throws:
AmetysRepositoryException- if an error occurred
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelAwareDataAwareAmetysObject- Overrides:
getDataHolderin classDefaultContent<F extends ModifiableContentFactory>- Returns:
- the
DataHolderof thisAmetysObject
-
fillContent
public void fillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception Description copied from interface:ModifiableContentFills the current content with the values from the providedNode.
This is the anti-operation ofContent.toSAX(org.xml.sax.ContentHandler, java.util.Locale, org.ametys.runtime.model.View, boolean), as the Node should be a Node previously generated with SAX events from this method.- Specified by:
fillContentin interfaceModifiableContent- Parameters:
node- The node to read for retrieving values to filladditionalDataGetter- The object that will retrieve potential additional data for the content's attributes- Throws:
Exception- if an exception occurs
-