Class AbstractProgramItemPage<T extends AbstractOdfPageFactory>
java.lang.Object
org.ametys.web.repository.page.virtual.AbstractConfigurableVirtualPage<T>
org.ametys.plugins.odfweb.repository.AbstractOdfPage<T>
org.ametys.plugins.odfweb.repository.AbstractProgramItemPage<T>
- Type Parameters:
T
- The type of factory to use
- All Implemented Interfaces:
AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,TagAwareAmetysObject
,TraversableAmetysObject
,MetadataAwareSitemapElement
,Page
,SitemapElement
,SiteAwareAmetysObject
- Direct Known Subclasses:
CoursePage
,ProgramPage
public abstract class AbstractProgramItemPage<T extends AbstractOdfPageFactory>
extends AbstractOdfPage<T>
Common class for ODF virtual page representing a
ProgramItem
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.Page
Page.LinkType, Page.PageType
-
Field Summary
Fields inherited from class org.ametys.web.repository.page.virtual.AbstractConfigurableVirtualPage
_configuration, _factory, _root, _scheme
Fields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE
-
Constructor Summary
ConstructorDescriptionAbstractProgramItemPage
(Page root, VirtualPageConfiguration configuration, String scheme, T factory) The constructor of abstract program item pages -
Method Summary
Modifier and TypeMethodDescriptiongetChildPageAt
(int index) Gets the childPage
at the given positionAmetysObjectIterable<? extends AmetysObject>
Retrieves children of the current object.AmetysObjectIterable<? extends Page>
getChildrenPages
(boolean includeInvisiblePages) Retrieves child pages.Get the ODF path corresponding to this proram item from the rootProgram
The ODF path is composed with the ids of program, subprogram and course parents of each child pages until this pageprotected abstract ProgramItem
Get the program item wrapped in this pageprotected void
setCurrentEducationalPaths
(ProgramItem programItem) Set the current educational paths of the wrapped program itemMethods inherited from class org.ametys.web.repository.page.virtual.AbstractConfigurableVirtualPage
getContent, getPath, getReferers, getRootAttachments, getScheme, getSite, getSitemap, getSitemapName, getSiteName, getTags, getTemplate, getTemplateParametersHolder, getType, getURL, getURLType, getZone, getZoneConfiguration, getZones, hasZone, isVisible
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, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames, getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getComposite, getDataHolder, getModelItemTypeExtensionPoint, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX
Methods inherited from interface org.ametys.web.repository.page.Page
getDepth, getLongTitle
Methods inherited from interface org.ametys.web.repository.page.SitemapElement
getChildrenPages, getPathInSitemap, getTitle
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, hasChild
-
Constructor Details
-
AbstractProgramItemPage
public AbstractProgramItemPage(Page root, VirtualPageConfiguration configuration, String scheme, T factory) The constructor of abstract program item pages- Parameters:
root
- the odf root page.configuration
- The abstract virtual page configurationscheme
- The schemefactory
- The factory
-
-
Method Details
-
getChildren
Description copied from interface:TraversableAmetysObject
Retrieves children of the current object.- Specified by:
getChildren
in interfaceTraversableAmetysObject
- Overrides:
getChildren
in classAbstractOdfPage<T extends AbstractOdfPageFactory>
- 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:SitemapElement
Retrieves child pages.- Specified by:
getChildrenPages
in interfaceSitemapElement
- Overrides:
getChildrenPages
in classAbstractOdfPage<T extends AbstractOdfPageFactory>
- 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:SitemapElement
Gets the childPage
at the given position- Specified by:
getChildPageAt
in interfaceSitemapElement
- Overrides:
getChildPageAt
in classAbstractOdfPage<T extends AbstractOdfPageFactory>
- 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
-
getProgramItem
Get the program item wrapped in this page- Returns:
- the program item
-
getOdfPath
Get the ODF path corresponding to this proram item from the rootProgram
The ODF path is composed with the ids of program, subprogram and course parents of each child pages until this page- Returns:
- the ODF path from the root
Program
-
setCurrentEducationalPaths
Set the current educational paths of the wrapped program item- Parameters:
programItem
- the wrapped program item
-