Package org.ametys.odf.cdmfr
Class SendCDMfrProcessor
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.odf.cdmfr.AbstractCDMfrProcessor
org.ametys.odf.cdmfr.SendCDMfrProcessor
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Serviceable
- Direct Known Subclasses:
DeleteRemoteProgramProcessor
Processor to send the CDM-fr file
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CatalogsManager
The catalogs managerstatic final String
The component role.Fields inherited from class org.ametys.odf.cdmfr.AbstractCDMfrProcessor
_odfHelper, _sourceResolver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterPrograms
(Stream<Program> programs) Filter programs if needed.protected String
Get the configuration parameter name to determine if the process is active.protected String
Get the error message if process fails.void
protected boolean
true
to generate CDM-fr for another Ametys,false
otherwise.protected void
processProgram
(Program program, InputStream cdmfrContent) Process the program and its CDM-fr input stream.void
service
(ServiceManager manager) Methods inherited from class org.ametys.odf.cdmfr.AbstractCDMfrProcessor
_getCDMfrContent, isActive, processPrograms
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The component role. -
_catalogsManager
The catalogs manager
-
-
Constructor Details
-
SendCDMfrProcessor
public SendCDMfrProcessor()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractCDMfrProcessor
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAbstractCDMfrProcessor
- Throws:
Exception
-
getConfigActiveParam
Description copied from class:AbstractCDMfrProcessor
Get the configuration parameter name to determine if the process is active.- Specified by:
getConfigActiveParam
in classAbstractCDMfrProcessor
- Returns:
- The configuration parameter name
-
filterPrograms
Description copied from class:AbstractCDMfrProcessor
Filter programs if needed.- Overrides:
filterPrograms
in classAbstractCDMfrProcessor
- Parameters:
programs
- The programs to filter- Returns:
- The filtered programs
-
isCDMfrForAmetys
Description copied from class:AbstractCDMfrProcessor
true
to generate CDM-fr for another Ametys,false
otherwise.- Specified by:
isCDMfrForAmetys
in classAbstractCDMfrProcessor
- Returns:
true
to generate CDM-fr for another Ametys instance
-
processProgram
Description copied from class:AbstractCDMfrProcessor
Process the program and its CDM-fr input stream.- Specified by:
processProgram
in classAbstractCDMfrProcessor
- Parameters:
program
- The programcdmfrContent
- The CDM-fr content asInputStream
- Throws:
IOException
- if an exception occurs
-
getErrorMessage
Description copied from class:AbstractCDMfrProcessor
Get the error message if process fails.- Specified by:
getErrorMessage
in classAbstractCDMfrProcessor
- Returns:
- the error message
-