Class AbstractOdfPage
- java.lang.Object
-
- org.ametys.plugins.odfweb.repository.AbstractOdfPage
-
- All Implemented Interfaces:
AmetysObject,DataAwareAmetysObject,ModelLessDataAwareAmetysObject,DataHolder,ModelLessDataHolder,TagAwareAmetysObject,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 PagegetChildPageAt(int index)Gets the childPageat the given positionAmetysObjectIterable<? extends AmetysObject>getChildren()Retrieves children of the current object.AmetysObjectIterable<? extends Page>getChildrenPages(boolean includeInvisiblePages)Retrieves child pages.StringgetPath()Retrieves the path of the current object.Set<String>getReferers()Retrieves allAmetysObjectids referencing this page.ResourceCollectiongetRootAttachments()Retrieves the attachments root nodeSet<String>getTags()Retrieves current tags.Page.PageTypegetType()Retrieves the type.StringgetURL()Retrieves the linked URL.Page.LinkTypegetURLType()Retrieves the linked URL type.booleanhasZone(String name)Determine if a zone existsbooleanisVisible()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, dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getComposite, getDataHolder, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValueOrEmpty, 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:PageRetrieves allAmetysObjectids referencing this page.- Specified by:
getReferersin interfacePage- Returns:
- the
AmetysObjectids referencing this page. - 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.
-
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
-
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.
-
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
-
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.
-
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.
-
getPath
public String getPath() throws AmetysRepositoryException
Description copied from interface:AmetysObjectRetrieves the path of the current object.- Specified by:
getPathin interfaceAmetysObject- Returns:
- the path.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getChildren
public AmetysObjectIterable<? extends AmetysObject> getChildren() throws AmetysRepositoryException
Description copied from interface:TraversableAmetysObjectRetrieves children of the current object.- Specified by:
getChildrenin 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:PagesContainerRetrieves child pages.- Specified by:
getChildrenPagesin 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: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
-
-