Class ProgramPage
java.lang.Object
org.ametys.plugins.odfweb.repository.AbstractOdfPage
org.ametys.plugins.odfweb.repository.ProgramPage
- All Implemented Interfaces:
AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,TagAwareAmetysObject
,TraversableAmetysObject
,MetadataAwareSitemapElement
,Page
,SitemapElement
,SiteAwareAmetysObject
Page representing a
Program
or a SubProgram
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.Page
Page.LinkType, Page.PageType
-
Field Summary
Fields inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
METADATA_SITE
-
Constructor Summary
ConstructorDescriptionProgramPage
(ProgramPageFactory factory, Page root, AbstractProgram program, String path, Program parent, Page parentPage) Constructor for program page holding aProgram
orSubProgram
ProgramPage
(ProgramPageFactory factory, Page root, Program program, Page parentPage) Constructor for program page holding aProgram
. -
Method Summary
Modifier and TypeMethodDescription<A extends AmetysObject>
ARetrieves a given child from its relative path.AmetysObjectIterable<? extends Page>
Retrieves child pages.Returns theDataHolder
of thisAmetysObject
.int
getDepth()
Get the page depthgetId()
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>
Retrieves the long title.getName()
Retrieves the name of the current object.Returns the parent object in the Ametys hierarchy.Returns the path of the parent object in the Ametys hierarchy.Computes the path relative to the current sitemap.Returns the associatedProgram
orSubProgram
.getSite()
Returns this object's site.Retrieves the sitemap containing the current sitemap.Returns this page's sitemap nameReturns this object's site name.Retrieves the template name.Get the view parametersgetTitle()
Retrieves the title.Retrieves a given zone.AmetysObjectIterable<? extends Zone>
getZones()
Retrieves the zones.boolean
Tests if this Object has at least one child with the given name.Methods inherited from class org.ametys.plugins.odfweb.repository.AbstractOdfPage
getChildPageAt, getChildren, getChildrenPages, getPath, getReferers, getRootAttachments, getTags, getType, getURL, getURLType, 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, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames, getRepositoryData
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getComposite, getModelItemTypeExtensionPoint, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Constructor Details
-
ProgramPage
Constructor for program page holding aProgram
.- Parameters:
factory
- The factoryroot
- the ODF root page.program
- the program.parentPage
- the parentPage
or null if not yet computed.
-
ProgramPage
public ProgramPage(ProgramPageFactory factory, Page root, AbstractProgram program, String path, Program parent, Page parentPage) Constructor for program page holding aProgram
orSubProgram
- Parameters:
factory
- The factoryroot
- the ODF root page.program
- the program or subprogram.path
- The path from the virtual second level page. Can be null if abstract program is aProgram
parent
- the parent program in case of a subprogram, null otherwiseparentPage
- the parentPage
or null if not yet computed.
-
-
Method Details
-
getProgram
Returns the associatedProgram
orSubProgram
.- Returns:
- the associated
Program
orSubProgram
.
-
getDepth
Description copied from interface:Page
Get the page depth- Returns:
- the page depth
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getTemplate
Description copied from interface:SitemapElement
Retrieves the template name.- Returns:
- the template name or
null
if none has been set or if the type is not container. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getTitle
Description copied from interface:SitemapElement
Retrieves the title.- Returns:
- the title.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLongTitle
Description copied from interface:Page
Retrieves the long title.- Returns:
- the title.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getZone
Description copied from interface:SitemapElement
Retrieves a given zone.- Parameters:
name
- the name of the zone.- Returns:
- the given zone.
- Throws:
UnknownZoneException
- if there is no zone for the given name.AmetysRepositoryException
- if an error occurs.
-
getZones
Description copied from interface:SitemapElement
Retrieves the zones.- Returns:
- the zones.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChildrenPages
Description copied from interface:SitemapElement
Retrieves child pages.- Returns:
- the child pages.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getPathInSitemap
Description copied from interface:SitemapElement
Computes the path relative to the current sitemap.- Returns:
- the path relative to the current sitemap.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSite
Description copied from interface:SiteAwareAmetysObject
Returns this object's site.- Returns:
- this object's site
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSiteName
Description copied from interface:SiteAwareAmetysObject
Returns this object's site name.- Returns:
- this object's site name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSitemap
Description copied from interface:SitemapElement
Retrieves the sitemap containing the current sitemap.- Returns:
- the sitemap containing the current sitemap.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSitemapName
Description copied from interface:SitemapElement
Returns this page's sitemap name- Returns:
- this page's sitemap name
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getChild
public <A extends AmetysObject> A getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException Description copied from interface:TraversableAmetysObject
Retrieves a given child from its relative path. The path cannot benull
, empty nor begin with a'/'
.- Type Parameters:
A
- the actual type ofAmetysObject
.- Parameters:
path
- the path of the child which can contains a position with.[n]
if same name sibling is allowed.- Returns:
- the child found.
- Throws:
AmetysRepositoryException
- if an error occurs.UnknownAmetysObjectException
- if the object does not exist.
-
hasChild
Description copied from interface:TraversableAmetysObject
Tests if this Object has at least one child with the given name.- Parameters:
name
- the name to test. Cannot benull
nor empty nor begin with a'/'
and it cannot contain'/'
.- Returns:
true
if the named child exists,false
otherwise.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getId
Description copied from interface:AmetysObject
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>
- Returns:
- the unique identifier of this AmetysObject
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getName
Description copied from interface:AmetysObject
Retrieves the name of the current object.- Returns:
- the name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getParent
Description copied from interface:AmetysObject
Returns the parent object in the Ametys hierarchy.- Returns:
- the parent object or
null
if current object is the root. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getParentPath
Description copied from interface:AmetysObject
Returns the path of the parent object in the Ametys hierarchy.- Returns:
- the path of the parent object.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Returns:
- the
DataHolder
of thisAmetysObject
-
getTemplateParametersHolder
Description copied from interface:SitemapElement
Get the view parameters- Returns:
- the view parameters
- Throws:
AmetysRepositoryException
- if an error occurs.
-