Class DefaultPage<F extends DefaultPageFactory>
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<F>
-
- org.ametys.web.repository.page.jcr.DefaultPage<F>
-
- Type Parameters:
F- the actual type of factory.
- All Implemented Interfaces:
ACLAmetysObject,AmetysObject,CopiableAmetysObject,DataAwareAmetysObject,ModelLessDataAwareAmetysObject,ModifiableModelLessDataAwareAmetysObject,DataHolder,ModelLessDataHolder,ModifiableDataHolder,ModifiableModelLessDataHolder,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,MovableAmetysObject,RemovableAmetysObject,TagAwareAmetysObject,TaggableAmetysObject,TraversableAmetysObject,MetadataAwarePagesContainer,ModifiablePage,MoveablePage,Page,PagesContainer,SiteAwareAmetysObject
public class DefaultPage<F extends DefaultPageFactory> extends DefaultTraversableAmetysObject<F> implements ModifiablePage, CopiableAmetysObject, MoveablePage
Pageimplementation stored into a JCR node usingametys:defaultPagenode type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.Page
Page.LinkType, Page.PageType
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTACHMENTS_NODE_NAMEConstant for the attachment node name.static StringMETADATA_LONG_TITLEConstant for long title metadata.static StringMETADATA_PUBLICATION_END_DATEConstant for publication end date metadata.static StringMETADATA_PUBLICATION_START_DATEConstant for publication start date metadata.static StringMETADATA_REFERERSConstant for referers metadata.static StringMETADATA_ROBOTS_DISALLOWConstant for robots metadata.static StringMETADATA_SITEConstants for site Metadata*static StringMETADATA_SITEMAPConstants for sitemap Metadata*static StringMETADATA_TEMPLATEConstant for template metadata.static StringMETADATA_TITLEConstant for title metadata.static StringMETADATA_TYPEConstant for title metadata.static StringMETADATA_URLConstant for title metadata.static StringMETADATA_URLTYPEConstant for title metadata.static StringMETADATA_VISIBLEConstant for the visible attribute.static StringZONE_NODE_TYPEConstant for the zone node type.static StringZONES_NODE_NAMEConstant for the zones node name.static StringZONES_NODE_TYPEConstant for the zones node type.
-
Constructor Summary
Constructors Constructor Description DefaultPage(Node node, String parentPath, F factory)Creates aDefaultPage.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddReferer(String ametysObjectId)Add a newAmetysObjectreferencing this page.booleancanMoveTo(AmetysObject newParent)Test if a move can be a success or if it is impossible (e.g.voidcopyTo(ModifiableDataHolder dataHolder)Copies the currentDataHolderto the givenModifiableModelAwareDataHolder.DefaultPagecopyTo(ModifiableTraversableAmetysObject parent, String name)Copy the currentAmetysObjectto the given object.DefaultPagecopyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo)Copy the currentAmetysObjectto the given object if it is not in the restriction list.ModifiableZonecreateZone(String name)Creates a given zone.voiddataToSAX(ContentHandler contentHandler, String dataPath, DataContext context)Generates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given pathvoiddataToSAX(ContentHandler contentHandler, DataContext context)Generates SAX events for data contained in thisDataHolderPagegetChildPageAt(int index)Gets the childPageat the given positionAmetysObjectIterable<? extends Page>getChildrenPages()Retrieves child pages.AmetysObjectIterable<? extends Page>getChildrenPages(boolean includeInvisiblePage)Retrieves child pages.ModifiableModelLessDataHoldergetDataHolder()Returns theDataHolderof thisAmetysObject.intgetDepth()Get the page depthStringgetLongTitle()Retrieves the long title.ModifiableCompositeMetadatagetMetadataHolder()Returns the rootCompositeMetadataof thisAmetysObject.StringgetPathInSitemap()Computes the path relative to the current sitemap.Set<String>getReferers()Retrieves allAmetysObjectids referencing this page.ResourceCollectiongetRootAttachments()Retrieves the attachments root nodeSitegetSite()Returns this object's site.SitemapgetSitemap()Retrieves the sitemap containing the current sitemap.StringgetSitemapName()Returns this page's sitemap nameStringgetSiteName()Returns this object's site name.Set<String>getTags()Retrieves current tags.StringgetTemplate()Retrieves the template name.ModifiableModelAwareDataHoldergetTemplateParametersHolder()Get the view parametersStringgetTitle()Retrieves the title.Page.PageTypegetType()Retrieves the type.StringgetURL()Retrieves the linked URL.Page.LinkTypegetURLType()Retrieves the linked URL type.ModifiableZonegetZone(String name)Retrieves a given zone.AmetysObjectIterable<ModifiableZone>getZones()Retrieves the zones.booleanhasZone(String name)Determine if a zone existsbooleanisVisible()Determine if the page is visible into navigation elementsvoidmoveTo(AmetysObject newParent, boolean renameIfExist)Move the current object as a new child of the given object.voidorderBefore(AmetysObject siblingNode)Order a node before another sibling node (or as the last node)voidremoveReferer(String ametysObjectId)Removes anAmetysObjectreferencing this page.voidsetLongTitle(String title)Set the long title.voidsetSitemapName(String sitemapName)Set the sitemap name.voidsetSiteName(String siteName)Set the site name.voidsetTemplate(String template)Set the template name.voidsetTitle(String title)Set the title.voidsetType(Page.PageType type)Set the type.voidsetURL(Page.LinkType type, String url)Set the linked URL.voidsetVisible(boolean isVisible)Set the visibility of the pagevoidtag(String tag)Tags.voiduntag(String tag)Untags.-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getName, getNode, 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.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
getComposite, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValueOrEmpty, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX, hasValue, hasValueOrEmpty
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValues
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
-
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
-
-
-
Field Detail
-
METADATA_TITLE
public static final String METADATA_TITLE
Constant for title metadata.- See Also:
- Constant Field Values
-
METADATA_LONG_TITLE
public static final String METADATA_LONG_TITLE
Constant for long title metadata.- See Also:
- Constant Field Values
-
METADATA_TYPE
public static final String METADATA_TYPE
Constant for title metadata.- See Also:
- Constant Field Values
-
METADATA_URL
public static final String METADATA_URL
Constant for title metadata.- See Also:
- Constant Field Values
-
METADATA_URLTYPE
public static final String METADATA_URLTYPE
Constant for title metadata.- See Also:
- Constant Field Values
-
METADATA_TEMPLATE
public static final String METADATA_TEMPLATE
Constant for template metadata.- See Also:
- Constant Field Values
-
METADATA_REFERERS
public static final String METADATA_REFERERS
Constant for referers metadata.- See Also:
- Constant Field Values
-
METADATA_VISIBLE
public static final String METADATA_VISIBLE
Constant for the visible attribute.- See Also:
- Constant Field Values
-
METADATA_ROBOTS_DISALLOW
public static final String METADATA_ROBOTS_DISALLOW
Constant for robots metadata.- See Also:
- Constant Field Values
-
ZONES_NODE_NAME
public static final String ZONES_NODE_NAME
Constant for the zones node name.- See Also:
- Constant Field Values
-
ZONES_NODE_TYPE
public static final String ZONES_NODE_TYPE
Constant for the zones node type.- See Also:
- Constant Field Values
-
ZONE_NODE_TYPE
public static final String ZONE_NODE_TYPE
Constant for the zone node type.- See Also:
- Constant Field Values
-
ATTACHMENTS_NODE_NAME
public static final String ATTACHMENTS_NODE_NAME
Constant for the attachment node name.- See Also:
- Constant Field Values
-
METADATA_SITE
public static final String METADATA_SITE
Constants for site Metadata*- See Also:
- Constant Field Values
-
METADATA_SITEMAP
public static final String METADATA_SITEMAP
Constants for sitemap Metadata*- See Also:
- Constant Field Values
-
METADATA_PUBLICATION_START_DATE
public static final String METADATA_PUBLICATION_START_DATE
Constant for publication start date metadata.- See Also:
- Constant Field Values
-
METADATA_PUBLICATION_END_DATE
public static final String METADATA_PUBLICATION_END_DATE
Constant for publication end date metadata.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultPage
public DefaultPage(Node node, String parentPath, F factory)
Creates aDefaultPage.- Parameters:
node- the node backing thisAmetysObject.parentPath- the parent path in the Ametys hierarchy.factory- theDefaultPageFactorywhich creates the AmetysObject.
-
-
Method Detail
-
getTags
public Set<String> getTags() throws AmetysRepositoryException
Description copied from interface:TagAwareAmetysObjectRetrieves current tags.- Specified by:
getTagsin interfaceTagAwareAmetysObject- Returns:
- the current tags.
- Throws:
AmetysRepositoryException- if an error occurs.
-
tag
public void tag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObjectTags.- Specified by:
tagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to add.- Throws:
AmetysRepositoryException- if an error occurs.
-
untag
public void untag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObjectUntags.- Specified by:
untagin interfaceTaggableAmetysObject- Parameters:
tag- the tag to remove.- Throws:
AmetysRepositoryException- if an error occurs.
-
getTitle
public String getTitle() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the title.- Specified by:
getTitlein interfacePage- Returns:
- the title.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setTitle
public void setTitle(String title) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the title.- Specified by:
setTitlein interfaceModifiablePage- Parameters:
title- the title.- Throws:
AmetysRepositoryException- if an error occurs.
-
getLongTitle
public String getLongTitle() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the long title.- Specified by:
getLongTitlein interfacePage- Returns:
- the title.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setLongTitle
public void setLongTitle(String title) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the long title.- Specified by:
setLongTitlein interfaceModifiablePage- Parameters:
title- the title.- Throws:
AmetysRepositoryException- if an error occurs.
-
getSitemap
public Sitemap getSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainerRetrieves the sitemap containing the current sitemap.- Specified by:
getSitemapin interfacePagesContainer- Returns:
- the sitemap containing the current sitemap.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getDepth
public int getDepth() throws AmetysRepositoryException
Description copied from interface:PageGet the page depth- Specified by:
getDepthin interfacePage- Returns:
- the page depth
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSite
public Site getSite() throws AmetysRepositoryException
Description copied from interface:SiteAwareAmetysObjectReturns this object's site.- Specified by:
getSitein interfaceSiteAwareAmetysObject- Returns:
- this object's site
- Throws:
AmetysRepositoryException- if an error occurs.
-
getSiteName
public String getSiteName()
Description copied from interface:SiteAwareAmetysObjectReturns this object's site name.- Specified by:
getSiteNamein interfaceSiteAwareAmetysObject- Returns:
- this object's site name.
-
setSiteName
public void setSiteName(String siteName)
Description copied from interface:ModifiablePageSet the site name.- Specified by:
setSiteNamein interfaceModifiablePage- Parameters:
siteName- the site name.
-
getSitemapName
public String getSitemapName() throws AmetysRepositoryException
Description copied from interface:PagesContainerReturns this page's sitemap name- Specified by:
getSitemapNamein interfacePagesContainer- Returns:
- this page's sitemap name
- Throws:
AmetysRepositoryException- if an error occurs.
-
setSitemapName
public void setSitemapName(String sitemapName) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the sitemap name.- Specified by:
setSitemapNamein interfaceModifiablePage- Parameters:
sitemapName- the sitemap name.- Throws:
AmetysRepositoryException- if an error occurs.
-
getPathInSitemap
public String getPathInSitemap() throws AmetysRepositoryException
Description copied from interface:PagesContainerComputes the path relative to the current sitemap.- Specified by:
getPathInSitemapin interfacePagesContainer- Returns:
- the path relative to the current sitemap.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getType
public Page.PageType getType() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the type.- Specified by:
getTypein interfacePage- Returns:
- the type.
- Throws:
AmetysRepositoryException- if an error occurs.- See Also:
Page.PageType
-
setType
public void setType(Page.PageType type) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the type.- Specified by:
setTypein interfaceModifiablePage- Parameters:
type- the type.- Throws:
AmetysRepositoryException- if an error occurs.- See Also:
Page.PageType
-
getURL
public String getURL() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the linked URL.- Specified by:
getURLin interfacePage- Returns:
- the linked URL.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getURLType
public Page.LinkType getURLType() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the linked URL type.- Specified by:
getURLTypein interfacePage- Returns:
- the linked URL type.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setURL
public void setURL(Page.LinkType type, String url) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the linked URL.- Specified by:
setURLin interfaceModifiablePage- Parameters:
type- the type of linkurl- the linked URL (depending on the type)- Throws:
AmetysRepositoryException- if an error occurs.
-
getTemplate
public String getTemplate() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the template name.- Specified by:
getTemplatein interfacePage- Returns:
- the template name or
nullif none has been set. - Throws:
AmetysRepositoryException- if an error occurs.
-
setTemplate
public void setTemplate(String template) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the template name.- Specified by:
setTemplatein interfaceModifiablePage- Parameters:
template- the template name.- Throws:
AmetysRepositoryException- if an error occurs.
-
getZones
public AmetysObjectIterable<ModifiableZone> getZones() throws AmetysRepositoryException
Description copied from interface:ModifiablePageRetrieves the zones.- Specified by:
getZonesin interfaceModifiablePage- Specified by:
getZonesin interfacePage- Returns:
- the zones.
- Throws:
AmetysRepositoryException- if an error occurs.
-
hasZone
public boolean hasZone(String name) throws AmetysRepositoryException
Description copied from interface:PageDetermine if a zone exists- Specified by:
hasZonein interfacePage- Parameters:
name- The name of the zone- Returns:
- true if the zone exists
- Throws:
AmetysRepositoryException- If an error occured
-
getZone
public ModifiableZone getZone(String name) throws UnknownZoneException, AmetysRepositoryException
Description copied from interface:ModifiablePageRetrieves a given zone.- Specified by:
getZonein interfaceModifiablePage- Specified by:
getZonein interfacePage- Parameters:
name- the name of the zone.- Returns:
- the given zone.
- Throws:
UnknownZoneException- if there is no zone for the given name.AmetysRepositoryException- if an error occurs.
-
createZone
public ModifiableZone createZone(String name) throws AmetysRepositoryException
Description copied from interface:ModifiablePageCreates a given zone.- Specified by:
createZonein interfaceModifiablePage- Parameters:
name- the name of the zone.- Returns:
- the given zone.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getRootAttachments
public ResourceCollection getRootAttachments() throws AmetysRepositoryException
Description copied from interface:PageRetrieves the attachments root node- Specified by:
getRootAttachmentsin interfacePage- Returns:
- The the attachments root node
- Throws:
AmetysRepositoryException- if an error occurs.
-
getReferers
public Set<String> getReferers() throws AmetysRepositoryException
Description copied from interface:PageRetrieves allAmetysObjectids referencing this page.- Specified by:
getReferersin interfacePage- Returns:
- the
AmetysObjectids referencing this page. - Throws:
AmetysRepositoryException- if an error occurs.
-
addReferer
public void addReferer(String ametysObjectId) throws AmetysRepositoryException
Description copied from interface:ModifiablePageAdd a newAmetysObjectreferencing this page.- Specified by:
addRefererin interfaceModifiablePage- Parameters:
ametysObjectId- theAmetysObjectids referencing this page.- Throws:
AmetysRepositoryException- if an error occurs.
-
removeReferer
public void removeReferer(String ametysObjectId) throws AmetysRepositoryException
Description copied from interface:ModifiablePageRemoves anAmetysObjectreferencing this page.- Specified by:
removeRefererin interfaceModifiablePage- Parameters:
ametysObjectId- theAmetysObjectids referencing this page.- Throws:
AmetysRepositoryException- if an error occurs.
-
getChildrenPages
public AmetysObjectIterable<? extends Page> getChildrenPages() throws AmetysRepositoryException
Description copied from interface:PagesContainerRetrieves child pages.- Specified by:
getChildrenPagesin interfacePagesContainer- Returns:
- the child pages.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getChildrenPages
public AmetysObjectIterable<? extends Page> getChildrenPages(boolean includeInvisiblePage) throws AmetysRepositoryException
Description copied from interface:PagesContainerRetrieves child pages.- Specified by:
getChildrenPagesin interfacePagesContainer- Parameters:
includeInvisiblePage- true to include invisible pages- Returns:
- the child pages.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getChildPageAt
public Page getChildPageAt(int index) throws UnknownAmetysObjectException, AmetysRepositoryException
Description copied from interface:PagesContainerGets the childPageat the given position- Specified by:
getChildPageAtin interfacePagesContainer- Parameters:
index- the position of thePagewithin the ordered set of its sibling objects.- Returns:
- the
Pageif found - Throws:
UnknownAmetysObjectException- if no child page was found at this positionAmetysRepositoryException- if an error occurs
-
copyTo
public DefaultPage copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) throws AmetysRepositoryException
Description copied from interface:CopiableAmetysObjectCopy the currentAmetysObjectto the given object if it is not in the restriction list. Be careful, this method save changes.- Specified by:
copyToin interfaceCopiableAmetysObject- Parameters:
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 objectrestrictTo- A restrict list ofCopiableAmetysObjectauthorized to be copied- Returns:
- the created object
- Throws:
AmetysRepositoryException- if an error occurs.
-
copyTo
public DefaultPage copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException
Description copied from interface:CopiableAmetysObjectCopy the currentAmetysObjectto the given object. Be careful, this method save changes.- Specified by:
copyToin interfaceCopiableAmetysObject- Parameters:
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 object- Returns:
- the created object
- Throws:
AmetysRepositoryException- if an error occurs.
-
copyTo
public void copyTo(ModifiableDataHolder dataHolder) throws UndefinedItemPathException, BadItemTypeException, UnknownTypeException, NotUniqueTypeException
Description copied from interface:DataHolderCopies the currentDataHolderto the givenModifiableModelAwareDataHolder.- Specified by:
copyToin interfaceDataAwareAmetysObject- Specified by:
copyToin interfaceDataHolder- Parameters:
dataHolder- The destination dataHolder. Can not be null.- Throws:
UndefinedItemPathException- if one of the copied data is not defined by the model of the destinationModifiableModelAwareDataHolderBadItemTypeException- if the type defined by the model of the destinationModifiableModelAwareDataHolderdoesn't match the copied valueUnknownTypeException- if there is no available type compatible with the copied value for the type extension point of the destinationModifiableModelLessDataHolderNotUniqueTypeException- if there is more than one available types compatibles with the copied value for the type extension point of the destinationModifiableModelLessDataHolder
-
moveTo
public void moveTo(AmetysObject newParent, boolean renameIfExist) throws AmetysRepositoryException, RepositoryIntegrityViolationException
Description copied from interface:MovableAmetysObjectMove the current object as a new child of the given object. This node will be the last child. You should call canMoveTo to know if this is a supported operation.- Specified by:
moveToin interfaceMovableAmetysObject- Parameters:
newParent- The new parent for the current object. Can not be null. Can not be a child of the current node. Must be a TraversableAmetyObject.renameIfExist- true to rename moved page if a page with same name already exist- Throws:
AmetysRepositoryException- if an error occurs.RepositoryIntegrityViolationException- if a page with the same name already exists.
-
canMoveTo
public boolean canMoveTo(AmetysObject newParent) throws AmetysRepositoryException
Description copied from interface:MovableAmetysObjectTest if a move can be a success or if it is impossible (e.g. due to the implementation of the target)- Specified by:
canMoveToin interfaceMovableAmetysObject- Parameters:
newParent- See moveTo.- Returns:
- true if the move operation may succeed. If false is returned and you call moveTo anyway, you may encontered a RuntimeException (such as UnsupportedOperationException)
- Throws:
AmetysRepositoryException- if an error occurs.
-
orderBefore
public void orderBefore(AmetysObject siblingNode) throws AmetysRepositoryException
Description copied from interface:MovableAmetysObjectOrder a node before another sibling node (or as the last node)- Specified by:
orderBeforein interfaceMovableAmetysObject- Parameters:
siblingNode- The node that will be the next sibling node of the current node. Must have the same parent as the current node. Can be null to set the current node as the last node.- Throws:
AmetysRepositoryException- if an error occurs.
-
isVisible
public boolean isVisible() throws AmetysRepositoryException
Description copied from interface:PageDetermine if the page is visible into navigation elements- Specified by:
isVisiblein interfacePage- Returns:
- true if the page is visible.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setVisible
public void setVisible(boolean isVisible) throws AmetysRepositoryException
Description copied from interface:ModifiablePageSet the visibility of the page- Specified by:
setVisiblein interfaceModifiablePage- Parameters:
isVisible- the page visibility.- Throws:
AmetysRepositoryException- if an error occurs.
-
getDataHolder
public ModifiableModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getMetadataHolder
public ModifiableCompositeMetadata getMetadataHolder()
Description copied from class:SimpleAmetysObjectReturns the rootCompositeMetadataof thisAmetysObject.- Specified by:
getMetadataHolderin interfaceMetadataAwareAmetysObject- Specified by:
getMetadataHolderin interfaceModifiableMetadataAwareAmetysObject- Overrides:
getMetadataHolderin classSimpleAmetysObject<F extends DefaultPageFactory>- Returns:
- the root
CompositeMetadataof thisAmetysObject
-
getTemplateParametersHolder
public ModifiableModelAwareDataHolder getTemplateParametersHolder() throws AmetysRepositoryException
Description copied from interface:ModifiablePageGet the view parameters- Specified by:
getTemplateParametersHolderin interfaceModifiablePage- Specified by:
getTemplateParametersHolderin interfacePage- Returns:
- the view parameters
- Throws:
AmetysRepositoryException- if an error occurs.
-
dataToSAX
public void dataToSAX(ContentHandler contentHandler, DataContext context) throws SAXException, UnknownTypeException, NotUniqueTypeException
Description copied from interface:ModelLessDataHolderGenerates SAX events for data contained in thisDataHolder- Specified by:
dataToSAXin interfaceModelLessDataAwareAmetysObject- Specified by:
dataToSAXin interfaceModelLessDataHolder- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventscontext- The context of the data to SAX- Throws:
SAXException- if an error occurs during the SAX events generationUnknownTypeException- if there is no compatible type with the saxed valueNotUniqueTypeException- if there are many compatible types (there is no way to determine which type is the good one) with the saxed value
-
dataToSAX
public void dataToSAX(ContentHandler contentHandler, String dataPath, DataContext context) throws SAXException
Description copied from interface:DataHolderGenerates SAX events for the data at the given data path in the currentDataHolderDo not generate any event if there is no values at the given path- Specified by:
dataToSAXin interfaceDataAwareAmetysObject- Specified by:
dataToSAXin interfaceDataHolder- Parameters:
contentHandler- theContentHandlerthat will receive the SAX eventsdataPath- the path of the data to SAXcontext- The context of the data to SAX- Throws:
SAXException- if an error occurs during the SAX events generation
-
-