public class TOExecutionResult extends ExecutionResult<TransformationOperation,TOExecutionResult,TOExecutionResult.Type>
TransformationOperation
instance has been executed.TOExecutionResult
Modifier and Type | Class and Description |
---|---|
static class |
TOExecutionResult.Type
The type of result after the
TransformationOperation instance has been executed. |
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 TOExecutionResult |
error(TransformationOperation transformationOperation,
Exception exception)
Creates and returns a new
TOExecutionResult.Type.ERROR result |
static TOExecutionResult |
error(TransformationOperation transformationOperation,
Exception exception,
String details)
Creates and returns a new
TOExecutionResult.Type.ERROR result |
String |
getDetails()
Return the result details
|
Exception |
getException()
Return the exception object in case of types such as ERROR
|
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
|
static TOExecutionResult |
noOp(TransformationOperation transformationOperation,
String details)
Creates and returns a new
TOExecutionResult.Type.NO_OP result |
R |
setDetails(String details) |
protected R |
setException(Exception exception)
Set the exception associated with this result.
|
protected R |
setType(T type) |
static TOExecutionResult |
success(TransformationOperation transformationOperation,
String details)
Creates and returns a new
TOExecutionResult.Type.SUCCESS result |
static TOExecutionResult |
warning(TransformationOperation transformationOperation)
Creates and returns a new
TOExecutionResult.Type.WARNING result |
static TOExecutionResult |
warning(TransformationOperation transformationOperation,
Exception exception)
Creates and returns a new
TOExecutionResult.Type.WARNING result |
static TOExecutionResult |
warning(TransformationOperation transformationOperation,
Exception exception,
String details)
Creates and returns a new
TOExecutionResult.Type.WARNING result |
static TOExecutionResult |
warning(TransformationOperation transformationOperation,
String details)
Creates and returns a new
TOExecutionResult.Type.WARNING result |
public static TOExecutionResult noOp(TransformationOperation transformationOperation, String details)
TOExecutionResult.Type.NO_OP
resulttransformationOperation
- the TransformationOperation
object that produced this resultdetails
- details about the resultpublic static TOExecutionResult success(TransformationOperation transformationOperation, String details)
TOExecutionResult.Type.SUCCESS
resulttransformationOperation
- the TransformationOperation
object that produced this resultdetails
- details about the resultpublic static TOExecutionResult warning(TransformationOperation transformationOperation)
TOExecutionResult.Type.WARNING
resulttransformationOperation
- the TransformationOperation
object that produced this resultpublic static TOExecutionResult warning(TransformationOperation transformationOperation, String details)
TOExecutionResult.Type.WARNING
resulttransformationOperation
- the TransformationOperation
object that produced this resultdetails
- details about the resultpublic static TOExecutionResult warning(TransformationOperation transformationOperation, Exception exception)
TOExecutionResult.Type.WARNING
resulttransformationOperation
- the TransformationOperation
object that produced this resultexception
- the exception to be registered as warning to the result objectpublic static TOExecutionResult warning(TransformationOperation transformationOperation, Exception exception, String details)
TOExecutionResult.Type.WARNING
resulttransformationOperation
- the TransformationOperation
object that produced this resultexception
- the exception to be registered to the result objectdetails
- details about the resultpublic static TOExecutionResult error(TransformationOperation transformationOperation, Exception exception)
TOExecutionResult.Type.ERROR
resulttransformationOperation
- the TransformationOperation
object that produced this resultexception
- the exception to be registered to the result objectpublic static TOExecutionResult error(TransformationOperation transformationOperation, Exception exception, String details)
TOExecutionResult.Type.ERROR
resulttransformationOperation
- the TransformationOperation
object that produced this resultexception
- the exception to be registered to the result objectdetails
- details about the resultprotected void changeTypeOnWarning()
protected 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.