Class ModifiableDefaultWebContent<F extends ModifiableDefaultWebContentFactory>
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.web.repository.content.jcr.DefaultWebContent<F>
org.ametys.web.repository.content.jcr.ModifiableDefaultWebContent<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
,ModifiableWebContent
,WebContent
,ModifiableSiteAwareAmetysObject
,SiteAwareAmetysObject
public class ModifiableDefaultWebContent<F extends ModifiableDefaultWebContentFactory>
extends DefaultWebContent<F>
implements ModifiableWebContent, ModifiableWorkflowAwareContent, LockableAmetysObject, CommentableContent, ContributorCommentableContent
Modifiable version of
DefaultWebContent
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.cms.repository.Content
Content.ReferencingContentsSearch
Nested classes/interfaces inherited from interface org.ametys.cms.repository.ReactionableObject
ReactionableObject.ReactionType
-
Field Summary
Fields inherited from class org.ametys.cms.repository.DefaultContent
_mixins, _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_REFERENCES
Fields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES
Fields inherited from interface org.ametys.cms.repository.Content
ATTRIBUTE_TITLE
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
Fields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE
Fields inherited from interface org.ametys.web.repository.content.WebContent
PROPERTY_PRIVACY
-
Constructor Summary
ConstructorDescriptionModifiableDefaultWebContent
(javax.jcr.Node node, String parentPath, F factory) Creates aModifiableDefaultWebContent
. -
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.void
fillContent
(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 commentslong
Retrieves the current step id of the Ametys objectReturns theDataHolder
of thisAmetysObject
.Returns the owner of the lock, or null if noneRetrieves the date at which the content was proposed for validation, i.e.long
Retrieves the workflow id associated with the Ametys object.boolean
isLocked()
Returns true if thisAmetysObject
is lockedvoid
lock()
Locks thisAmetysObject
void
remove()
Removes thisAmetysObject
from the Ametys tree.void
setCreationDate
(ZonedDateTime creationDate) Set the creation date.void
setCreator
(UserIdentity user) Set the login of the creator.void
setCurrentStepId
(long stepId) Set the current step id of the Ametys objectvoid
setDCContributor
(String contributor) Set the Dublin Core contributor.void
setDCCoverage
(String coverage) Set the Dublin Core coverage.void
setDCCreator
(String creator) Set the Dublin Core creator.void
Set the Dublin Core date.void
setDCDescription
(String description) Set the Dublin Core description.void
setDCFormat
(String format) Set the Dublin Core format.void
setDCIdentifier
(String identifier) Set the Dublin Core identifier.void
setDCLanguage
(String language) Set the Dublin Core language.void
setDCPublisher
(String publisher) Set the Dublin Core publisher.void
setDCRelation
(String relation) Set the Dublin Core relation.void
setDCRights
(String rights) Set the Dublin Core rights.void
setDCSource
(String source) Set the Dublin Core source.void
setDCSubject
(String[] subject) Set the Dublin Core subject.void
setDCTitle
(String title) Set the Dublin Core title.void
Set the Dublin Core type.void
setFirstValidationDate
(ZonedDateTime validationDate) Set the first validation datevoid
Set the identity of the first validator.void
Set the login of the last contributor.void
setLastMajorValidationDate
(ZonedDateTime validationDate) Set the last validation date resulting from a major modificationvoid
Set the identity of the last major validator.void
setLastModified
(ZonedDateTime lastModified) Set the last modification date.void
setLastValidationDate
(ZonedDateTime validationDate) Set the last validation datevoid
setLastValidator
(UserIdentity user) Set the identity of the last validator.void
Sets a lock info on the current context for this objectvoid
setOutgoingReferences
(Map<String, OutgoingReferences> references) Store the outgoing references of the content.void
setPrivacyLevel
(String privacy) Set the content's privacy levelvoid
setProposalDate
(ZonedDateTime proposalDate) Set the date at which the content was proposed for validation, i.e.void
setSiteName
(String siteName) Set the site name.void
Deprecated.void
Set the title from the given localevoid
setWorkflowId
(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.void
Tags.void
unlock()
Unlocks thisAmetysObject
void
Untags.Methods inherited from class org.ametys.web.repository.content.jcr.DefaultWebContent
copyTo, copyTo, createChild, getChild, getChildren, getPrivacyLevel, getReferencingPages, getReferencingZoneItems, getRootAttachments, getSite, getSiteName, hasChild
Methods inherited from class org.ametys.cms.repository.DefaultContent
addReaction, addReport, clearReports, copyTo, copyTo, copyTo, 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, getSystemPropertyExtensionPoint, getTags, getTitle, getTitle, getTypes, hasReferencingContents, removeReaction, searchReferencingContents, setLanguage, setMixinTypes, setReportsCount, setType, setTypes, toSAX
Methods 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, switchToRevision
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, 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.ACLAmetysObject
getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, isInheritanceDisallowed
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.cms.repository.Content
getCreationDate, getCreator, getFirstValidationDate, getFirstValidator, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastMajorValidator, getLastModified, getLastValidationDate, getLastValidator, getMixinTypes, getOutgoingReferences, getReferencingContents, getTitle, getTitle, getTypes, hasReferencingContents, searchReferencingContents, setLanguage, setMixinTypes, setType, setTypes, toSAX
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.dublincore.DublinCoreAwareAmetysObject
getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.cms.data.ametysobject.ModelAwareDataAwareAmetysObject
getComposite, getExternalComposite, getExternalRepeater, getLocalComposite, getLocalRepeater, getParentDataHolder, getRepeater, getRootDataHolder, getSystemPropertyExtensionPoint, indexData, indexData
Methods 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, hasValueOrEmpty
Methods 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, isMultiple
Methods 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, removeDeniedUsers
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.cms.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRootDataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getRepositoryData, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
Methods inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
getSite, getSiteName
Methods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTags
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
Methods inherited from interface org.ametys.web.repository.content.WebContent
getPrivacyLevel, getReferencingPages, getReferencingZoneItems, getRootAttachments
-
Constructor Details
-
ModifiableDefaultWebContent
Creates aModifiableDefaultWebContent
.- Parameters:
node
- the node backing thisModifiableDefaultWebContent
.parentPath
- the parent path in the Ametys hierarchy.factory
- theDefaultWebContentFactory
which creates the AmetysObject.
-
-
Method Details
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObject
Set 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:
setWorkflowId
in interfaceWorkflowAwareAmetysObject
- Parameters:
workflowId
- the workflow id of the object.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Retrieves the current step id of the Ametys object- Specified by:
getCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the current step id
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObject
Set the current step id of the Ametys object- Specified by:
setCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Parameters:
stepId
- the step id to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
getProposalDate
Description copied from interface:WorkflowAwareContent
Retrieves 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:
getProposalDate
in interfaceWorkflowAwareContent
- Returns:
- the date at which the content was proposed for validation.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setProposalDate
Description copied from interface:WorkflowAwareContent
Set 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:
setProposalDate
in interfaceWorkflowAwareContent
- Parameters:
proposalDate
- the date at which the content was proposed for validation, or null to remove it.- Throws:
AmetysRepositoryException
- if an error occurs.
-
remove
Description copied from interface:RemovableAmetysObject
Removes thisAmetysObject
from the Ametys tree.- Specified by:
remove
in interfaceRemovableAmetysObject
- Overrides:
remove
in classSimpleAmetysObject<F extends ModifiableDefaultWebContentFactory>
- Throws:
AmetysRepositoryException
- if an error occurs.RepositoryIntegrityViolationException
- if thisAmetysObject
is referenced by another objects.
-
setSiteName
Description copied from interface:ModifiableSiteAwareAmetysObject
Set the site name.- Specified by:
setSiteName
in interfaceModifiableSiteAwareAmetysObject
- Parameters:
siteName
- the site name.
-
setPrivacyLevel
Description copied from interface:ModifiableWebContent
Set the content's privacy level- Specified by:
setPrivacyLevel
in interfaceModifiableWebContent
- Parameters:
privacy
- the privacy level to set
-
setTitle
Description copied from interface:ModifiableContent
Set the title from the given locale- Specified by:
setTitle
in interfaceModifiableContent
- Parameters:
title
- the title.locale
- The locale- Throws:
AmetysRepositoryException
- if an error occurs.
-
setTitle
Deprecated.Description copied from interface:ModifiableContent
Set 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:
setTitle
in interfaceModifiableContent
- Parameters:
title
- the title.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCreator
Description copied from interface:ModifiableContent
Set the login of the creator.- Specified by:
setCreator
in interfaceModifiableContent
- Parameters:
user
- the creator.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCreationDate
Description copied from interface:ModifiableContent
Set the creation date.- Specified by:
setCreationDate
in interfaceModifiableContent
- Parameters:
creationDate
- the creation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastContributor
Description copied from interface:ModifiableContent
Set the login of the last contributor.- Specified by:
setLastContributor
in interfaceModifiableContent
- Parameters:
user
- the last contributor.
-
setLastModified
Description copied from interface:ModifiableContent
Set the last modification date.- Specified by:
setLastModified
in interfaceModifiableContent
- Parameters:
lastModified
- the last modification date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setFirstValidator
Description copied from interface:ModifiableContent
Set the identity of the first validator.- Specified by:
setFirstValidator
in interfaceModifiableContent
- Parameters:
user
- the first validator.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setFirstValidationDate
Description copied from interface:ModifiableContent
Set the first validation date- Specified by:
setFirstValidationDate
in interfaceModifiableContent
- Parameters:
validationDate
- the validation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastValidator
Description copied from interface:ModifiableContent
Set the identity of the last validator.- Specified by:
setLastValidator
in interfaceModifiableContent
- Parameters:
user
- the last validator.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastValidationDate
Description copied from interface:ModifiableContent
Set the last validation date- Specified by:
setLastValidationDate
in interfaceModifiableContent
- Parameters:
validationDate
- the validation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastMajorValidator
Description copied from interface:ModifiableContent
Set the identity of the last major validator.- Specified by:
setLastMajorValidator
in 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:ModifiableContent
Set the last validation date resulting from a major modification- Specified by:
setLastMajorValidationDate
in 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:ModifiableContent
Store the outgoing references of the content.- Specified by:
setOutgoingReferences
in 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:TaggableAmetysObject
Tags.- Specified by:
tag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to add.- Throws:
AmetysRepositoryException
- if an error occurs.
-
untag
Description copied from interface:TaggableAmetysObject
Untags.- Specified by:
untag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to remove.- Throws:
AmetysRepositoryException
- if an error occurs.
-
lock
Description copied from interface:LockableAmetysObject
Locks thisAmetysObject
- Specified by:
lock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
unlock
Description copied from interface:LockableAmetysObject
Unlocks thisAmetysObject
- Specified by:
unlock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
setLockInfoOnCurrentContext
Description copied from interface:LockableAmetysObject
Sets a lock info on the current context for this object- Specified by:
setLockInfoOnCurrentContext
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if an error occurs
-
isLocked
Description copied from interface:LockAwareAmetysObject
Returns true if thisAmetysObject
is locked- Specified by:
isLocked
in interfaceLockAwareAmetysObject
- Returns:
- true if this
AmetysObject
is locked - Throws:
AmetysRepositoryException
- if a problem occurs
-
getLockOwner
Description copied from interface:LockAwareAmetysObject
Returns the owner of the lock, or null if none- Specified by:
getLockOwner
in interfaceLockAwareAmetysObject
- Returns:
- the owner of the lock, or null if none
- Throws:
AmetysRepositoryException
- if a problem occurs
-
setDCTitle
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core title.- Specified by:
setDCTitle
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
title
- the Dublin Core title to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCreator
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core creator.- Specified by:
setDCCreator
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
creator
- the Dublin Core creator to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSubject
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core subject.- Specified by:
setDCSubject
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
subject
- the Dublin Core subject to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDescription
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core description.- Specified by:
setDCDescription
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
description
- the Dublin Core description to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCPublisher
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core publisher.- Specified by:
setDCPublisher
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
publisher
- the Dublin Core publisher to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCContributor
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core contributor.- Specified by:
setDCContributor
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
contributor
- the Dublin Core contributor to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDate
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core date.- Specified by:
setDCDate
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
date
- the Dublin Core date to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCType
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core type. You can use a constant from org.ametys.plugins.repository.dublincore.DCMITypes.- Specified by:
setDCType
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
type
- the Dublin Core type to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCFormat
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core format.- Specified by:
setDCFormat
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
format
- the Dublin Core format to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCIdentifier
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core identifier.- Specified by:
setDCIdentifier
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
identifier
- the Dublin Core identifier to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSource
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core source.- Specified by:
setDCSource
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
source
- the Dublin Core source to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCLanguage
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core language.- Specified by:
setDCLanguage
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
language
- the Dublin Core language to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRelation
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core relation.- Specified by:
setDCRelation
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
relation
- the Dublin Core relation to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCoverage
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core coverage.- Specified by:
setDCCoverage
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
coverage
- the Dublin Core coverage to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRights
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core rights.- Specified by:
setDCRights
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
rights
- the Dublin Core rights to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
createComment
Description copied from interface:CommentableAmetysObject
Creates a comment- Specified by:
createComment
in interfaceCommentableAmetysObject<F extends ModifiableDefaultWebContentFactory>
- Returns:
- The new comment
-
createComment
Description copied from interface:CommentableAmetysObject
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. Be careful using this method- Specified by:
createComment
in interfaceCommentableAmetysObject<F extends ModifiableDefaultWebContentFactory>
- Parameters:
commentId
- the comment's idcreationDate
- the comment's creation date- Returns:
- the new comment
-
getComment
Description copied from interface:CommentableAmetysObject
Get a comment- Specified by:
getComment
in interfaceCommentableAmetysObject<F extends ModifiableDefaultWebContentFactory>
- 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:CommentableAmetysObject
Get the list of available comments (validated, not validated, both or none :))- Specified by:
getComments
in interfaceCommentableAmetysObject<F extends ModifiableDefaultWebContentFactory>
- 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:ContributorCommentableAmetysObject
Creates a contributor comment- Specified by:
createContributorComment
in interfaceContributorCommentableAmetysObject
- Returns:
- The new comment
-
createContributorComment
Description copied from interface:ContributorCommentableAmetysObject
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. Be careful using this method- Specified by:
createContributorComment
in interfaceContributorCommentableAmetysObject
- Parameters:
commentId
- the comment's idcreationDate
- the comment's creation date- Returns:
- the new comment
-
getContributorComment
Description copied from interface:ContributorCommentableAmetysObject
Get a contributor comment- Specified by:
getContributorComment
in interfaceContributorCommentableAmetysObject
- Parameters:
commentId
- The comment- Returns:
- The contributor comment
- Throws:
AmetysRepositoryException
- if error occurs
-
getContributorComments
Description copied from interface:ContributorCommentableAmetysObject
Get the list of available contributor comments- Specified by:
getContributorComments
in interfaceContributorCommentableAmetysObject
- Returns:
- A non null list of contributor comments on the ametys object.
- Throws:
AmetysRepositoryException
- if an error occurred
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelAwareDataAwareAmetysObject
- Overrides:
getDataHolder
in classDefaultContent<F extends ModifiableDefaultWebContentFactory>
- Returns:
- the
DataHolder
of thisAmetysObject
-
fillContent
public void fillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception Description copied from interface:ModifiableContent
Fills 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:
fillContent
in 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
-