Class OMASServiceInstanceHandler
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
-
- org.odpi.openmetadata.commonservices.multitenant.AuditableServerServiceInstanceHandler
-
- org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler
-
public class OMASServiceInstanceHandler extends AuditableServerServiceInstanceHandler
OMASServiceInstanceHandler retrieves information from the instance map for the access service instances. The instance map is thread-safe. Instances are added and removed by the GovernanceProgramAdmin class.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
platformInstanceMap, serviceName
-
-
Constructor Summary
Constructors Constructor Description OMASServiceInstanceHandler(String serviceName)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getDefaultZones(String userId, String serverName, String serviceOperationName)Retrieve the default zones set up for this service instance.List<String>getDefaultZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName)Get the defaultZones for a specific service.RepositoryErrorHandlergetErrorHandler(String userId, String serverName, String serviceOperationName)Retrieve the handler for managing errors from the repository services.RESTExceptionHandlergetExceptionHandler()Retrieve the exception handler that can package up common exceptions and pack them into a REST Response.ConnectiongetInTopicConnection(String userId, String serverName, String serviceOperationName, String callerId)Return the connection used in the client to create a connector to access events from the out topic.OMRSMetadataCollectiongetMetadataCollection(String userId, String serverName, String serviceOperationName)Retrieve the metadata collection for the access service.ConnectiongetOutTopicConnection(String userId, String serverName, String serviceOperationName, String callerId)Return the connection used in the client to create a connector to access events from the out topic.List<String>getPublishZones(String userId, String serverName, String serviceOperationName)Retrieve the publish zones set up for this service instance.List<String>getPublishZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName)Get the publish for a specific service.OMRSRepositoryConnectorgetRepositoryConnector(String userId, String serverName, String serviceOperationName)Retrieve the repository connector for the access service.RepositoryHandlergetRepositoryHandler(String userId, String serverName, String serviceOperationName)Retrieve the repository handler for the access service.OMRSRepositoryHelpergetRepositoryHelper(String userId, String serverName, String serviceOperationName)Retrieve the repository helper for the access service.StringgetServiceName(String callingServiceURLName)Return the service's official nameList<String>getSupportedZones(String userId, String serverName, String serviceOperationName)Retrieve the supported zones set up for this service instance.List<String>getSupportedZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName)Get the supportedZones for a specific service.-
Methods inherited from class org.odpi.openmetadata.commonservices.multitenant.AuditableServerServiceInstanceHandler
getAuditLog
-
Methods inherited from class org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
getServerSecurityVerifier, getServerServiceInstance, getServiceName, isServerActive, removeServerServiceInstance
-
-
-
-
Constructor Detail
-
OMASServiceInstanceHandler
public OMASServiceInstanceHandler(String serviceName)
Constructor- Parameters:
serviceName- a descriptive name for the OMAS
-
-
Method Detail
-
getRepositoryConnector
public OMRSRepositoryConnector getRepositoryConnector(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the repository connector for the access service.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- repository connector for exclusive use by the requested instance
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the repository connector is not available - indicating a logic error
-
getRepositoryHelper
public OMRSRepositoryHelper getRepositoryHelper(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the repository helper for the access service.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- repository connector for exclusive use by the requested instance
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the repository connector is not available - indicating a logic error
-
getMetadataCollection
public OMRSMetadataCollection getMetadataCollection(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the metadata collection for the access service.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- metadata collection for exclusive use by the requested instance
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getRepositoryHandler
public RepositoryHandler getRepositoryHandler(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the repository handler for the access service. Provides an advanced API for the repository services.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- repository handler
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getErrorHandler
public RepositoryErrorHandler getErrorHandler(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the handler for managing errors from the repository services.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- repository error handler
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getServiceName
public String getServiceName(String callingServiceURLName)
Return the service's official name- Parameters:
callingServiceURLName- url fragment that indicates the service name- Returns:
- String name
-
getSupportedZones
public List<String> getSupportedZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Get the supportedZones for a specific service. This is used in services that are shared by different access services.- Parameters:
userId- calling userserverName- name of this servercallingServiceURLName- url fragment that indicates the service nameserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known - indicating a logic error
-
getDefaultZones
public List<String> getDefaultZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Get the defaultZones for a specific service. This is used in services that are shared by different access services.- Parameters:
userId- calling userserverName- name of this servercallingServiceURLName- url fragment that indicates the service nameserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getPublishZones
public List<String> getPublishZones(String userId, String serverName, String callingServiceURLName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Get the publish for a specific service. This is used in services that are shared by different access services.- Parameters:
userId- calling userserverName- name of this servercallingServiceURLName- url fragment that indicates the service nameserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getSupportedZones
public List<String> getSupportedZones(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the supported zones set up for this service instance.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getDefaultZones
public List<String> getDefaultZones(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the default zones set up for this service instance.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getPublishZones
public List<String> getPublishZones(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the publish zones set up for this service instance.- Parameters:
userId- calling userIdserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)- Returns:
- list of governance zones
- Throws:
InvalidParameterException- the server name is not knownUserNotAuthorizedException- the user is not authorized to issue the request.PropertyServerException- the service name is not known or the metadata collection is not available - indicating a logic error
-
getInTopicConnection
public Connection getInTopicConnection(String userId, String serverName, String serviceOperationName, String callerId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the connection used in the client to create a connector to access events from the out topic.- Parameters:
userId- calling userserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)callerId- unique identifier of the caller- Returns:
- connection object for client
- Throws:
InvalidParameterException- no available instance for the requested serverUserNotAuthorizedException- user does not have access to the requested serverPropertyServerException- the service name is not known - indicating a logic error
-
getOutTopicConnection
public Connection getOutTopicConnection(String userId, String serverName, String serviceOperationName, String callerId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the connection used in the client to create a connector to access events from the out topic.- Parameters:
userId- calling userserverName- name of the server tied to the requestserviceOperationName- name of the REST API call (typically the top-level methodName)callerId- unique identifier of the caller- Returns:
- connection object for client
- Throws:
InvalidParameterException- no available instance for the requested serverUserNotAuthorizedException- user does not have access to the requested serverPropertyServerException- the service name is not known - indicating a logic error
-
getExceptionHandler
public RESTExceptionHandler getExceptionHandler()
Retrieve the exception handler that can package up common exceptions and pack them into a REST Response.- Returns:
- exception handler object
-
-