public class ErrorHandler extends Object
| Constructor and Description |
|---|
ErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
static SubjectAreaOMASAPIResponse |
handleClassificationErrorException(ClassificationErrorException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area classification error exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleEntityNotDeletedException(String guid,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area entity not deleted exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleEntityNotKnownError(String guid,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area Entity Not known exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleEntityNotKnownException(String guid,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area Entity not known exception and throw it.
|
SubjectAreaOMASAPIResponse |
handleEntityNotPurgedException(String obsoleteGuid,
String restAPIName,
String serverName,
String serviceName) |
static SubjectAreaOMASAPIResponse |
handleEntityProxyOnlyException(EntityProxyOnlyException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area Entity Proxy Only exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleFunctionNotSupportedException(FunctionNotSupportedException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area Function Not Supported exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleInvalidParameterException(InvalidParameterException e,
String methodName,
String serverName,
String serviceName)
Throw an Invalid Parameter exception
|
SubjectAreaOMASAPIResponse |
handleMetadataServerUnContactable(MetadataServerUncontactableException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area metadata server not reachable exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handlePagingErrorException(PagingErrorException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area paging error exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handlePropertyErrorException(PropertyErrorException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area property error exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleRelationshipNotDeletedException(String guid,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area relationship not deleted exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleRelationshipNotKnownException(String guid,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area relationship not known exception and throw it.
|
SubjectAreaOMASAPIResponse |
handleRelationshipNotPurgedException(String obsoleteGuid,
String restAPIName,
String serverName,
String serviceName) |
static SubjectAreaOMASAPIResponse |
handleRepositoryError(Throwable error,
String methodName,
String serverName,
String serviceName)
return an exception response if the respository could not be contacted
|
static SubjectAreaOMASAPIResponse |
handleStatusNotSupportedException(StatusNotSupportedException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area status not known exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleTypeDefNotKnownException(String typeName,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area invalid type name exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleTypeErrorException(TypeErrorException e,
String methodName,
String serverName,
String serviceName)
Convert the supplied OMRS exception to a Subject Area type error exception and throw it.
|
static SubjectAreaOMASAPIResponse |
handleUnauthorizedUser(String userId,
String methodName,
String serverName,
String serviceName)
return an exception response if the supplied userId is not authorized to perform a request
|
static SubjectAreaOMASAPIResponse |
handleUnknownAsset(Throwable error,
String assetGUID,
String methodName,
String serverName,
String serviceName)
return an exception response if the asset is not known
|
public static SubjectAreaOMASAPIResponse handleUnauthorizedUser(String userId, String methodName, String serverName, String serviceName)
userId - user name to validatemethodName - name of the method making the call.serverName - name of this server name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleRepositoryError(Throwable error, String methodName, String serverName, String serviceName)
error - caught exceptionmethodName - name of the method making the call.serverName - name of this server name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleUnknownAsset(Throwable error, String assetGUID, String methodName, String serverName, String serviceName)
error - caught exceptionassetGUID - unique identifier for the requested assetmethodName - name of the method making the callserverName - name of this server name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleInvalidParameterException(InvalidParameterException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleTypeDefNotKnownException(String typeName, String methodName, String serverName, String serviceName)
typeName - the name of the unknown typemethodName - name of the method making the call.serverName - name of this serverserviceName - access service namepublic static SubjectAreaOMASAPIResponse handlePropertyErrorException(PropertyErrorException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleClassificationErrorException(ClassificationErrorException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleStatusNotSupportedException(StatusNotSupportedException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleEntityNotKnownError(String guid, String methodName, String serverName, String serviceName)
guid - supplied guidmethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleEntityProxyOnlyException(EntityProxyOnlyException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleTypeErrorException(TypeErrorException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleFunctionNotSupportedException(FunctionNotSupportedException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handlePagingErrorException(PagingErrorException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleRelationshipNotKnownException(String guid, String methodName, String serverName, String serviceName)
guid - supplied guidmethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleEntityNotKnownException(String guid, String methodName, String serverName, String serviceName)
guid - supplied guidmethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleEntityNotDeletedException(String guid, String methodName, String serverName, String serviceName)
guid - supplied guidmethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic static SubjectAreaOMASAPIResponse handleRelationshipNotDeletedException(String guid, String methodName, String serverName, String serviceName)
guid - supplied guidmethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic SubjectAreaOMASAPIResponse handleMetadataServerUnContactable(MetadataServerUncontactableException e, String methodName, String serverName, String serviceName)
e - exception to handlemethodName - name of the method making the call.serverName - name of this serverserviceName - name of this access servicepublic SubjectAreaOMASAPIResponse handleEntityNotPurgedException(String obsoleteGuid, String restAPIName, String serverName, String serviceName)
public SubjectAreaOMASAPIResponse handleRelationshipNotPurgedException(String obsoleteGuid, String restAPIName, String serverName, String serviceName)
Copyright © 2018–2019 ODPi. All rights reserved.