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:
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.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
ConstructorDescriptionDefaultSharedContent
(javax.jcr.Node node, String parentPath, F factory) Creates aDefaultSharedContent
. -
Method Summary
Modifier and TypeMethodDescriptionReturns theDataHolder
of thisAmetysObject
.Get the initial content.getSite()
Returns this object's site.Returns this object's site name.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
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
setSiteName
(String siteName) Set the site name.void
Deprecated.void
Set the title from the given localevoid
Tags.void
Untags.Methods inherited from class org.ametys.web.repository.content.jcr.DefaultWebContent
copyTo, createChild, getChild, getChildren, getReferencingPages, getReferencingZoneItems, getRootAttachments, 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, remove, 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.RemovableAmetysObject
remove
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
-
Field Details
-
INITIAL_CONTENT_PROPERTY
The initial content property.- See Also:
-
-
Constructor Details
-
DefaultSharedContent
Creates aDefaultSharedContent
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultSharedContentFactory which created the AmetysObject.
-
-
Method Details
-
getInitialContent
Description copied from interface:SharedContent
Get the initial content.- Specified by:
getInitialContent
in 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:SiteAwareAmetysObject
Returns this object's site.- Specified by:
getSite
in interfaceSiteAwareAmetysObject
- Overrides:
getSite
in classDefaultWebContent<F extends DefaultSharedContentFactory>
- Returns:
- this object's site
-
getSiteName
Description copied from interface:SiteAwareAmetysObject
Returns this object's site name.- Specified by:
getSiteName
in interfaceSiteAwareAmetysObject
- Overrides:
getSiteName
in classDefaultWebContent<F extends DefaultSharedContentFactory>
- Returns:
- this object's site name.
-
setSiteName
Description copied from interface:ModifiableSiteAwareAmetysObject
Set the site name.- Specified by:
setSiteName
in 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
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: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 DefaultSharedContentFactory>
- Returns:
- the
DataHolder
of thisAmetysObject
-
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.
-