Package org.silverpeas.core.process
Interface SilverpeasProcess<C extends ProcessExecutionContext>
-
- All Known Implementing Classes:
AbstractDataProcess
,AbstractFileProcess
,AbstractProcess
,SimulationElementConversionProcess
public interface SilverpeasProcess<C extends ProcessExecutionContext>
Interface which has to be implemented by each process (or task in other words) that has to be taken in charge by the Silverpeas Process API.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProcessType
getProcessType()
Gets the process typevoid
onFailure(ProcessErrorType errorType, Exception exception)
This method is called when exception is generated during a execution of Silverpeas Processes chain and if the process method of the task have been executed.void
onSuccessful()
Containing treatments which have to be done after a successful execution of process method and after successful validations.void
process(C processExecutionContext, ProcessSession session)
Containing main treatment of the process.
-
-
-
Method Detail
-
getProcessType
ProcessType getProcessType()
Gets the process type- Returns:
-
process
void process(C processExecutionContext, ProcessSession session) throws Exception
Containing main treatment of the process.- Throws:
Exception
-
onSuccessful
void onSuccessful() throws Exception
Containing treatments which have to be done after a successful execution of process method and after successful validations.- Throws:
Exception
-
onFailure
void onFailure(ProcessErrorType errorType, Exception exception) throws Exception
This method is called when exception is generated during a execution of Silverpeas Processes chain and if the process method of the task have been executed.- Parameters:
errorType
-exception
-- Throws:
Exception
-
-