Class OMAGServerErrorHandler

java.lang.Object
org.odpi.openmetadata.adminservices.server.OMAGServerErrorHandler

public class OMAGServerErrorHandler extends Object
OMAGServerErrorHandler provides common error handling routines for the admin services
  • Constructor Details

    • OMAGServerErrorHandler

      public OMAGServerErrorHandler()
      Default constructor
  • Method Details

    • validateUserId

      public void validateUserId(String userId, String serverName, String methodName) throws OMAGNotAuthorizedException
      Validate that the user id is not null.
      Parameters:
      userId - user name passed on the request
      serverName - name of this server
      methodName - method receiving the call
      Throws:
      OMAGNotAuthorizedException - no userId provided
    • validateServerName

      public void validateServerName(String serverName, String methodName) throws OMAGInvalidParameterException
      Validate that the server name is not null and save it in the config.
      Parameters:
      serverName - serverName passed on a request
      methodName - method being called
      Throws:
      OMAGInvalidParameterException - null server name
    • validateFileName

      public void validateFileName(String fileName, String serverName, String methodName) throws OMAGInvalidParameterException
      Validate that the file name is not null.
      Parameters:
      fileName - fileName passed on the request
      serverName - server name for this server
      methodName - method called
      Throws:
      OMAGInvalidParameterException - the cohort name is null
    • validateServerConnection

      public void validateServerConnection(Connection connection, String serverName, String methodName) throws OMAGInvalidParameterException
      Validate that the connection is not null. This is used for server specific requests
      Parameters:
      connection - connection passed on the request
      serverName - server name for this server
      methodName - method called
      Throws:
      OMAGInvalidParameterException - the connection is null
    • validatePlatformConnection

      public void validatePlatformConnection(Connection connection, String methodName) throws OMAGInvalidParameterException
      Validate that the connection is not null. This is used for OMAG Platform Requests
      Parameters:
      connection - connection passed on the request
      methodName - method called
      Throws:
      OMAGInvalidParameterException - the connection is null
    • validatePropertyNotNull

      public void validatePropertyNotNull(Object property, String propertyName, String serverName, String methodName) throws OMAGInvalidParameterException
      Validate that an essential OMAG server configuration property has been set.
      Parameters:
      property - The property that should be present in the OMAG server configuration.
      propertyName - The name of the property that should be present in the OMAG server configuration.
      serverName - server name for this server.
      methodName - method called.
      Throws:
      OMAGInvalidParameterException - The property is null.
    • validateOMAGServerName

      public void validateOMAGServerName(String omagServerName, String serverName, String serverService) throws OMAGInvalidParameterException
      Validate that the server name of the server where an access service resides is not null.
      Parameters:
      omagServerName - remote server name passed on the request
      serverName - server name for this server
      serverService - name of the service being configured
      Throws:
      OMAGInvalidParameterException - the name is null
    • validateServiceURLMarker

      public void validateServiceURLMarker(String serviceURLMarker, String serverName, String serverService) throws OMAGInvalidParameterException
      Validate that the server name of the server where an access service resides is not null.
      Parameters:
      serviceURLMarker - remote server name passed on the request
      serverName - server name for this server
      serverService - name of the service being configured
      Throws:
      OMAGInvalidParameterException - the name is null