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:
CommentableContent
,CommentableAmetysObject
,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
Modifiable version ofDefaultWebContent
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.repository.ReactionableObject
ReactionableObject.ReactionType
-
-
Field Summary
-
Fields inherited from class org.ametys.web.repository.content.jcr.DefaultWebContent
METADATA_SITE
-
Fields inherited from class org.ametys.cms.repository.DefaultContent
ATTACHMENTS_NODE_NAME, DEFAULT_CONTENT_LOCALE, METADATA_CONTENTTYPE, METADATA_CONTRIBUTOR, METADATA_CREATION, METADATA_CREATOR, METADATA_FIRST_VALIDATION, METADATA_LANGUAGE, METADATA_LAST_MAJORVALIDATION, METADATA_LAST_VALIDATION, 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, METADATA_TITLE
-
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description ModifiableDefaultWebContent(Node node, String parentPath, F factory)
Creates aModifiableDefaultWebContent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Comment
createComment()
Creates a commentComment
createComment(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.void
fillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter)
Fills the current content with the values from the providedNode
.Comment
getComment(String commentId)
Get a commentList<Comment>
getComments(boolean includeNotValidatedComments, boolean includeValidatedComments)
Get the list of available comments (validated, not validated, both or none :))long
getCurrentStepId()
Retrieves the current step id of the Ametys objectModifiableModelAwareDataHolder
getDataHolder()
Returns theDataHolder
of thisAmetysObject
.UserIdentity
getLockOwner()
Returns the owner of the lock, or null if noneZonedDateTime
getProposalDate()
Retrieves the date at which the content was proposed for validation, i.e.long
getWorkflowId()
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(Date 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
setDCDate(Date date)
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
setDCType(String type)
Set the Dublin Core type.void
setFirstValidationDate(Date validationDate)
Set the first validation datevoid
setLastContributor(UserIdentity user)
Set the login of the last contributor.void
setLastMajorValidationDate(Date validationDate)
Set the last validation date resulting from a major modificationvoid
setLastModified(Date lastModified)
Set the last modification date.void
setLastValidationDate(Date validationDate)
Set the last validation datevoid
setOutgoingReferences(Map<String,OutgoingReferences> references)
Store the outgoing references of the content.void
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
setTitle(String title)
Deprecated.void
setTitle(String title, Locale locale)
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
tag(String tag)
Tags.void
unlock()
Unlocks thisAmetysObject
void
untag(String tag)
Untags.-
Methods inherited from class org.ametys.web.repository.content.jcr.DefaultWebContent
copyTo, createChild, getChild, getChildren, getReferencingPages, getReferencingZoneItems, getRootAttachments, getSite, getSiteName, hasChild
-
Methods inherited from class org.ametys.cms.repository.DefaultContent
addReaction, addReport, clearReports, copyTo, copyTo, copyTo, copyTo, getCreationDate, getCreator, getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType, getFirstValidationDate, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReactionUsers, getReferencingContents, getReportsCount, getTags, getTitle, getTitle, getTypes, hasReferencingContents, removeReaction, 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, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getTitle, getTitle, getTypes, hasReferencingContents, setLanguage, setMixinTypes, setType, setTypes, toSAX
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, 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.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
getComments, getDataNames, getDefinition, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmpty
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToMap, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, dataToSAX, dataToSAXForEdition, 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.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRepositoryData, getRootDataHolder, 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
getReferencingPages, getReferencingZoneItems, getRootAttachments
-
-
-
-
Constructor Detail
-
ModifiableDefaultWebContent
public ModifiableDefaultWebContent(Node node, String parentPath, F factory)
Creates aModifiableDefaultWebContent
.- Parameters:
node
- the node backing thisModifiableDefaultWebContent
.parentPath
- the parent path in the Ametys hierarchy.factory
- theDefaultWebContentFactory
which creates the AmetysObject.
-
-
Method Detail
-
getWorkflowId
public long getWorkflowId() throws AmetysRepositoryException
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
public void setWorkflowId(long workflowId) throws AmetysRepositoryException
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
public long getCurrentStepId() throws AmetysRepositoryException
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
public void setCurrentStepId(long stepId) throws AmetysRepositoryException
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
public ZonedDateTime getProposalDate() throws AmetysRepositoryException
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
public void setProposalDate(ZonedDateTime proposalDate) throws AmetysRepositoryException
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
public void remove() throws AmetysRepositoryException, RepositoryIntegrityViolationException
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
public void setSiteName(String siteName)
Description copied from interface:ModifiableSiteAwareAmetysObject
Set the site name.- Specified by:
setSiteName
in interfaceModifiableSiteAwareAmetysObject
- Parameters:
siteName
- the site name.
-
setTitle
public void setTitle(String title, Locale locale) throws AmetysRepositoryException
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 public void setTitle(String title) throws AmetysRepositoryException
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
public void setCreator(UserIdentity user) throws AmetysRepositoryException
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
public void setCreationDate(Date creationDate) throws AmetysRepositoryException
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
public void setLastContributor(UserIdentity user)
Description copied from interface:ModifiableContent
Set the login of the last contributor.- Specified by:
setLastContributor
in interfaceModifiableContent
- Parameters:
user
- the last contributor.
-
setLastModified
public void setLastModified(Date lastModified) throws AmetysRepositoryException
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.
-
setFirstValidationDate
public void setFirstValidationDate(Date validationDate) throws AmetysRepositoryException
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.
-
setLastValidationDate
public void setLastValidationDate(Date validationDate) throws AmetysRepositoryException
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.
-
setLastMajorValidationDate
public void setLastMajorValidationDate(Date 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 AmetysRepositoryException
Description 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
public void tag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObject
Tags.- Specified by:
tag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to add.- Throws:
AmetysRepositoryException
- if an error occurs.
-
untag
public void untag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObject
Untags.- Specified by:
untag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to remove.- Throws:
AmetysRepositoryException
- if an error occurs.
-
lock
public void lock() throws AmetysRepositoryException
Description copied from interface:LockableAmetysObject
Locks thisAmetysObject
- Specified by:
lock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
unlock
public void unlock() throws AmetysRepositoryException
Description copied from interface:LockableAmetysObject
Unlocks thisAmetysObject
- Specified by:
unlock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
isLocked
public boolean isLocked() throws AmetysRepositoryException
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
public UserIdentity getLockOwner() throws AmetysRepositoryException
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
public void setDCTitle(String title) throws AmetysRepositoryException
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
public void setDCCreator(String creator) throws AmetysRepositoryException
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
public void setDCSubject(String[] subject) throws AmetysRepositoryException
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
public void setDCDescription(String description) throws AmetysRepositoryException
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
public void setDCPublisher(String publisher) throws AmetysRepositoryException
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
public void setDCContributor(String contributor) throws AmetysRepositoryException
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
public void setDCDate(Date date) throws AmetysRepositoryException
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
public void setDCType(String type) throws AmetysRepositoryException
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
public void setDCFormat(String format) throws AmetysRepositoryException
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
public void setDCIdentifier(String identifier) throws AmetysRepositoryException
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
public void setDCSource(String source) throws AmetysRepositoryException
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
public void setDCLanguage(String language) throws AmetysRepositoryException
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
public void setDCRelation(String relation) throws AmetysRepositoryException
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
public void setDCCoverage(String coverage) throws AmetysRepositoryException
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
public void setDCRights(String rights) throws AmetysRepositoryException
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
public Comment createComment()
Description copied from interface:CommentableAmetysObject
Creates a comment- Specified by:
createComment
in interfaceCommentableAmetysObject
- Returns:
- The new comment
-
createComment
public Comment createComment(String commentId, ZonedDateTime creationDate)
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
- Parameters:
commentId
- the comment's idcreationDate
- the comment's creation date- Returns:
- the new comment
-
getComment
public Comment getComment(String commentId) throws AmetysRepositoryException
Description copied from interface:CommentableAmetysObject
Get a comment- Specified by:
getComment
in interfaceCommentableAmetysObject
- 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
- 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
-
getDataHolder
public ModifiableModelAwareDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelAwareDataAwareAmetysObject
- 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
-
-