Class SecondLevelZoneItem
- java.lang.Object
-
- org.ametys.plugins.odfweb.repository.SecondLevelZoneItem
-
- All Implemented Interfaces:
AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,ZoneItem
public class SecondLevelZoneItem extends Object implements ZoneItem
ZoneItem
holding a Sitemap service
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.repository.page.ZoneItem
ZoneItem.ZoneType
-
-
Field Summary
Fields Modifier and Type Field Description private SecondLevelPage
_page
private ServiceExtensionPoint
_serviceExtensionPoint
private AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType>
_zoneDataTypeExtensionPoint
private AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType>
_zoneItemDataTypeExtensionPoint
-
Fields inherited from interface org.ametys.web.repository.page.ZoneItem
SERVICE_PARAMETERS_DATA_NAME
-
-
Constructor Summary
Constructors Constructor Description SecondLevelZoneItem(SecondLevelPage page, AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> zoneDataTypeExtensionPoint, ServiceExtensionPoint serviceExtensionPoint, AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> zoneItemDataTypeExtensionPoint)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
_setServiceParameters(ModifiableModelAwareDataHolder dataHolder)
Program
getContent()
Retrieves the content reference.ModelAwareDataHolder
getContentViewParametersHolder(String contentViewName)
Get the content view parameters for a given viewModelLessDataHolder
getDataHolder()
Returns theDataHolder
of thisAmetysObject
.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
getName()
Retrieves the name of the current object.SecondLevelZone
getParent()
Returns the parent object in the Ametys hierarchy.String
getParentPath()
Returns the path of the parent object in the Ametys hierarchy.String
getPath()
Retrieves the path of the current object.String
getServiceId()
Retrieves the service id.ModelAwareDataHolder
getServiceParameters()
Get the service parametersModelAwareDataHolder
getServiceViewParametersHolder(String serviceViewName)
Get the service view parameters for a given viewZoneItem.ZoneType
getType()
Retrieves the type.String
getViewName()
Get the name of the view to render the Content with.Zone
getZone()
Get the parent zone.ModelAwareDataHolder
getZoneItemParametersHolder()
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
-
-
-
-
Field Detail
-
_page
private SecondLevelPage _page
-
_zoneDataTypeExtensionPoint
private AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> _zoneDataTypeExtensionPoint
-
_serviceExtensionPoint
private ServiceExtensionPoint _serviceExtensionPoint
-
_zoneItemDataTypeExtensionPoint
private AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> _zoneItemDataTypeExtensionPoint
-
-
Constructor Detail
-
SecondLevelZoneItem
public SecondLevelZoneItem(SecondLevelPage page, AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> zoneDataTypeExtensionPoint, ServiceExtensionPoint serviceExtensionPoint, AbstractThreadSafeComponentExtensionPoint<RepositoryModelItemType> zoneItemDataTypeExtensionPoint)
Constructor.- Parameters:
page
- the parentSecondLevelPage
.zoneDataTypeExtensionPoint
- the extension point with available data types for zonesserviceExtensionPoint
- the service extension pointzoneItemDataTypeExtensionPoint
- the extension point with available data types for zone items
-
-
Method Detail
-
getContent
public Program getContent() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Retrieves the content reference.- Specified by:
getContent
in interfaceZoneItem
- Returns:
- the service id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getViewName
public String getViewName() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Get the name of the view to render the Content with. It only makes sense if the ZoneItem is a Content reference.
If null is returned, in most cases, "main" should be assumed.- Specified by:
getViewName
in interfaceZoneItem
- Returns:
- the view name, or null if not set.
- Throws:
AmetysRepositoryException
- if an error occurs. TODO NEWATTRIBUTEAPI_SERVICE: remove the default implementation when all zone items implement the method
-
getServiceId
public String getServiceId() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Retrieves the service id.- Specified by:
getServiceId
in interfaceZoneItem
- Returns:
- the service id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getServiceParameters
public ModelAwareDataHolder getServiceParameters() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Get the service parameters- Specified by:
getServiceParameters
in interfaceZoneItem
- Returns:
- the service parameters
- Throws:
AmetysRepositoryException
- if an error occurs.
-
_setServiceParameters
private void _setServiceParameters(ModifiableModelAwareDataHolder dataHolder)
-
getType
public ZoneItem.ZoneType getType() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Retrieves the type.- Specified by:
getType
in interfaceZoneItem
- Returns:
- the type.
- Throws:
AmetysRepositoryException
- if an error occurs.- See Also:
ZoneItem.ZoneType
-
getDataHolder
public ModelLessDataHolder getDataHolder()
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelLessDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-
getId
public String getId() throws AmetysRepositoryException
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>
- Specified by:
getId
in interfaceAmetysObject
- Returns:
- the unique identifier of this AmetysObject
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getName
public String getName() throws AmetysRepositoryException
Description copied from interface:AmetysObject
Retrieves the name of the current object.- Specified by:
getName
in interfaceAmetysObject
- Returns:
- the name.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getParent
public SecondLevelZone getParent() throws AmetysRepositoryException
Description copied from interface:AmetysObject
Returns the parent object in the Ametys hierarchy.- Specified by:
getParent
in interfaceAmetysObject
- Returns:
- the parent object or
null
if current object is the root. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getParentPath
public String getParentPath() throws AmetysRepositoryException
Description copied from interface:AmetysObject
Returns the path of the parent object in the Ametys hierarchy.- Specified by:
getParentPath
in interfaceAmetysObject
- Returns:
- the path of the parent object.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getPath
public String getPath() throws AmetysRepositoryException
Description copied from interface:AmetysObject
Retrieves the path of the current object.- Specified by:
getPath
in interfaceAmetysObject
- Returns:
- the path.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getZoneItemParametersHolder
public ModelAwareDataHolder getZoneItemParametersHolder() throws AmetysRepositoryException
Description copied from interface:ZoneItem
Get the view parameters- Specified by:
getZoneItemParametersHolder
in interfaceZoneItem
- Returns:
- the view parameters
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getContentViewParametersHolder
public ModelAwareDataHolder getContentViewParametersHolder(String contentViewName) throws AmetysRepositoryException
Description copied from interface:ZoneItem
Get the content view parameters for a given view- Specified by:
getContentViewParametersHolder
in interfaceZoneItem
- Parameters:
contentViewName
- the view name- Returns:
- the content view parameters
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getServiceViewParametersHolder
public ModelAwareDataHolder getServiceViewParametersHolder(String serviceViewName) throws AmetysRepositoryException
Description copied from interface:ZoneItem
Get the service view parameters for a given view- Specified by:
getServiceViewParametersHolder
in interfaceZoneItem
- Parameters:
serviceViewName
- the view name- Returns:
- the service view parameters
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-