Package org.silverpeas.core.process.util
Class ProcessList<C extends ProcessExecutionContext>
- java.lang.Object
-
- org.silverpeas.core.process.util.ProcessList<C>
-
public class ProcessList<C extends ProcessExecutionContext> extends Object
Managing list of processes (tasks in other words) and setting global parameters for execution.- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description ProcessList()
Default constructorProcessList(List<SilverpeasProcess<C>> processes)
Default constructorProcessList(SilverpeasProcess<C>... processes)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SilverpeasProcess<C> process)
Adds a Silverpeas process.void
addAll(List<SilverpeasProcess<C>> processes)
Adds several Silverpeas processesvoid
addAll(SilverpeasProcess<C>... processes)
Adds several Silverpeas processes.List<SilverpeasProcess<C>>
getList()
Gets the list of Silverpeas processes.Map<String,Object>
getSessionParameters()
Gets the common session parameters.boolean
isEmpty()
Indicates if the list of Silverpeas is empty.boolean
isNotEmpty()
Indicates if the list of Silverpeas is not empty.void
put(String key, Object value)
Adds a session parameter.
-
-
-
Constructor Detail
-
ProcessList
public ProcessList()
Default constructor
-
ProcessList
@SafeVarargs public ProcessList(SilverpeasProcess<C>... processes)
Default constructor
-
ProcessList
public ProcessList(List<SilverpeasProcess<C>> processes)
Default constructor
-
-
Method Detail
-
getList
public List<SilverpeasProcess<C>> getList()
Gets the list of Silverpeas processes.- Returns:
- the list of processes to execute.
-
addAll
@SafeVarargs public final void addAll(SilverpeasProcess<C>... processes)
Adds several Silverpeas processes.- Parameters:
processes
- the processes to execute.
-
addAll
public void addAll(List<SilverpeasProcess<C>> processes)
Adds several Silverpeas processes- Parameters:
processes
- the processes to execute.
-
add
public void add(SilverpeasProcess<C> process)
Adds a Silverpeas process.- Parameters:
process
- a process to execute.
-
put
public void put(String key, Object value)
Adds a session parameter.- Parameters:
key
- the key of the session parameter.value
- the value of the session parameter.
-
getSessionParameters
public Map<String,Object> getSessionParameters()
Gets the common session parameters.- Returns:
- the map of session parameters.
-
isEmpty
public boolean isEmpty()
Indicates if the list of Silverpeas is empty.- Returns:
- true if it does not exist process to execute.
-
isNotEmpty
public boolean isNotEmpty()
Indicates if the list of Silverpeas is not empty.- Returns:
- true if it exists at least one process to execute.
-
-