public class CoursePage extends AbstractOdfPage
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
CoursePage.CourseListTraverser |
Page.LinkType, Page.PageType| Modifier and Type | Field and Description |
|---|---|
private Course |
_course |
private CoursePageFactory |
_factory |
private Page |
_parentPage |
private Program |
_parentProgram |
private String |
_path |
private Page |
_root |
| Constructor and Description |
|---|
CoursePage(CoursePageFactory factory,
Page root,
Course course,
Program parentProgram,
String path,
Page parentPage)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
_filterByPageName(Course course,
String pageName) |
private CoursePage |
_toCoursePage(Course course) |
private Stream<Course> |
_traverseCourseLists() |
<A extends AmetysObject> |
getChild(String path)
Retrieves a given child from its relative path.
|
AmetysObjectIterable<? extends Page> |
getChildrenPages()
Retrieves child pages.
|
Course |
getCourse()
Returns the associated
Course. |
ModelLessDataHolder |
getDataHolder()
Returns the
DataHolder of this AmetysObject. |
int |
getDepth()
Get the page depth
|
String |
getId()
Retrieves the unique identifier of this AmetysObject.
It must be unique in the whole repository and must never be null. It must conform to the URI syntax: <protocol>://<protocol-specific-part> |
String |
getLongTitle()
Retrieves the long title.
|
String |
getName()
Retrieves the name of the current object.
|
Page |
getParent()
Returns the parent object in the Ametys hierarchy.
|
String |
getParentPath()
Returns the path of the parent object in the Ametys hierarchy.
|
String |
getPathInSitemap()
Computes the path relative to the current sitemap.
|
Site |
getSite()
Returns this object's site.
|
Sitemap |
getSitemap()
Retrieves the sitemap containing the current sitemap.
|
String |
getSitemapName()
Returns this page's sitemap name
|
String |
getSiteName()
Returns this object's site name.
|
String |
getTemplate()
Retrieves the template name.
|
String |
getTitle()
Retrieves the title.
|
Zone |
getZone(String name)
Retrieves a given zone.
|
AmetysObjectIterable<? extends Zone> |
getZones()
Retrieves the zones.
|
boolean |
hasChild(String name)
Tests if this Object has at least one child with the given name.
|
getChildPageAt, getChildren, getChildrenPages, getPath, getReferers, getRootAttachments, getTags, getType, getURL, getURLType, hasZone, isVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildAt, getChildPositiongetComposite, getRepeater, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiplecopyTo, getDataNamesequals, hashCodetoSAX, toSAXdataToSAX, dataToSAX, dataToSAX, dataToSAXprivate Page _parentPage
private Program _parentProgram
private CoursePageFactory _factory
public CoursePage(CoursePageFactory factory, Page root, Course course, Program parentProgram, String path, Page parentPage)
factory - The factoryroot - the odf root page.course - the course.parentProgram - the parent programpath - path from the parent ProgramPageparentPage - the parent Page or null if not yet computed.public int getDepth() throws AmetysRepositoryException
PageAmetysRepositoryException - if an error occurs.public String getTemplate() throws AmetysRepositoryException
Pagenull if none has
been set.AmetysRepositoryException - if an error occurs.public String getTitle() throws AmetysRepositoryException
PageAmetysRepositoryException - if an error occurs.public String getLongTitle() throws AmetysRepositoryException
PageAmetysRepositoryException - if an error occurs.public Zone getZone(String name) throws UnknownZoneException, AmetysRepositoryException
Pagename - the name of the zone.UnknownZoneException - if there is no zone for the given name.AmetysRepositoryException - if an error occurs.public AmetysObjectIterable<? extends Zone> getZones() throws AmetysRepositoryException
PageAmetysRepositoryException - if an error occurs.public AmetysObjectIterable<? extends Page> getChildrenPages() throws AmetysRepositoryException
PagesContainerAmetysRepositoryException - if an error occurs.private CoursePage _toCoursePage(Course course)
public String getPathInSitemap() throws AmetysRepositoryException
PagesContainerAmetysRepositoryException - if an error occurs.public Site getSite() throws AmetysRepositoryException
SiteAwareAmetysObjectAmetysRepositoryException - if an error occurs.public String getSiteName() throws AmetysRepositoryException
SiteAwareAmetysObjectAmetysRepositoryException - if an error occurs.public Sitemap getSitemap() throws AmetysRepositoryException
PagesContainerAmetysRepositoryException - if an error occurs.public String getSitemapName() throws AmetysRepositoryException
PagesContainerAmetysRepositoryException - if an error occurs.public <A extends AmetysObject> A getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException
TraversableAmetysObjectnull, empty nor begin with a '/'.A - the actual type of AmetysObject.path - the path of the child which can contains a position with.
[n] if same name sibling is allowed.AmetysRepositoryException - if an error occurs.UnknownAmetysObjectException - if the object does not exist.private boolean _filterByPageName(Course course, String pageName)
public boolean hasChild(String name) throws AmetysRepositoryException
TraversableAmetysObjectname - the name to test. Cannot be null nor empty nor
begin with a '/' and it cannot contain '/'.true if the named child exists,
false otherwise.AmetysRepositoryException - if an error occurs.public String getId() throws AmetysRepositoryException
AmetysObject<protocol>://<protocol-specific-part>AmetysRepositoryException - if an error occurs.public String getName() throws AmetysRepositoryException
AmetysObjectAmetysRepositoryException - if an error occurs.public Page getParent() throws AmetysRepositoryException
AmetysObjectnull if current object
is the root.AmetysRepositoryException - if an error occurs.public String getParentPath() throws AmetysRepositoryException
AmetysObjectAmetysRepositoryException - if an error occurs.public ModelLessDataHolder getDataHolder()
DataAwareAmetysObjectDataHolder of this AmetysObject.DataHolder of this AmetysObjectprivate Stream<Course> _traverseCourseLists()