public class PerformResult extends Object
TransformationUtility
instance has been performed.Modifier and Type | Class and Description |
---|---|
static class |
PerformResult.Type
The type of result after the
TransformationUtility instance has been performed. |
Modifier and Type | Method and Description |
---|---|
R |
addWarning(Exception warning)
Add a new warning associated with this result.
|
protected void |
changeTypeOnWarning()
This method is used to notify subclasses that
the result type might have to change due to the
addition of a warning.
|
protected boolean |
dependencyFailureCheck()
Returns true if this result type falls to the dependency failure criteria,
which is stated in
TransformationUtility.dependsOn(String...) |
static PerformResult |
error(TransformationUtility transformationUtility,
Exception exception)
This means The TU failed, but not because of its utility execution itself, but because of an internal reason.
|
static PerformResult |
error(TransformationUtility transformationUtility,
Exception exception,
String details)
This means The TU failed, but not because of its utility execution itself, but because of an internal reason.
|
static PerformResult |
executionResult(TransformationUtility transformationUtility,
ExecutionResult executionResult)
This means the utility has been executed,
and the result type is defined based on the utility execution result type.
|
String |
getDetails()
Return the result details
|
Exception |
getException()
Return the exception object in case of types such as ERROR
|
ExecutionResult |
getExecutionResult()
Return the
ExecutionResult object associated with this perform result |
S |
getSource()
Returns the source of this result, which could be for example
a transformation utility instance or a transformation
operation instance
|
T |
getType()
Returns the result type
|
List<Exception> |
getWarnings()
Return a list of warnings associated with this result.
|
protected boolean |
isExceptionType()
Returns true if this result type is supposed to contain an exception,
such ERROR
|
R |
setDetails(String details) |
protected R |
setException(Exception exception)
Set the exception associated with this result.
|
protected R |
setType(T type) |
static PerformResult |
skippedCondition(TransformationUtility transformationUtility,
String details)
This means the utility has not been executed
because its pre-requisite condition is not true
|
static PerformResult |
skippedDependency(TransformationUtility transformationUtility,
String details)
This means the utility has not been executed because one or more
of its dependencies "failed".
|
public static PerformResult executionResult(TransformationUtility transformationUtility, ExecutionResult executionResult)
transformationUtility
- the TransformationUtility
object that produced this resultexecutionResult
- the utility execution resultPerformResult
object of type PerformResult.Type.EXECUTION_RESULT
public static PerformResult skippedCondition(TransformationUtility transformationUtility, String details)
transformationUtility
- the TransformationUtility
object that produced this resultdetails
- details about the resultPerformResult
object of type PerformResult.Type.SKIPPED_DEPENDENCY
public static PerformResult skippedDependency(TransformationUtility transformationUtility, String details)
TransformationUtility.dependsOn(String...)
for the dependency failure criteria definitiontransformationUtility
- the TransformationUtility
object that produced this resultdetails
- details about the resultPerformResult
object of type PerformResult.Type.SKIPPED_DEPENDENCY
public static PerformResult error(TransformationUtility transformationUtility, Exception exception, String details)
transformationUtility
- the TransformationUtility
object that produced this resultexception
- the exception to be registered to the result objectdetails
- details about the resultPerformResult
object of type PerformResult.Type.ERROR
public static PerformResult error(TransformationUtility transformationUtility, Exception exception)
transformationUtility
- the TransformationUtility
object that produced this resultexception
- the exception to be registered to the result objectPerformResult
object of type PerformResult.Type.ERROR
protected void changeTypeOnWarning()
public ExecutionResult getExecutionResult()
ExecutionResult
object associated with this perform resultExecutionResult
object associated with this perform resultprotected boolean isExceptionType()
protected boolean dependencyFailureCheck()
TransformationUtility.dependsOn(String...)
protected R setType(T type)
public R setDetails(String details)
protected R setException(Exception exception)
IllegalArgumentException
will be thrownexception
- associated with the execution resultpublic R addWarning(Exception warning)
warning
- the warning to be addedpublic S getSource()
public T getType()
public String getDetails()
public Exception getException()
Copyright © 2018. All rights reserved.