Class AbstractBlogPage
- java.lang.Object
-
- org.ametys.plugins.blog.repository.AbstractBlogPage
-
- All Implemented Interfaces:
AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,TagAwareAmetysObject
,TraversableAmetysObject
,MetadataAwarePagesContainer
,Page
,PagesContainer
,SiteAwareAmetysObject
- Direct Known Subclasses:
VirtualMonthPage
,VirtualPostPage
,VirtualTagPage
,VirtualYearPage
public abstract class AbstractBlogPage extends Object implements Page
Declares a root page and
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.Page
Page.LinkType, Page.PageType
-
-
Field Summary
Fields Modifier and Type Field Description static String
BLOG_MONTH_TEMPLATE
Default template for month pagestatic String
BLOG_POST_TEMPLATE
Default template for post pagestatic String
BLOG_TAG_TEMPLATE
Default template for tag pagestatic String
BLOG_YEAR_TEMPLATE
Default template for year page
-
Constructor Summary
Constructors Constructor Description AbstractBlogPage()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Zone
getDefaultZone()
Get the "default" zone.Page
getReferencePage()
Get the reference page.String
getTemplate()
Retrieves the template name.Page.PageType
getType()
The root page.Zone
getZone(String name)
Retrieves a given zone.AmetysObjectIterable<? extends Zone>
getZones()
Retrieves the zones.boolean
hasZone(String name)
Determine if a zone exists-
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, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToSAX, dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getComposite, getDataHolder, getParentDataHolder, getRootDataHolder, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValueOrEmpty, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX
-
Methods inherited from interface org.ametys.web.repository.page.Page
getDepth, getLongTitle, getReferers, getRootAttachments, getTemplateParametersHolder, getTitle, getURL, getURLType, isVisible
-
Methods inherited from interface org.ametys.web.repository.page.PagesContainer
getChildPageAt, getChildrenPages, getChildrenPages, getPathInSitemap, getSitemap, getSitemapName
-
Methods inherited from interface org.ametys.web.repository.SiteAwareAmetysObject
getSite, getSiteName
-
Methods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTags
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
-
-
-
Field Detail
-
BLOG_MONTH_TEMPLATE
public static final String BLOG_MONTH_TEMPLATE
Default template for month page- See Also:
- Constant Field Values
-
BLOG_YEAR_TEMPLATE
public static final String BLOG_YEAR_TEMPLATE
Default template for year page- See Also:
- Constant Field Values
-
BLOG_TAG_TEMPLATE
public static final String BLOG_TAG_TEMPLATE
Default template for tag page- See Also:
- Constant Field Values
-
BLOG_POST_TEMPLATE
public static final String BLOG_POST_TEMPLATE
Default template for post page- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractBlogPage
public AbstractBlogPage()
-
-
Method Detail
-
getType
public Page.PageType getType() throws AmetysRepositoryException
The root page.- Specified by:
getType
in interfacePage
- Returns:
- the type.
- Throws:
AmetysRepositoryException
- if an error occurs.- See Also:
Page.PageType
-
getTemplate
public String getTemplate() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the template name.- Specified by:
getTemplate
in interfacePage
- Returns:
- the template name or
null
if none has been set. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getZone
public Zone getZone(String name) throws UnknownZoneException, AmetysRepositoryException
Description copied from interface:Page
Retrieves a given zone.- Specified by:
getZone
in interfacePage
- 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
public AmetysObjectIterable<? extends Zone> getZones() throws AmetysRepositoryException
Description copied from interface:Page
Retrieves the zones.- Specified by:
getZones
in interfacePage
- Returns:
- the zones.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
hasZone
public boolean hasZone(String name) throws AmetysRepositoryException
Description copied from interface:Page
Determine if a zone exists- Specified by:
hasZone
in interfacePage
- Parameters:
name
- The name of the zone- Returns:
- true if the zone exists
- Throws:
AmetysRepositoryException
- If an error occured
-
getReferencePage
public Page getReferencePage()
Get the reference page.- Returns:
- the reference page.
-
getDefaultZone
protected abstract Zone getDefaultZone()
Get the "default" zone.- Returns:
- the "default" zone.
-
-