Package com.emc.documentum.rest.error
Class RestErrorBuilder
java.lang.Object
com.emc.documentum.rest.error.RestErrorBuilder
A builder to build the REST error from a generic exception.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSet the message arguments for the corresponding message of the REST error codebuild()Build the REST error with localeSet the REST error codeSet the details for the REST error.Set id for the REST errorSet the localization for error message.status(int status) Set the HTTP status code
- 
Constructor Details- 
RestErrorBuilderConstructor- Parameters:
- throwable- exception during the operation
 
 
- 
- 
Method Details- 
statusSet the HTTP status code- Parameters:
- status- the HTTP status code for error response
- Returns:
- the builder itself
 
- 
codeSet the REST error code- Parameters:
- code- the REST error code
- Returns:
- the builder itself
 
- 
argsSet the message arguments for the corresponding message of the REST error code- Parameters:
- args- the message arguments
- Returns:
- the builder itself
 
- 
detailsSet the details for the REST error. Details will be delimited by semicolon(;).- Parameters:
- details- the details of the REST error.
- Returns:
- the builder itself
 
- 
idSet id for the REST error- Parameters:
- id- the REST error message id
- Returns:
- this builder itself
 
- 
localeSet the localization for error message. The default locale will be got from RepositoryContextHolder or the OS default locale.- Parameters:
- locale- the locale for the error message
- Returns:
- this builder itself
 
- 
buildBuild the REST error with locale- Returns:
- the REST error instance
 
 
-