Package org.ametys.odf.cdmfr
Class ExportCDMfrHelper
- java.lang.Object
-
- org.ametys.odf.cdmfr.ExportCDMfrHelper
-
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
- Direct Known Subclasses:
WebExportCDMfrHelper
public class ExportCDMfrHelper extends Object implements Component, Serviceable, Contextualizable
Default helper to export aProgram
to CDM-fr format.
-
-
Field Summary
Fields Modifier and Type Field Description protected Context
_context
The Avalon contextprotected ExportCDMfrManager
_exportCMDfrManager
The component for CDM exportprotected AmetysObjectResolver
_resolver
The Ametys object resolverstatic String
REQUEST_PARAM_EXPORT_FOR_AMETYS
The name of request parameter to set this export for a Ametys applicationstatic String
REQUEST_PARAM_VALID_LABEL
The name of request parameter to use to get the valid version of contentstatic String
ROLE
Avalon Role
-
Constructor Summary
Constructors Constructor Description ExportCDMfrHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_doExport(ContentHandler contentHandler, Program program)
Do exportprotected Program
_getProgram()
Get the program to exportprotected Request
_getRequest()
Get the requestprotected void
_prepareRequest(Program program)
Prepare the request before exportprotected void
_prepareResponse(Program program)
Prepare the responsevoid
contextualize(Context context)
void
export(ContentHandler contentHandler)
Generate the CDM-fr XML export for the current program.void
service(ServiceManager smanager)
-
-
-
Field Detail
-
REQUEST_PARAM_VALID_LABEL
public static final String REQUEST_PARAM_VALID_LABEL
The name of request parameter to use to get the valid version of content- See Also:
- Constant Field Values
-
REQUEST_PARAM_EXPORT_FOR_AMETYS
public static final String REQUEST_PARAM_EXPORT_FOR_AMETYS
The name of request parameter to set this export for a Ametys application- See Also:
- Constant Field Values
-
_resolver
protected AmetysObjectResolver _resolver
The Ametys object resolver
-
_exportCMDfrManager
protected ExportCDMfrManager _exportCMDfrManager
The component for CDM export
-
-
Constructor Detail
-
ExportCDMfrHelper
public ExportCDMfrHelper()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
export
public void export(ContentHandler contentHandler) throws SAXException
Generate the CDM-fr XML export for the current program.- Parameters:
contentHandler
- The content handler- Throws:
SAXException
- If an error occurs during sax
-
_doExport
protected void _doExport(ContentHandler contentHandler, Program program) throws SAXException
Do export- Parameters:
contentHandler
- The content handler to sax intoprogram
- the porogram to export- Throws:
SAXException
- If an error occurs during sax
-
_getProgram
protected Program _getProgram()
Get the program to export- Returns:
- the program to export
-
_prepareRequest
protected void _prepareRequest(Program program)
Prepare the request before export- Parameters:
program
- the program to export
-
_prepareResponse
protected void _prepareResponse(Program program)
Prepare the response- Parameters:
program
- the program to export
-
_getRequest
protected Request _getRequest()
Get the request- Returns:
- the request
-
-