F - the actual type of factory.public class DefaultWebContent<F extends DefaultWebContentFactory> extends DefaultContent<F> implements WebContent
DefaultContent which is TagAwareAmetysObject.| Modifier and Type | Field and Description | 
|---|---|
static String | 
METADATA_SITE
Constants for site Metadata. 
 | 
ATTACHMENTS_NODE_NAME, 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 | 
|---|
DefaultWebContent(Node node,
                 String parentPath,
                 F factory)
Creates a  
DefaultWebContent. | 
| Modifier and Type | Method and Description | 
|---|---|
ModifiableContent | 
copyTo(ModifiableTraversableAmetysObject parent,
      String name)
Copy the current  
AmetysObject to the given object. | 
<A extends AmetysObject> | 
createChild(String name,
           String type)
Creates a child below current object. 
 | 
<A extends AmetysObject> | 
getChild(String path)
Retrieves a given child from its relative path. 
 | 
<A extends AmetysObject> | 
getChildren()
Retrieves children of the current object. 
 | 
Collection<Page> | 
getReferencingPages()
Returns all pages referencing this Content. 
 | 
Collection<ZoneItem> | 
getReferencingZoneItems()
Returns all zone items referencing this Content. 
 | 
ResourceCollection | 
getRootAttachments()
Retrieves the attachments root node 
 | 
Site | 
getSite()
Returns this object's site. 
 | 
String | 
getSiteName()
Returns this object's site name. 
 | 
boolean | 
hasChild(String name)
Tests if this Object has at least one child with the given name. 
 | 
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, getTypesaddAllowedGroups, 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, remove, rename, revertChanges, saveChangesequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCreationDate, getCreator, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getTitle, getTypesgetMetadataHoldergetDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCTypegetTagsaddAllowedGroups, 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, getDeniedUsersequals, getId, getName, getParent, getParentPath, getPath, hashCodegetChildAt, getChildPositiongetNodeneedsSave, rename, revertChanges, saveChangesremovepublic static final String METADATA_SITE
public DefaultWebContent(Node node, String parentPath, F factory)
DefaultWebContent.node - the node backing this DefaultWebContent.parentPath - the parent path in the Ametys hierarchy.factory - the DefaultWebContentFactory which creates the AmetysObject.public ModifiableContent copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException
CopiableAmetysObjectAmetysObject to the given object. Be careful, this method save changes.copyTo in interface CopiableAmetysObjectcopyTo in class DefaultContent<F extends DefaultWebContentFactory>parent - The parent of the new object. Can not be null.name - Name of the new object. Can be null. If null, the new name will be get from the copied objectAmetysRepositoryException - if an error occurs.public Collection<Page> getReferencingPages()
WebContentgetReferencingPages in interface WebContentpublic Collection<ZoneItem> getReferencingZoneItems()
WebContentgetReferencingZoneItems in interface WebContentpublic ResourceCollection getRootAttachments() throws AmetysRepositoryException
ContentgetRootAttachments in interface ContentgetRootAttachments in interface WebContentgetRootAttachments in class DefaultContent<F extends DefaultWebContentFactory>AmetysRepositoryException - if an error occurs.public Site getSite()
SiteAwareAmetysObjectgetSite in interface SiteAwareAmetysObjectpublic String getSiteName()
SiteAwareAmetysObjectgetSiteName in interface SiteAwareAmetysObjectpublic boolean hasChild(String name) throws AmetysRepositoryException
TraversableAmetysObjecthasChild in interface TraversableAmetysObjecthasChild in class DefaultContent<F extends DefaultWebContentFactory>name - the name to test. Cannot be null nor empty nor
 begin with a '/' and it cannot contain '/'.true if the named child exists,
 false otherwise.AmetysRepositoryException - if an error occurs.public <A extends AmetysObject> A createChild(String name, String type) throws AmetysRepositoryException, RepositoryIntegrityViolationException
ModifiableTraversableAmetysObjectcreateChild in interface ModifiableTraversableAmetysObjectcreateChild in class DefaultContent<F extends DefaultWebContentFactory>A - the actual type of AmetysObject.name - the name of the child, position ([n]) are not supported for
 same name sibling, the child will be added at the end of the children list.type - the type of the object.AmetysRepositoryException - if an error occurs.RepositoryIntegrityViolationException - if an object with the same name already
         exists and same name siblings is not allowed.public <A extends AmetysObject> A getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException
TraversableAmetysObjectnull, empty nor begin with a '/'.getChild in interface TraversableAmetysObjectgetChild in class DefaultContent<F extends DefaultWebContentFactory>A - the actual type of AmetysObject.path - the path of the child which can contains a position with.
 [n] if same name sibling is allowed.AmetysRepositoryException - if an error occurs.UnknownAmetysObjectException - if the object does not exist.public <A extends AmetysObject> AmetysObjectIterable<A> getChildren() throws AmetysRepositoryException
TraversableAmetysObjectgetChildren in interface TraversableAmetysObjectgetChildren in class DefaultContent<F extends DefaultWebContentFactory>A - the actual type of AmetysObjects.AmetysObjectIterable.AmetysRepositoryException - if an error occurs.