public class SecondLevelPage extends AbstractLevelPage
Page.LinkType, Page.PageType
Modifier and Type | Field and Description |
---|---|
private SecondLevelPageFactory |
_factory |
private String |
_level1 |
private FirstLevelPage |
_level1Page |
private String |
_name |
private Page |
_root |
private String |
_title |
Constructor and Description |
---|
SecondLevelPage(SecondLevelPageFactory factory,
Page root,
String level1Key,
String name,
String title)
Constructor.
|
SecondLevelPage(SecondLevelPageFactory factory,
Page root,
String level1Key,
String name,
String title,
FirstLevelPage firstLevelPage)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private Optional<AmetysObjectIterable<Program>> |
_getChildrenFromCache() |
private ProgramPage |
_toProgramPage(Program program) |
<A extends AmetysObject> |
getChild(String path)
Retrieves a given child from its relative path.
|
AmetysObjectIterable<? extends Page> |
getChildrenPages()
Retrieves child pages.
|
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 |
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.
|
getTemplate
getChildPageAt, getChildren, getChildrenPages, getPath, getReferers, getRootAttachments, getTags, getType, getURL, getURLType, hasZone, isVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildAt, getChildPosition
getComposite, getRepeater, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
copyTo, getDataNames
equals, hashCode
toSAX, toSAX
dataToSAX, dataToSAX, dataToSAX, dataToSAX
private FirstLevelPage _level1Page
private SecondLevelPageFactory _factory
public SecondLevelPage(SecondLevelPageFactory factory, Page root, String level1Key, String name, String title)
factory
- the factoryroot
- the odf root page.level1Key
- the parent first level code (name)name
- the page's name.title
- the page's title.public SecondLevelPage(SecondLevelPageFactory factory, Page root, String level1Key, String name, String title, FirstLevelPage firstLevelPage)
factory
- the factoryroot
- the odf root page.level1Key
- the parent first level code (name)name
- the page's name.title
- the page's title.firstLevelPage
- The parent first level page.public int getDepth() throws AmetysRepositoryException
Page
AmetysRepositoryException
- if an error occurs.public String getTitle() throws AmetysRepositoryException
Page
AmetysRepositoryException
- if an error occurs.public String getLongTitle() throws AmetysRepositoryException
Page
AmetysRepositoryException
- if an error occurs.public Zone getZone(String name) throws UnknownZoneException, AmetysRepositoryException
Page
name
- 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
Page
AmetysRepositoryException
- if an error occurs.public AmetysObjectIterable<? extends Page> getChildrenPages() throws AmetysRepositoryException
PagesContainer
AmetysRepositoryException
- if an error occurs.private Optional<AmetysObjectIterable<Program>> _getChildrenFromCache()
private ProgramPage _toProgramPage(Program program)
public String getPathInSitemap() throws AmetysRepositoryException
PagesContainer
AmetysRepositoryException
- if an error occurs.public Site getSite() throws AmetysRepositoryException
SiteAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getSiteName() throws AmetysRepositoryException
SiteAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public Sitemap getSitemap() throws AmetysRepositoryException
PagesContainer
AmetysRepositoryException
- if an error occurs.public String getSitemapName() throws AmetysRepositoryException
PagesContainer
AmetysRepositoryException
- if an error occurs.public <A extends AmetysObject> A getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException
TraversableAmetysObject
null
, 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.public boolean hasChild(String name) throws AmetysRepositoryException
TraversableAmetysObject
name
- 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
AmetysObject
AmetysRepositoryException
- if an error occurs.public Page getParent() throws AmetysRepositoryException
AmetysObject
null
if current object
is the root.AmetysRepositoryException
- if an error occurs.public String getParentPath() throws AmetysRepositoryException
AmetysObject
AmetysRepositoryException
- if an error occurs.public ModelLessDataHolder getDataHolder()
DataAwareAmetysObject
DataHolder
of this AmetysObject
.DataHolder
of this AmetysObject