Class ServerAuthorExceptionHandler
- java.lang.Object
-
- org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorExceptionHandler
-
public class ServerAuthorExceptionHandler extends Object
The Server Author Exception handler maps OMAG exceptions that have been produced by the admin client into Server author Exceptions.
-
-
Constructor Summary
Constructors Constructor Description ServerAuthorExceptionHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcaptureCheckedException(FFDCResponse response, OCFCheckedExceptionBase error, String exceptionClassName)Method for capturing an exception into a REST response.static ServerAuthorViewServiceExceptionmapOMAGConfigurationErrorException(String className, String methodName, OMAGConfigurationErrorException error)Map an OMAG configuration exception to a ServerAuthorViewServiceExceptionstatic ServerAuthorViewServiceExceptionmapOMAGInvalidParameterException(String className, String methodName, OMAGInvalidParameterException omagException)Map an OMAGInvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UIstatic ServerAuthorViewServiceExceptionmapOMAGUserNotAuthorizedException(String className, String methodName, OMAGNotAuthorizedException omagException)Map an OMAGNotAuthorizedException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI
-
-
-
Method Detail
-
captureCheckedException
public static void captureCheckedException(FFDCResponse response, OCFCheckedExceptionBase error, String exceptionClassName)
Method for capturing an exception into a REST response. Set the exception information into the response. This exception capture handler strips off the messageId from the front of the message as the message is intended for user-consumption.- Parameters:
response- REST Responseerror- returned response.exceptionClassName- class name of the exception to recreate
-
mapOMAGUserNotAuthorizedException
public static ServerAuthorViewServiceException mapOMAGUserNotAuthorizedException(String className, String methodName, OMAGNotAuthorizedException omagException)
Map an OMAGNotAuthorizedException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI- Parameters:
className- the name of the calling classmethodName- the name of the operation being requestedomagException- supplied OMAGNotAuthorizedException- Returns:
- mapped Server author View Exception
-
mapOMAGInvalidParameterException
public static ServerAuthorViewServiceException mapOMAGInvalidParameterException(String className, String methodName, OMAGInvalidParameterException omagException)
Map an OMAGInvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI- Parameters:
className- the name of the calling classmethodName- the name of the operation being requestedomagException- supplied OMAGInvalidParameterException- Returns:
- mapped Server author View Exception
-
mapOMAGConfigurationErrorException
public static ServerAuthorViewServiceException mapOMAGConfigurationErrorException(String className, String methodName, OMAGConfigurationErrorException error)
Map an OMAG configuration exception to a ServerAuthorViewServiceException- Parameters:
className- the name of the calling classmethodName- the name of the operation being requestederror- the OMAGConfigurationErrorException error to be mapped- Returns:
- ServerAuthorViewServiceException Server Author View Service Exception
-
-