Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
Lightweight optional convenience base class for REST end points with commonly used methods.
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
AbstractResource
()
Protected Methods
Creates an error response using the given errors.
Parameters
errors
| the errors to use for the error response. Should not be empty. |
protected
Response
createIndexingUnavailableResponse
(String message)
protected
Response
createValidationResponse
(Collection<ValidationError> errors)
Creates a response based on the given errors. If there are no errors, the response will be NO_CONTENT (204). If there are
errors, these will be used to return an error response. Many REST validate methods need to first build up a
possibly empty collection of ValidationError
and then just return
the result of calling this method.
Parameters
errors
| the possibly empty collection of errors. |
Returns
- a success response if the errors are empty, otherwise an error response based on these errors.