Class DefaultSharedContent<F extends DefaultSharedContentFactory>
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.DefaultSharedContent<F>
- Type Parameters:
F- the actual type of factory.
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,IndexableDataHolder,ModifiableIndexableDataHolder,Content,ReactionableObject,ReportableObject,ACLAmetysObject,AmetysObject,CopiableAmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,ModifiableModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,DublinCoreAwareAmetysObject,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,TraversableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject,SharedContent,WebContent,ModifiableSiteAwareAmetysObject,SiteAwareAmetysObject
public class DefaultSharedContent<F extends DefaultSharedContentFactory>
extends DefaultWebContent<F>
implements SharedContent
Default
SharedContent implementation, backed by a JCR node.-
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
FieldsFields 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_SUFFIXFields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITEFields inherited from interface org.ametys.web.repository.content.WebContent
PROPERTY_PRIVACY -
Constructor Summary
ConstructorsConstructorDescriptionDefaultSharedContent(javax.jcr.Node node, String parentPath, F factory) Creates aDefaultSharedContent. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDataHolderof thisAmetysObject.Get the initial content.getSite()Returns this object's site.Returns this object's site name.voidsetCreationDate(ZonedDateTime creationDate) Set the creation date.voidsetCreator(UserIdentity user) Set the login of the creator.voidsetFirstValidationDate(ZonedDateTime validationDate) Set the first validation datevoidSet the login of the last contributor.voidsetLastMajorValidationDate(ZonedDateTime validationDate) Set the last validation date resulting from a major modificationvoidsetLastModified(ZonedDateTime lastModified) Set the last modification date.voidsetLastValidationDate(ZonedDateTime validationDate) Set the last validation datevoidsetSiteName(String siteName) Set the site name.voidDeprecated.voidSet the title from the given localevoidTags.voidUntags.Methods inherited from class org.ametys.web.repository.content.jcr.DefaultWebContent
copyTo, copyTo, createChild, getChild, getChildren, getPrivacyLevel, getReferencingPages, getReferencingZoneItems, getRootAttachments, hasChildMethods 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, 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, 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
getChild, getChildAt, getChildPosition, getChildren, hasChildMethods inherited from interface org.ametys.web.repository.content.WebContent
getPrivacyLevel, getReferencingPages, getReferencingZoneItems, getRootAttachments
-
Field Details
-
INITIAL_CONTENT_PROPERTY
The initial content property.- See Also:
-
-
Constructor Details
-
DefaultSharedContent
Creates aDefaultSharedContent.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultSharedContentFactory which created the AmetysObject.
-
-
Method Details
-
getInitialContent
Description copied from interface:SharedContentGet the initial content.- Specified by:
getInitialContentin interfaceSharedContent- Returns:
- the initial content, can be null if the initial content was removed.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSite
Description copied from interface:SiteAwareAmetysObjectReturns this object's site.- Specified by:
getSitein interfaceSiteAwareAmetysObject- Overrides:
getSitein classDefaultWebContent<F extends DefaultSharedContentFactory>- Returns:
- this object's site
-
getSiteName
Description copied from interface:SiteAwareAmetysObjectReturns this object's site name.- Specified by:
getSiteNamein interfaceSiteAwareAmetysObject- Overrides:
getSiteNamein classDefaultWebContent<F extends DefaultSharedContentFactory>- Returns:
- this object's site name.
-
setSiteName
Description copied from interface:ModifiableSiteAwareAmetysObjectSet the site name.- Specified by:
setSiteNamein interfaceModifiableSiteAwareAmetysObject- Parameters:
siteName- the site name.
-
setTitle
Deprecated.Set the title.- Parameters:
title- the title.- Throws:
AmetysRepositoryException- if an error occurs.
-
setTitle
Set the title from the given locale- Parameters:
title- the title.locale- The locale- Throws:
AmetysRepositoryException- if an error occurs.
-
setCreator
Set the login of the creator.- Parameters:
user- the creator.- Throws:
AmetysRepositoryException- if an error occurs.
-
setCreationDate
Set the creation date.- Parameters:
creationDate- the creation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastContributor
Set the login of the last contributor.- Parameters:
user- the last contributor.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastModified
Set the last modification date.- Parameters:
lastModified- the last modification date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setFirstValidationDate
Set the first validation date- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastValidationDate
Set the last validation date- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
setLastMajorValidationDate
public void setLastMajorValidationDate(ZonedDateTime validationDate) throws AmetysRepositoryException Set the last validation date resulting from a major modification- Parameters:
validationDate- the validation date.- Throws:
AmetysRepositoryException- if an error occurs.
-
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 DefaultSharedContentFactory>- Returns:
- the
DataHolderof thisAmetysObject
-
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.
-