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, _schemeFields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE -
Constructor Summary
ConstructorsConstructorDescriptionAbstractProgramItemPage(Page root, VirtualPageConfiguration configuration, String scheme, T factory) The constructor of abstract program item pages -
Method Summary
Modifier and TypeMethodDescriptiongetChildPageAt(int index) Gets the childPageat 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 rootProgramThe ODF path is composed with the ids of program, subprogram and course parents of each child pages until this pageprotected abstract ProgramItemGet the program item wrapped in this pageprotected voidsetCurrentEducationalPaths(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, isVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames, getRepositoryDataMethods 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, isMultipleMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAXMethods inherited from interface org.ametys.web.repository.page.Page
getDepth, getLongTitleMethods inherited from interface org.ametys.web.repository.page.SitemapElement
getChildrenPages, getPathInSitemap, getTitleMethods 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:TraversableAmetysObjectRetrieves children of the current object.- Specified by:
getChildrenin interfaceTraversableAmetysObject- Overrides:
getChildrenin 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:SitemapElementRetrieves child pages.- Specified by:
getChildrenPagesin interfaceSitemapElement- Overrides:
getChildrenPagesin 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:SitemapElementGets the childPageat the given position- Specified by:
getChildPageAtin interfaceSitemapElement- Overrides:
getChildPageAtin classAbstractOdfPage<T extends AbstractOdfPageFactory>- 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
-
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 rootProgramThe 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
-