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 CatalogsManagerThe catalogs managerstatic final StringThe 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 StringGet the configuration parameter name to determine if the process is active.protected StringGet the error message if process fails.voidprotected booleantrueto generate CDM-fr for another Ametys,falseotherwise.protected voidprocessProgram(Program program, InputStream cdmfrContent) Process the program and its CDM-fr input stream.voidservice(ServiceManager manager) Methods inherited from class org.ametys.odf.cdmfr.AbstractCDMfrProcessor
_getCDMfrContent, isActive, processProgramsMethods 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:
servicein interfaceServiceable- Overrides:
servicein classAbstractCDMfrProcessor- Throws:
ServiceException
-
initialize
- Specified by:
initializein interfaceInitializable- Overrides:
initializein classAbstractCDMfrProcessor- Throws:
Exception
-
getConfigActiveParam
Description copied from class:AbstractCDMfrProcessorGet the configuration parameter name to determine if the process is active.- Specified by:
getConfigActiveParamin classAbstractCDMfrProcessor- Returns:
- The configuration parameter name
-
filterPrograms
Description copied from class:AbstractCDMfrProcessorFilter programs if needed.- Overrides:
filterProgramsin classAbstractCDMfrProcessor- Parameters:
programs- The programs to filter- Returns:
- The filtered programs
-
isCDMfrForAmetys
Description copied from class:AbstractCDMfrProcessortrueto generate CDM-fr for another Ametys,falseotherwise.- Specified by:
isCDMfrForAmetysin classAbstractCDMfrProcessor- Returns:
trueto generate CDM-fr for another Ametys instance
-
processProgram
Description copied from class:AbstractCDMfrProcessorProcess the program and its CDM-fr input stream.- Specified by:
processProgramin classAbstractCDMfrProcessor- Parameters:
program- The programcdmfrContent- The CDM-fr content asInputStream- Throws:
IOException- if an exception occurs
-
getErrorMessage
Description copied from class:AbstractCDMfrProcessorGet the error message if process fails.- Specified by:
getErrorMessagein classAbstractCDMfrProcessor- Returns:
- the error message
-