Class OMASServiceInstanceHandler
java.lang.Object
org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
org.odpi.openmetadata.commonservices.multitenant.AuditableServerServiceInstanceHandler
org.odpi.openmetadata.commonservices.multitenant.OMASServiceInstanceHandler
- Direct Known Subclasses:
GAFMetadataManagementInstanceHandler
,OCFMetadataInstanceHandler
,OpenIntegrationInstanceHandler
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
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultZones
(String userId, String serverName, String serviceOperationName) Retrieve the default zones set up for this service instance.getDefaultZones
(String userId, String serverName, String callingServiceURLName, String serviceOperationName) Get the defaultZones for a specific service.getErrorHandler
(String userId, String serverName, String serviceOperationName) Retrieve the handler for managing errors from the repository services.Retrieve the exception handler that can package up common exceptions and pack them into a REST Response.getInTopicConnection
(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.getMetadataCollection
(String userId, String serverName, String serviceOperationName) Retrieve the metadata collection for the access service.getOutTopicConnection
(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.getPublishZones
(String userId, String serverName, String serviceOperationName) Retrieve the publishZones set up for this service instance.getPublishZones
(String userId, String serverName, String callingServiceURLName, String serviceOperationName) Get the publishZones for a specific service.getRepositoryConnector
(String userId, String serverName, String serviceOperationName) Retrieve the repository connector for the access service.getRepositoryHandler
(String userId, String serverName, String serviceOperationName) Retrieve the repository handler for the access service.getRepositoryHelper
(String userId, String serverName, String serviceOperationName) Retrieve the repository helper for the access service.getServiceName
(String callingServiceURLName) Return the service's official name.getSupportedZones
(String userId, String serverName, String serviceOperationName) Retrieve the supported zones set up for this service instance.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 Details
-
OMASServiceInstanceHandler
Constructor- Parameters:
serviceName
- a descriptive name for the OMAS
-
-
Method Details
-
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
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 publishZones 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 publishZones 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
Retrieve the exception handler that can package up common exceptions and pack them into a REST Response.- Returns:
- exception handler object
-