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 voidfillContent(Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter)Fills the current content with the values from the providedNode.voidsetCreationDate(Date creationDate)Set the creation date.voidsetCreator(UserIdentity user)Set the login of the creator.voidsetFirstValidationDate(Date validationDate)Set the first validation datevoidsetLanguage(String language)Set the type of this Content.
This method may only be called on a new Content, ie.voidsetLastContributor(UserIdentity user)Set the login of the last contributor.voidsetLastMajorValidationDate(Date validationDate)Set the last validation date resulting from a major modificationvoidsetLastModified(Date lastModified)Set the last modification date.voidsetLastValidationDate(Date validationDate)Set the last validation datevoidsetMixinTypes(String[] mixins)Set the mixins of this Content.voidsetOutgoingReferences(Map<String,OutgoingReferences> references)Store the outgoing references of the content.voidsetTitle(String title)Set the title.voidsetTitle(String title, Locale locale)Set the title from the given localevoidsetTypes(String[] types)Set the types of this Content.-
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, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getRootAttachments, getTitle, getTitle, getTypes, hasReferencingContents, 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, hasLocalValue, hasNonEmptyExternalValue, hasNonEmptyLocalValue, hasNonEmptyValue, hasValue
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToMap, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, dataToSAX, dataToSAXForEdition, getDataNames, getType, getValue, hasNonEmptyValue, hasValue, 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, 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.cms.repository.TagAwareAmetysObject
getTags
-
Methods inherited from interface org.ametys.cms.repository.TaggableAmetysObject
tag, untag
-
-
-
-
Method Detail
-
setTypes
void setTypes(String[] types) throws AmetysRepositoryException
Set the types of this Content.- Parameters:
types- the types of this content.- Throws:
AmetysRepositoryException- if an error occurs.
-
setMixinTypes
void setMixinTypes(String[] mixins) throws AmetysRepositoryException
Set the mixins of this Content.- Parameters:
mixins- the mixins of this content.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLanguage
void setLanguage(String language) throws AmetysRepositoryException
Set the type of this Content.
This method may only be called on a new Content, ie. before its first save.- Parameters:
language- the language of this content.- Throws:
AmetysRepositoryException- if an error occurs.
-
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
-
-