Package org.ametys.cms.repository
Class DefaultWorkflowAwareContent<F extends DefaultWorkflowAwareContentFactory>
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.cms.repository.DefaultWorkflowAwareContent<F>
- Type Parameters:
F- the actual type of factory.
- All Implemented Interfaces:
ModelAwareDataAwareAmetysObject,IndexableDataHolder,Content,ReactionableObject,ReportableObject,WorkflowAwareContent,ACLAmetysObject,AmetysObject,CopiableAmetysObject,DataAwareAmetysObject,ModelAwareDataAwareAmetysObject,DataHolder,ModelAwareDataHolder,DublinCoreAwareAmetysObject,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TraversableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject,WorkflowAwareAmetysObject
public class DefaultWorkflowAwareContent<F extends DefaultWorkflowAwareContentFactory>
extends DefaultContent<F>
implements WorkflowAwareContent
Default implementation of a
Content, also versionable, lockable and workflow-aware.-
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
Fields inherited from class org.ametys.cms.repository.DefaultContent
_mixins, _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
PROTECTED_PROPERTIESFields inherited from interface org.ametys.cms.repository.Content
ATTRIBUTE_TITLE, METADATA_TITLEFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionDefaultWorkflowAwareContent(javax.jcr.Node node, String parentPath, F factory) Creates a JCR-based Content. -
Method Summary
Modifier and TypeMethodDescriptionlongRetrieves the current step id of the Ametys objectRetrieves the date at which the content was proposed for validation, i.e.longRetrieves the workflow id associated with the Ametys object.voidremove()Removes thisAmetysObjectfrom the Ametys tree.voidsetCurrentStepId(long stepId) Set the current step id of the Ametys objectvoidsetProposalDate(ZonedDateTime proposalDate) Set the date at which the content was proposed for validation, i.e.voidsetWorkflowId(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.Methods inherited from class org.ametys.cms.repository.DefaultContent
addReaction, addReport, clearReports, copyTo, copyTo, copyTo, copyTo, createChild, getChild, getChildren, getCreationDate, getCreator, getDataHolder, 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, getRootAttachments, getSystemPropertyExtensionPoint, getTags, getTitle, getTitle, getTypes, hasChild, 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, 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, getRootAttachments, getTitle, getTitle, getTypes, hasReferencingContents, searchReferencingContents, setLanguage, setMixinTypes, setType, setTypes, toSAXMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getRepositoryDataMethods 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, getDataHolder, 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, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, 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.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTagsMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Constructor Details
-
DefaultWorkflowAwareContent
Creates a JCR-based Content.- Parameters:
node- the JCR Node backing this Content.parentPath- the parent path in the Ametys hierarchy.factory- the correspondingContentFactory.
-
-
Method Details
-
getWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowIdin interfaceWorkflowAwareAmetysObject- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWorkflowId
Description copied from interface:WorkflowAwareAmetysObjectSet 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:
setWorkflowIdin interfaceWorkflowAwareAmetysObject- Parameters:
workflowId- the workflow id of the object.- Throws:
AmetysRepositoryException- if an error occurs.
-
getCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the current step id of the Ametys object- Specified by:
getCurrentStepIdin interfaceWorkflowAwareAmetysObject- Returns:
- the current step id
- Throws:
AmetysRepositoryException- if an error occurs.
-
setCurrentStepId
Description copied from interface:WorkflowAwareAmetysObjectSet the current step id of the Ametys object- Specified by:
setCurrentStepIdin interfaceWorkflowAwareAmetysObject- Parameters:
stepId- the step id to set- Throws:
AmetysRepositoryException- if an error occurs.
-
getProposalDate
Description copied from interface:WorkflowAwareContentRetrieves 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:
getProposalDatein interfaceWorkflowAwareContent- Returns:
- the date at which the content was proposed for validation.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setProposalDate
Description copied from interface:WorkflowAwareContentSet 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:
setProposalDatein 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
Description copied from interface:RemovableAmetysObjectRemoves thisAmetysObjectfrom the Ametys tree.- Specified by:
removein interfaceRemovableAmetysObject- Overrides:
removein classSimpleAmetysObject<F extends DefaultWorkflowAwareContentFactory>- Throws:
AmetysRepositoryException- if an error occurs.RepositoryIntegrityViolationException- if thisAmetysObjectis referenced by another objects.
-