Class ServerAuthorExceptionHandler
java.lang.Object
org.odpi.openmetadata.viewservices.serverauthor.api.ffdc.ServerAuthorExceptionHandler
The Server Author Exception handler maps OMAG exceptions that have been produced by the admin client into
Server author Exceptions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcaptureCheckedException(org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse response, org.odpi.openmetadata.frameworks.connectors.ffdc.OCFCheckedExceptionBase error, String exceptionClassName) Method for capturing an exception into a REST response.mapOCFInvalidParameterException(String className, String methodName, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException error) Map an OCF InvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UImapOCFPropertyServerError(String className, String methodName, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException error) mapOMAGConfigurationErrorException(String className, String methodName, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException error) Map an OMAG configuration exception to a ServerAuthorViewServiceExceptionmapOMAGInvalidParameterException(String className, String methodName, org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException omagException) Map an OMAGInvalidParameterException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UImapToUserNotAuthorizedException(String className, String methodName) Map an OMAGNotAuthorizedException to a ServerAuthorViewServiceException which is more consumable / meaningful to the UI
-
Constructor Details
-
ServerAuthorExceptionHandler
public ServerAuthorExceptionHandler()
-
-
Method Details
-
captureCheckedException
public static void captureCheckedException(org.odpi.openmetadata.commonservices.ffdc.rest.FFDCResponse response, org.odpi.openmetadata.frameworks.connectors.ffdc.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
-
mapToUserNotAuthorizedException
public static ServerAuthorViewServiceException mapToUserNotAuthorizedException(String className, String methodName) 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 requested- Returns:
- mapped Server author View Exception
-
mapOMAGInvalidParameterException
public static ServerAuthorViewServiceException mapOMAGInvalidParameterException(String className, String methodName, org.odpi.openmetadata.adminservices.ffdc.exception.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, org.odpi.openmetadata.adminservices.ffdc.exception.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
-
mapOCFInvalidParameterException
public static ServerAuthorViewServiceException mapOCFInvalidParameterException(String className, String methodName, org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException error) Map an OCF InvalidParameterException 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 requestederror- supplied OCF InvalidParameterException- Returns:
- mapped Server author View Exception
-
mapOCFPropertyServerError
public static ServerAuthorViewServiceException mapOCFPropertyServerError(String className, String methodName, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException error)
-