F - the actual type of factory.public class ModifiableDefaultWebContent<F extends ModifiableDefaultWebContentFactory> extends DefaultWebContent<F> implements ModifiableWebContent, ModifiableWorkflowAwareContent, LockableAmetysObject, CommentableContent
DefaultWebContent.METADATA_SITEATTACHMENTS_NODE_NAME, DEFAULT_CONTENT_LOCALE, METADATA_CONTENTTYPE, METADATA_CONTRIBUTOR, METADATA_CREATION, METADATA_CREATOR, METADATA_LANGUAGE, METADATA_LAST_MAJORVALIDATION, METADATA_LAST_VALIDATION, METADATA_MIXINCONTENTTYPES, METADATA_MODIFIED, METADATA_OUTGOING_REFERENCE_PROPERTY, METADATA_OUTGOING_REFERENCES, METADATA_OUTGOING_REFERENCES_PATH_PROPERTY, METADATA_ROOT_OUTGOING_REFERENCES, METADATA_TITLEPROTECTED_PROPERTIES| Constructor and Description |
|---|
ModifiableDefaultWebContent(Node node,
String parentPath,
F factory)
Creates a
ModifiableDefaultWebContent. |
| Modifier and Type | Method and Description |
|---|---|
Comment |
createComment()
Creates a comment
|
Comment |
getComment(String commentId)
Get a comment
|
List<Comment> |
getComments(boolean includeNotValidatedComments,
boolean includeValidatedComments)
Get the list of available comments (validated, not validated, both or none :))
|
long |
getCurrentStepId()
Retrieves the current step id of the Ametys object
|
UserIdentity |
getLockOwner()
Returns the owner of the lock, or null if none
|
Date |
getProposalDate()
Retrieves the date at which the content was proposed for validation,
i.e.
|
long |
getWorkflowId()
Retrieves the workflow id associated with the Ametys object.
|
boolean |
isLocked()
Returns true if this
AmetysObject is locked |
void |
lock()
Locks this
AmetysObject |
void |
remove()
Removes this
AmetysObject from the Ametys tree. |
void |
setCreationDate(Date creationDate)
Set the creation date.
|
void |
setCreator(UserIdentity user)
Set the login of the creator.
|
void |
setCurrentStepId(long stepId)
Set the current step id of the Ametys object
|
void |
setDCContributor(String contributor)
Set the Dublin Core contributor.
|
void |
setDCCoverage(String coverage)
Set the Dublin Core coverage.
|
void |
setDCCreator(String creator)
Set the Dublin Core creator.
|
void |
setDCDate(Date date)
Set the Dublin Core date.
|
void |
setDCDescription(String description)
Set the Dublin Core description.
|
void |
setDCFormat(String format)
Set the Dublin Core format.
|
void |
setDCIdentifier(String identifier)
Set the Dublin Core identifier.
|
void |
setDCLanguage(String language)
Set the Dublin Core language.
|
void |
setDCPublisher(String publisher)
Set the Dublin Core publisher.
|
void |
setDCRelation(String relation)
Set the Dublin Core relation.
|
void |
setDCRights(String rights)
Set the Dublin Core rights.
|
void |
setDCSource(String source)
Set the Dublin Core source.
|
void |
setDCSubject(String[] subject)
Set the Dublin Core subject.
|
void |
setDCTitle(String title)
Set the Dublin Core title.
|
void |
setDCType(String type)
Set the Dublin Core type.
|
void |
setLanguage(String language)
Set the type of this Content.
This method may only be called on a new Content, ie. |
void |
setLastContributor(UserIdentity user)
Set the login of the last contributor.
|
void |
setLastMajorValidationDate(Date validationDate)
Set the last validation date resulting from a major modification
|
void |
setLastModified(Date lastModified)
Set the last modification date.
|
void |
setLastValidationDate(Date validationDate)
Set the last validation date
|
void |
setMixinTypes(String[] mixins)
Set the mixins of this Content.
|
void |
setOutgoingReferences(Map<String,OutgoingReferences> references)
Store the outgoing references of the content.
|
void |
setProposalDate(Date proposalDate)
Set the date at which the content was proposed for validation, i.e.
|
void |
setSiteName(String siteName)
Set the site name.
|
void |
setTitle(String title)
Deprecated.
|
void |
setTitle(String title,
Locale locale)
Set the title from the given locale
|
void |
setType(String type)
Set the type of this content
|
void |
setTypes(String[] types)
Set the types of this Content.
|
void |
setWorkflowId(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. |
void |
tag(String tag)
Tags.
|
void |
unlock()
Unlocks this
AmetysObject |
void |
untag(String tag)
Untags.
|
copyTo, createChild, getChild, getChildren, getReferencingPages, getReferencingZoneItems, getRootAttachments, getSite, getSiteName, hasChildcopyTo, copyTo, copyTo, copyTo, getCreationDate, getCreator, getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getTags, getTitle, getTitle, getTypes, hasReferencingContentsaddAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, getAllLabels, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getAllRevisions, getBaseNode, getBaseVersion, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, getLabels, getLabels, getNode, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedMetadataHolder, getVersionHistory, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevision_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, rename, revertChanges, saveChangesequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetReferencingPages, getReferencingZoneItems, getRootAttachmentscreateChildgetChild, getChildAt, getChildPosition, getChildren, hasChildgetSite, getSiteNamegetNodeneedsSave, rename, revertChanges, saveChangesequals, getId, getName, getParent, getParentPath, getPath, hashCodegetCreationDate, getCreator, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getTitle, getTitle, getTypes, hasReferencingContentsaddAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsersgetAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsersgetDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCTypegetTagspublic ModifiableDefaultWebContent(Node node, String parentPath, F factory)
ModifiableDefaultWebContent.node - the node backing this ModifiableDefaultWebContent.parentPath - the parent path in the Ametys hierarchy.factory - the DefaultWebContentFactory which creates the AmetysObject.public long getWorkflowId() throws AmetysRepositoryException
WorkflowAwareAmetysObjectgetWorkflowId in interface WorkflowAwareAmetysObjectAmetysRepositoryException - if an error occurs.public void setWorkflowId(long workflowId) throws AmetysRepositoryException
WorkflowAwareAmetysObjectsetWorkflowId in interface WorkflowAwareAmetysObjectworkflowId - the workflow id of the object.AmetysRepositoryException - if an error occurs.public long getCurrentStepId() throws AmetysRepositoryException
WorkflowAwareAmetysObjectgetCurrentStepId in interface WorkflowAwareAmetysObjectAmetysRepositoryException - if an error occurs.public void setCurrentStepId(long stepId) throws AmetysRepositoryException
WorkflowAwareAmetysObjectsetCurrentStepId in interface WorkflowAwareAmetysObjectstepId - the step id to setAmetysRepositoryException - if an error occurs.public Date getProposalDate() throws AmetysRepositoryException
WorkflowAwareContentgetProposalDate in interface WorkflowAwareContentAmetysRepositoryException - if an error occurs.public void setProposalDate(Date proposalDate) throws AmetysRepositoryException
WorkflowAwareContentsetProposalDate in interface WorkflowAwareContentproposalDate - the date at which the content was proposed for validation, or null to remove it.AmetysRepositoryException - if an error occurs.public void remove() throws AmetysRepositoryException, RepositoryIntegrityViolationException
RemovableAmetysObjectAmetysObject from the Ametys tree.remove in interface RemovableAmetysObjectremove in class SimpleAmetysObject<F extends ModifiableDefaultWebContentFactory>AmetysRepositoryException - if an error occurs.RepositoryIntegrityViolationException - if this AmetysObject is referenced by another objects.public void setSiteName(String siteName)
ModifiableSiteAwareAmetysObjectsetSiteName in interface ModifiableSiteAwareAmetysObjectsiteName - the site name.public void setType(String type) throws AmetysRepositoryException
type - the type to setAmetysRepositoryException - if something goes wrong when setting the type property of the content in JCRpublic void setTypes(String[] types) throws AmetysRepositoryException
ModifiableContentsetTypes in interface ModifiableContenttypes - the types of this content.AmetysRepositoryException - if an error occurs.public void setMixinTypes(String[] mixins) throws AmetysRepositoryException
ModifiableContentsetMixinTypes in interface ModifiableContentmixins - the mixins of this content.AmetysRepositoryException - if an error occurs.public void setLanguage(String language) throws AmetysRepositoryException
ModifiableContentsetLanguage in interface ModifiableContentlanguage - the language of this content.AmetysRepositoryException - if an error occurs.public void setTitle(String title, Locale locale) throws AmetysRepositoryException
ModifiableContentsetTitle in interface ModifiableContenttitle - the title.locale - The localeAmetysRepositoryException - if an error occurs.@Deprecated public void setTitle(String title) throws AmetysRepositoryException
ModifiableContentModifiableContent.setTitle(String, Locale) instead.setTitle in interface ModifiableContenttitle - the title.AmetysRepositoryException - if an error occurs.public void setCreator(UserIdentity user) throws AmetysRepositoryException
ModifiableContentsetCreator in interface ModifiableContentuser - the creator.AmetysRepositoryException - if an error occurs.public void setCreationDate(Date creationDate) throws AmetysRepositoryException
ModifiableContentsetCreationDate in interface ModifiableContentcreationDate - the creation date.AmetysRepositoryException - if an error occurs.public void setLastContributor(UserIdentity user)
ModifiableContentsetLastContributor in interface ModifiableContentuser - the last contributor.public void setLastModified(Date lastModified) throws AmetysRepositoryException
ModifiableContentsetLastModified in interface ModifiableContentlastModified - the last modification date.AmetysRepositoryException - if an error occurs.public void setLastValidationDate(Date validationDate) throws AmetysRepositoryException
ModifiableContentsetLastValidationDate in interface ModifiableContentvalidationDate - the validation date.AmetysRepositoryException - if an error occurs.public void setLastMajorValidationDate(Date validationDate) throws AmetysRepositoryException
ModifiableContentsetLastMajorValidationDate in interface ModifiableContentvalidationDate - the validation date.AmetysRepositoryException - if an error occurs.public void setOutgoingReferences(Map<String,OutgoingReferences> references) throws AmetysRepositoryException
ModifiableContentsetOutgoingReferences in interface ModifiableContentreferences - A non null map of outgoing references grouped by metadata (key are metadata path)AmetysRepositoryException - if an error occurs.public void tag(String tag) throws AmetysRepositoryException
TaggableAmetysObjecttag in interface TaggableAmetysObjecttag - the tag to add.AmetysRepositoryException - if an error occurs.public void untag(String tag) throws AmetysRepositoryException
TaggableAmetysObjectuntag in interface TaggableAmetysObjecttag - the tag to remove.AmetysRepositoryException - if an error occurs.public void lock() throws AmetysRepositoryException
LockableAmetysObjectAmetysObjectlock in interface LockableAmetysObjectAmetysRepositoryException - if a problem occurspublic void unlock() throws AmetysRepositoryException
LockableAmetysObjectAmetysObjectunlock in interface LockableAmetysObjectAmetysRepositoryException - if a problem occurspublic boolean isLocked() throws AmetysRepositoryException
LockAwareAmetysObjectAmetysObject is lockedisLocked in interface LockAwareAmetysObjectAmetysObject is lockedAmetysRepositoryException - if a problem occurspublic UserIdentity getLockOwner() throws AmetysRepositoryException
LockAwareAmetysObjectgetLockOwner in interface LockAwareAmetysObjectAmetysRepositoryException - if a problem occurspublic void setDCTitle(String title) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCTitle in interface ModifiableDublinCoreAwareAmetysObjecttitle - the Dublin Core title to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCCreator(String creator) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCCreator in interface ModifiableDublinCoreAwareAmetysObjectcreator - the Dublin Core creator to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCSubject(String[] subject) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCSubject in interface ModifiableDublinCoreAwareAmetysObjectsubject - the Dublin Core subject to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCDescription(String description) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCDescription in interface ModifiableDublinCoreAwareAmetysObjectdescription - the Dublin Core description to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCPublisher(String publisher) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCPublisher in interface ModifiableDublinCoreAwareAmetysObjectpublisher - the Dublin Core publisher to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCContributor(String contributor) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCContributor in interface ModifiableDublinCoreAwareAmetysObjectcontributor - the Dublin Core contributor to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCDate(Date date) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCDate in interface ModifiableDublinCoreAwareAmetysObjectdate - the Dublin Core date to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCType(String type) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCType in interface ModifiableDublinCoreAwareAmetysObjecttype - the Dublin Core type to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCFormat(String format) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCFormat in interface ModifiableDublinCoreAwareAmetysObjectformat - the Dublin Core format to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCIdentifier(String identifier) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCIdentifier in interface ModifiableDublinCoreAwareAmetysObjectidentifier - the Dublin Core identifier to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCSource(String source) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCSource in interface ModifiableDublinCoreAwareAmetysObjectsource - the Dublin Core source to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCLanguage(String language) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCLanguage in interface ModifiableDublinCoreAwareAmetysObjectlanguage - the Dublin Core language to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCRelation(String relation) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCRelation in interface ModifiableDublinCoreAwareAmetysObjectrelation - the Dublin Core relation to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCCoverage(String coverage) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCCoverage in interface ModifiableDublinCoreAwareAmetysObjectcoverage - the Dublin Core coverage to set. Can be null.AmetysRepositoryException - if an error occurs.public void setDCRights(String rights) throws AmetysRepositoryException
ModifiableDublinCoreAwareAmetysObjectsetDCRights in interface ModifiableDublinCoreAwareAmetysObjectrights - the Dublin Core rights to set. Can be null.AmetysRepositoryException - if an error occurs.public Comment createComment()
CommentableContentcreateComment in interface CommentableContentpublic Comment getComment(String commentId) throws AmetysRepositoryException
CommentableContentgetComment in interface CommentableContentcommentId - The commentAmetysRepositoryException - if the comment does not existpublic List<Comment> getComments(boolean includeNotValidatedComments, boolean includeValidatedComments) throws AmetysRepositoryException
CommentableContentgetComments in interface CommentableContentincludeNotValidatedComments - true to get the non validated comments.includeValidatedComments - true to get the validated comment.AmetysRepositoryException - if an error occured