Package org.openrefine.history
Class OperationApplicationResult
- java.lang.Object
-
- org.openrefine.history.OperationApplicationResult
-
public class OperationApplicationResult extends Object
Result of the application of an operation, which can either succeed in adding a new history entry to the project, or fail with an error. In both cases, the operation has the opportunity to expose additional data:- For success, return a subclass of
ChangeResult
which stores additional information. This information should be serialized in JSON as well. - For failure, the exception itself can carry more data (and should also be serializable in JSON).
- Author:
- Antonin Delpeuch
- For success, return a subclass of
-
-
Constructor Summary
Constructors Constructor Description OperationApplicationResult(HistoryEntry historyEntry, ChangeResult changeResult)
Construct an instance representing a successful application.OperationApplicationResult(OperationException exception)
Construct an instance representing an unsuccessful application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ChangeResult
getChangeResult()
OperationException
getException()
HistoryEntry
getHistoryEntry()
int
hashCode()
boolean
isSuccess()
-
-
-
Constructor Detail
-
OperationApplicationResult
public OperationApplicationResult(HistoryEntry historyEntry, ChangeResult changeResult)
Construct an instance representing a successful application.
-
OperationApplicationResult
public OperationApplicationResult(OperationException exception)
Construct an instance representing an unsuccessful application.
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
-
getHistoryEntry
public HistoryEntry getHistoryEntry()
-
getChangeResult
public ChangeResult getChangeResult()
-
getException
public OperationException getException()
-
-