Class AbstractOdfPage
- java.lang.Object
-
- org.ametys.plugins.odfweb.repository.AbstractOdfPage
-
- All Implemented Interfaces:
TagAwareAmetysObject
,AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,TraversableAmetysObject
,MetadataAwarePagesContainer
,Page
,PagesContainer
,SiteAwareAmetysObject
- Direct Known Subclasses:
AbstractLevelPage
,CoursePage
,ProgramPage
public abstract class AbstractOdfPage extends Object implements Page
Common class for ODF virtual pages
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.Page
Page.LinkType, Page.PageType
-
-
Constructor Summary
Constructors Constructor Description AbstractOdfPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page
getChildPageAt(int index)
Gets the childPage
at the given positionAmetysObjectIterable<? extends AmetysObject>
getChildren()
Retrieves children of the current object.AmetysObjectIterable<? extends Page>
getChildrenPages(boolean includeInvisiblePages)
Retrieves child pages.String
getPath()
Retrieves the path of the current object.Set<String>
getReferers()
Retrieves allAmetysObject
ids referencing this page.ResourceCollection
getRootAttachments()
Retrieves the attachments root nodeSet<String>
getTags()
Retrieves current tags.Page.PageType
getType()
Retrieves the type.String
getURL()
Retrieves the linked URL.Page.LinkType
getURLType()
Retrieves the linked URL type.boolean
hasZone(String name)
Determine if a zone existsboolean
isVisible()
Determine if the page is visible into navigation elements-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
dataToSAX
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getComposite, getDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX
-
Methods inherited from interface org.ametys.web.repository.page.Page
getDepth, getLongTitle, getTemplate, getTemplateParametersHolder, getTitle, getZone, getZones
-
Methods inherited from interface org.ametys.web.repository.page.PagesContainer
getChildrenPages, getPathInSitemap, getSitemap, getSitemapName
-
Methods inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
getSite, getSiteName
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, hasChild
-
-
-
-
Constructor Detail
-
AbstractOdfPage
public AbstractOdfPage()
-
-
Method Detail
-
getReferers
public Set<String> getReferers() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves allAmetysObject
ids referencing this page.- Specified by:
getReferers
in interfacePage
- Returns:
- the
AmetysObject
ids referencing this page. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getRootAttachments
public ResourceCollection getRootAttachments() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the attachments root node- Specified by:
getRootAttachments
in interfacePage
- Returns:
- The the attachments root node
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getType
public Page.PageType getType() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the type.- Specified by:
getType
in interfacePage
- Returns:
- the type.
- Throws:
AmetysRepositoryException
- if an error occurs.- See Also:
Page.PageType
-
getURL
public String getURL() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the linked URL.- Specified by:
getURL
in interfacePage
- Returns:
- the linked URL.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getURLType
public Page.LinkType getURLType() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the linked URL type.- Specified by:
getURLType
in interfacePage
- Returns:
- the linked URL type.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
hasZone
public boolean hasZone(String name) throws AmetysRepositoryException
Description copied from interface:Page
Determine if a zone exists- Specified by:
hasZone
in interfacePage
- Parameters:
name
- The name of the zone- Returns:
- true if the zone exists
- Throws:
AmetysRepositoryException
- If an error occured
-
getTags
public Set<String> getTags() throws AmetysRepositoryException
Description copied from interface:TagAwareAmetysObject
Retrieves current tags.- Specified by:
getTags
in interfaceTagAwareAmetysObject
- Returns:
- the current tags.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
isVisible
public boolean isVisible() throws AmetysRepositoryException
Description copied from interface:Page
Determine if the page is visible into navigation elements- Specified by:
isVisible
in interfacePage
- Returns:
- true if the page is visible.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getPath
public String getPath() throws AmetysRepositoryException
Description copied from interface:AmetysObject
Retrieves the path of the current object.- Specified by:
getPath
in interfaceAmetysObject
- Returns:
- the path.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildren
public AmetysObjectIterable<? extends AmetysObject> getChildren() throws AmetysRepositoryException
Description copied from interface:TraversableAmetysObject
Retrieves children of the current object.- Specified by:
getChildren
in interfaceTraversableAmetysObject
- Returns:
- the children or an empty
AmetysObjectIterable
. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildrenPages
public AmetysObjectIterable<? extends Page> getChildrenPages(boolean includeInvisiblePages) throws AmetysRepositoryException
Description copied from interface:PagesContainer
Retrieves child pages.- Specified by:
getChildrenPages
in interfacePagesContainer
- Parameters:
includeInvisiblePages
- 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:PagesContainer
Gets the childPage
at the given position- Specified by:
getChildPageAt
in interfacePagesContainer
- Parameters:
index
- the position of thePage
within the ordered set of its sibling objects.- Returns:
- the
Page
if found - Throws:
UnknownAmetysObjectException
- if no child page was found at this positionAmetysRepositoryException
- if an error occurs
-
-