Package io.goobi.viewer.api.rest.model
Class SuccessMessage
java.lang.Object
io.goobi.viewer.api.rest.model.SuccessMessage
- All Implemented Interfaces:
IResponseMessage
REST API response model indicating whether an operation succeeded, together with an optional human-readable result description.
Implements
IResponseMessage and is serialized as JSON for operation-result responses.- Author:
- Florian Alpers
-
Constructor Summary
ConstructorsConstructorDescriptionSuccessMessage(boolean success) Creates a new SuccessMessage instance.SuccessMessage(boolean success, String message) Creates a new SuccessMessage instance. -
Method Summary
-
Constructor Details
-
SuccessMessage
Creates a new SuccessMessage instance.- Parameters:
success- true if the operation succeededmessage- human-readable result description
-
SuccessMessage
public SuccessMessage(boolean success) Creates a new SuccessMessage instance.- Parameters:
success- true if the operation succeeded
-
-
Method Details
-
isSuccess
public boolean isSuccess()isSuccess.- Returns:
- true if the operation succeeded, false otherwise
-
getMessage
Getter for the fieldmessage.- Specified by:
getMessagein interfaceIResponseMessage- Returns:
- the human-readable result description
-
hashCode
public int hashCode() -
equals
-