Class StaticZone
- java.lang.Object
-
- org.ametys.plugins.blog.repository.StaticZone
-
- All Implemented Interfaces:
AmetysObject,DataAwareAmetysObject,ModelLessDataAwareAmetysObject,DataHolder,ModelLessDataHolder,Zone
public class StaticZone extends Object implements Zone
Wrapper to present a modifiable zone into a unmodifiable one.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classStaticZone.StaticZoneItemIterableStatic zone item iterable.(package private) classStaticZone.StaticZoneItemIterator
-
Field Summary
Fields Modifier and Type Field Description protected Zone_zoneThe wrapped zone.-
Fields inherited from interface org.ametys.web.repository.page.Zone
ZONEITEM_DATA_NAME
-
-
Constructor Summary
Constructors Constructor Description StaticZone(Zone zone)Construct a static zone, wrapping a given zone.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelLessDataHoldergetDataHolder()Returns theDataHolderof thisAmetysObject.StringgetId()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>StringgetName()Retrieves the name of the current object.PagegetPage()Get the parent page of the zone<A extends AmetysObject>
AgetParent()Returns the parent object in the Ametys hierarchy.StringgetParentPath()Returns the path of the parent object in the Ametys hierarchy.StringgetPath()Retrieves the path of the current object.AmetysObjectIterable<? extends ZoneItem>getZoneItems()Retrieve the list of used zone itemsModelAwareDataHoldergetZoneParametersHolder()Get the view parameters-
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, dataToSAX, getDataNames, getRepositoryData
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.DataHolder
dataToSAX
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToSAX, getComposite, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToSAX
-
-
-
-
Constructor Detail
-
StaticZone
public StaticZone(Zone zone)
Construct a static zone, wrapping a given zone.- Parameters:
zone- the zone to wrap.
-
-
Method Detail
-
getDataHolder
public ModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getName
public String getName() throws AmetysRepositoryException
Description copied from interface:AmetysObjectRetrieves the name of the current object.- Specified by:
getNamein interfaceAmetysObject- Returns:
- the name.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getPath
public String getPath() throws AmetysRepositoryException
Description copied from interface:AmetysObjectRetrieves the path of the current object.- Specified by:
getPathin interfaceAmetysObject- Returns:
- the path.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getId
public String getId() throws AmetysRepositoryException
Description copied from interface:AmetysObjectRetrieves 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>- Specified by:
getIdin interfaceAmetysObject- Returns:
- the unique identifier of this AmetysObject
- Throws:
AmetysRepositoryException- if an error occurs.
-
getParent
public <A extends AmetysObject> A getParent() throws AmetysRepositoryException
Description copied from interface:AmetysObjectReturns the parent object in the Ametys hierarchy.- Specified by:
getParentin interfaceAmetysObject- Type Parameters:
A- the type of the parentAmetysObject.- Returns:
- the parent object or
nullif current object is the root. - Throws:
AmetysRepositoryException- if an error occurs.
-
getParentPath
public String getParentPath() throws AmetysRepositoryException
Description copied from interface:AmetysObjectReturns the path of the parent object in the Ametys hierarchy.- Specified by:
getParentPathin interfaceAmetysObject- Returns:
- the path of the parent object.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getZoneItems
public AmetysObjectIterable<? extends ZoneItem> getZoneItems() throws AmetysRepositoryException
Description copied from interface:ZoneRetrieve the list of used zone items- Specified by:
getZoneItemsin interfaceZone- Returns:
- The list of zone items. Cannot be null.
- Throws:
AmetysRepositoryException- if an error occured
-
getPage
public Page getPage()
Description copied from interface:ZoneGet the parent page of the zone
-
getZoneParametersHolder
public ModelAwareDataHolder getZoneParametersHolder() throws AmetysRepositoryException
Description copied from interface:ZoneGet the view parameters- Specified by:
getZoneParametersHolderin interfaceZone- Returns:
- the view parameters
- Throws:
AmetysRepositoryException- if an error occurs.
-
-