public class FirstLevelPage extends AbstractLevelPage
Page.LinkType, Page.PageType| Modifier and Type | Field and Description |
|---|---|
private FirstLevelPageFactory |
_factory |
private String |
_name |
private Page |
_root |
private String |
_title |
| Constructor and Description |
|---|
FirstLevelPage(FirstLevelPageFactory factory,
Page root,
String name,
String title)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private Optional<Map.Entry<String,String>> |
_findSecondLevelValueEntry(Map<String,String> secondLevelValues,
String levelCode) |
private Optional<Map.Entry<String,String>> |
_findSecondLevelValueEntry(String levelCode) |
private Optional<AmetysObjectIterable<Program>> |
_getChildrenProgramPageFromCache() |
private boolean |
_hasSecondLevelPages() |
private ProgramPage |
_toProgramPage(Program program) |
private SecondLevelPage |
_toSecondLevelPage(Map.Entry<String,String> secondLevelValueEntry) |
<A extends AmetysObject> |
getChild(String path)
Retrieves a given child from its relative path.
|
AmetysObjectIterable<? extends Page> |
getChildren()
Retrieves children of the current object.
|
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 childName)
Tests if this Object has at least one child with the given name.
|
getTemplategetChildPageAt, 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 FirstLevelPageFactory _factory
public FirstLevelPage(FirstLevelPageFactory factory, Page root, String name, String title)
factory - the corresponding factoryroot - the odf root page.name - the page's name.title - the page's title.public int getDepth() throws AmetysRepositoryException
PageAmetysRepositoryException - 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 boolean _hasSecondLevelPages()
private Optional<AmetysObjectIterable<Program>> _getChildrenProgramPageFromCache()
private Optional<Map.Entry<String,String>> _findSecondLevelValueEntry(String levelCode)
private Optional<Map.Entry<String,String>> _findSecondLevelValueEntry(Map<String,String> secondLevelValues, String levelCode)
private SecondLevelPage _toSecondLevelPage(Map.Entry<String,String> secondLevelValueEntry)
private ProgramPage _toProgramPage(Program program)
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.public AmetysObjectIterable<? extends Page> getChildren() throws AmetysRepositoryException
TraversableAmetysObjectgetChildren in interface TraversableAmetysObjectgetChildren in class AbstractOdfPageAmetysObjectIterable.AmetysRepositoryException - if an error occurs.public boolean hasChild(String childName) throws AmetysRepositoryException
TraversableAmetysObjectchildName - 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 AmetysObject