Package org.ametys.cms.repository
Interface ModifiableContent
-
- All Superinterfaces:
ACLAmetysObject
,AmetysObject
,Content
,DataAwareAmetysObject
,DataHolder
,DublinCoreAwareAmetysObject
,MetadataAwareAmetysObject
,ModelAwareDataAwareAmetysObject
,ModelAwareDataHolder
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableDataHolder
,ModifiableDublinCoreAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataHolder
,RemovableAmetysObject
,TagAwareAmetysObject
,TaggableAmetysObject
- All Known Subinterfaces:
CommentableContent
,ModifiableWebContent
,ModifiableWorkflowAwareContent
- All Known Implementing Classes:
AbstractProgram
,AbstractProgramPart
,AbstractTraversableProgramPart
,Container
,Course
,CourseList
,CoursePart
,ModifiableDefaultContent
,ModifiableDefaultWebContent
,OrgUnit
,Person
,Program
,SubProgram
public interface ModifiableContent extends Content, ModifiableModelAwareDataAwareAmetysObject, ModifiableMetadataAwareAmetysObject, ModifiableDublinCoreAwareAmetysObject, RemovableAmetysObject, TaggableAmetysObject
Modifiable content abstraction
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
fillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter)
Fills the current content with the values from the providedNode
.void
setCreationDate(Date creationDate)
Set the creation date.void
setCreator(UserIdentity user)
Set the login of the creator.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
setTitle(String title)
Set the title.void
setTitle(String title, Locale locale)
Set the title from the given locale-
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, getRootAttachments, 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.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.dublincore.ModifiableDublinCoreAwareAmetysObject
setDCContributor, setDCCoverage, setDCCreator, setDCDate, setDCDescription, setDCFormat, setDCIdentifier, setDCLanguage, setDCPublisher, setDCRelation, setDCRights, setDCSource, setDCSubject, setDCTitle, setDCType
-
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getDataHolder, 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.RemovableAmetysObject
remove
-
Methods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTags
-
Methods inherited from interface org.ametys.plugins.repository.tag.TaggableAmetysObject
tag, untag
-
-
-
-
Method Detail
-
setTitle
void setTitle(String title, Locale locale) throws AmetysRepositoryException
Set the title from the given locale- Parameters:
title
- the title.locale
- The locale- Throws:
AmetysRepositoryException
- if an error occurs.
-
setTitle
void setTitle(String title) throws AmetysRepositoryException
Set the title. Be careful ! Use only if content's title is not a multilingual string. If not sure usesetTitle(String, Locale)
instead.- Parameters:
title
- the title.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCreator
void setCreator(UserIdentity user) throws AmetysRepositoryException
Set the login of the creator.- Parameters:
user
- the creator.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCreationDate
void setCreationDate(Date creationDate) throws AmetysRepositoryException
Set the creation date.- Parameters:
creationDate
- the creation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastContributor
void setLastContributor(UserIdentity user) throws AmetysRepositoryException
Set the login of the last contributor.- Parameters:
user
- the last contributor.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastModified
void setLastModified(Date lastModified) throws AmetysRepositoryException
Set the last modification date.- Parameters:
lastModified
- the last modification date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setFirstValidationDate
void setFirstValidationDate(Date validationDate) throws AmetysRepositoryException
Set the first validation date- Parameters:
validationDate
- the validation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastValidationDate
void setLastValidationDate(Date validationDate) throws AmetysRepositoryException
Set the last validation date- Parameters:
validationDate
- the validation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setLastMajorValidationDate
void setLastMajorValidationDate(Date validationDate) throws AmetysRepositoryException
Set the last validation date resulting from a major modification- Parameters:
validationDate
- the validation date.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setOutgoingReferences
void setOutgoingReferences(Map<String,OutgoingReferences> references) throws AmetysRepositoryException
Store the outgoing references of the content.- Parameters:
references
- A non null map of outgoing references grouped by metadata (key are metadata path)- Throws:
AmetysRepositoryException
- if an error occurs.
-
fillContent
void fillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception
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.- 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
-
-