Class ResultContainer
- java.lang.Object
-
- com.inet.taskplanner.server.api.job.JobResultContainer
-
- com.inet.taskplanner.server.api.job.ResultContainer
-
public class ResultContainer extends JobResultContainer
Class representing theresults
of ajob
.Contains the list of
results
from the execution and a flag whether the condition for the job was fulfilled or not.- Since:
- taskplanner 3.0
-
-
Constructor Summary
Constructors Constructor Description ResultContainer(java.util.List<Result> results)
Creates a new ResultContainer instance.ResultContainer(java.util.List<Result> results, java.util.Map<java.lang.String,java.lang.String> metaProperties)
Creates a new ResultContainer instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanup()
When result-handling is finished, then this method is called to clean up used system resources, i.e.java.util.List<ResultFlavor>
getFlavors()
Returns the flavors supported by this containerjava.util.Map<java.lang.String,java.lang.String>
getMetaProperties()
Returns the additional meta properties for the job execution.java.util.List<Result>
getResults(ResultFlavor flavor)
Returns all results for a certain flavor-
Methods inherited from class com.inet.taskplanner.server.api.job.JobResultContainer
areResultsProcessable, setAreResultsProcessable
-
-
-
-
Constructor Detail
-
ResultContainer
public ResultContainer(@Nonnull java.util.List<Result> results)
Creates a new ResultContainer instance.- Parameters:
results
- the results from the job execution, can be empty- Since:
- taskplanner 3.0
-
ResultContainer
public ResultContainer(@Nonnull java.util.List<Result> results, @Nonnull java.util.Map<java.lang.String,java.lang.String> metaProperties)
Creates a new ResultContainer instance.- Parameters:
results
- the results from the job execution, can be emptymetaProperties
- additional meta properties to be used for placeholder replacement- Since:
- taskplanner 3.0
-
-
Method Detail
-
getFlavors
public java.util.List<ResultFlavor> getFlavors()
Returns the flavors supported by this container- Specified by:
getFlavors
in classJobResultContainer
- Returns:
- the flavors supported by this container
-
getResults
public java.util.List<Result> getResults(ResultFlavor flavor)
Returns all results for a certain flavor- Specified by:
getResults
in classJobResultContainer
- Parameters:
flavor
- the flavor to get the results for, should be one of the flavors returned byJobResultContainer.getFlavors()
- Returns:
- a list with all results that support the requested flavor, could be an empty list but not
null
-
getMetaProperties
public java.util.Map<java.lang.String,java.lang.String> getMetaProperties()
Returns the additional meta properties for the job execution. These properties are supposed to be used for replacing placeholders in textual output formats like email or messengers- Specified by:
getMetaProperties
in classJobResultContainer
- Returns:
- the meta properties map, not
null
-
cleanup
public void cleanup()
When result-handling is finished, then this method is called to clean up used system resources, i.e. to delete all created file.This is also called if no appropriate
ResultAction
handled this Result.- Specified by:
cleanup
in classJobResultContainer
-
-