Class OMRSRepositoryServicesInstanceHandler
java.lang.Object
org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
org.odpi.openmetadata.repositoryservices.rest.services.OMRSRepositoryServicesInstanceHandler
OMRSRepositoryServicesInstanceHandler provides the mapping for inbound REST requests to the appropriate instances
for the requested server. The map is maintained in a static, so it is scoped to the class loader.
Instances of this class call the synchronized static methods to work with the map.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
platformInstanceMap, serviceName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAuditLog
(String userId, String serverName, String serviceOperationName) Return the audit log or null (if the instance is not available).getInstance
(String userId, String serverName, String serviceOperationName) Get the object containing the properties for this server.void
removeInstance
(String serverName) Remove the instance for this server.Methods inherited from class org.odpi.openmetadata.commonservices.multitenant.OMAGServerServiceInstanceHandler
getServerSecurityVerifier, getServerServiceInstance, getServiceName, isServerActive, removeServerServiceInstance
-
Constructor Details
-
OMRSRepositoryServicesInstanceHandler
Constructor- Parameters:
serviceName
- name of this service for error logging
-
-
Method Details
-
getInstance
public OMRSRepositoryServicesInstance getInstance(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, RepositoryErrorException Get the object containing the properties for this server.- Parameters:
userId
- calling userserverName
- name of this serverserviceOperationName
- name of the REST API call (typically the top-level methodName)- Returns:
- specific service instance
- Throws:
InvalidParameterException
- the server name is not knownUserNotAuthorizedException
- the user is not authorized to issue the request.RepositoryErrorException
- the service name is not known - indicating a logic error
-
getAuditLog
public AuditLog getAuditLog(String userId, String serverName, String serviceOperationName) throws InvalidParameterException, UserNotAuthorizedException, RepositoryErrorException Return the audit log or null (if the instance is not available).- Parameters:
userId
- calling userserverName
- requested serverserviceOperationName
- name of the REST API call (typically the top-level methodName)- Returns:
- audit log or null
- Throws:
InvalidParameterException
- the server name is not knownUserNotAuthorizedException
- the user is not authorized to issue the request.RepositoryErrorException
- the service name is not know - indicating a logic error
-
removeInstance
Remove the instance for this server.- Parameters:
serverName
- name of the server
-