Package org.dspace.app.rest.exception
Class RESTEmptyWorkflowGroupException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.dspace.app.rest.exception.UnprocessableEntityException
-
- org.dspace.app.rest.exception.RESTEmptyWorkflowGroupException
-
- All Implemented Interfaces:
Serializable,TranslatableException
public class RESTEmptyWorkflowGroupException extends UnprocessableEntityException implements TranslatableException
Extend
UnprocessableEntityExceptionto provide a specific error message in the REST response. The error message is added to the response inDSpaceApiExceptionControllerAdvice.handleCustomUnprocessableEntityException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.dspace.app.rest.exception.TranslatableException), hence it should not contain sensitive or security-compromising info.Note there is a similarly named error in the DSpace API module.
- Author:
- Bruno Roemers (bruno.roemers at atmire.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringMESSAGE_KEY
-
Constructor Summary
Constructors Constructor Description RESTEmptyWorkflowGroupException(org.dspace.eperson.EmptyWorkflowGroupException cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLocalizedMessage(org.dspace.core.Context context)StringgetMessageKey()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.dspace.app.rest.exception.TranslatableException
getLocalizedMessage, getMessage
-
-
-
-
Field Detail
-
MESSAGE_KEY
public static final String MESSAGE_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMessageKey
public String getMessageKey()
- Specified by:
getMessageKeyin interfaceTranslatableException- Returns:
- message key (used for lookup with
I18nUtil)
-
getLocalizedMessage
public String getLocalizedMessage(org.dspace.core.Context context)
- Specified by:
getLocalizedMessagein interfaceTranslatableException- Parameters:
context- current DSpace context (used to infer current locale)- Returns:
- message for current locale (or default locale if current locale did not yield a result)
-
-