public abstract class AccessServiceAdmin extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultZonesPropertyName |
protected String |
karmaPointIncrementPropertyName |
protected String |
karmaPointPlateauPropertyName |
protected String |
publishZonesPropertyName |
protected String |
supportedZonesPropertyName |
| Constructor and Description |
|---|
AccessServiceAdmin() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
extractDefaultZones(Map<String,Object> accessServiceOptions,
String accessServiceFullName,
AuditLog auditLog)
Extract the default zones property from the access services option.
|
protected int |
extractKarmaPointIncrement(Map<String,Object> accessServiceOptions,
String accessServiceFullName,
AuditLog auditLog)
Extract the karma point plateau property from the access services option.
|
protected int |
extractKarmaPointPlateau(Map<String,Object> accessServiceOptions,
String accessServiceFullName,
AuditLog auditLog)
Extract the karma point plateau property from the access services option.
|
protected List<String> |
extractPublishZones(Map<String,Object> accessServiceOptions,
String accessServiceFullName,
AuditLog auditLog)
Extract the publish zones property from the access services option.
|
protected List<String> |
extractSupportedZones(Map<String,Object> accessServiceOptions,
String accessServiceFullName,
AuditLog auditLog)
Extract the supported zones property from the access services option.
|
protected OpenMetadataTopicConnector |
getInTopicEventBusConnector(Connection inTopicConnection,
String accessServiceFullName,
AuditLog parentAuditLog)
Create the connector for this access services' In Topic.
|
protected Connection |
getOutTopicConnection(Connection outTopicEventBusConnection,
String accessServiceFullName,
String accessServiceConnectorProviderClassName,
AuditLog auditLog)
Create the connector for this access services' Out Topic.
|
protected OpenMetadataTopicConnector |
getOutTopicEventBusConnector(Connection outTopicEventBusConnection,
String accessServiceName,
AuditLog parentAuditLog)
Create the event bus connector for this access services' Out Topic.
|
<T> T |
getTopicConnector(Connection topicConnection,
Class<T> topicConnectorClass,
AuditLog auditLog,
String accessServiceFullName,
String methodName)
Create an instance of an open metadata topic connector using the supplied connection.
|
protected String |
getTopicName(Connection connection)
Return the name of the topic extracted from the endpoint of the topic's Connection.
|
void |
initialize(AccessServiceConfig accessServiceConfigurationProperties,
OMRSTopicConnector enterpriseOMRSTopicConnector,
OMRSRepositoryConnector enterpriseOMRSRepositoryConnector,
AuditLog auditLog,
String serverUserName)
Initialize the access service.
|
void |
initialize(AccessServiceConfig accessServiceConfigurationProperties,
OMRSTopicConnector enterpriseOMRSTopicConnector,
OMRSRepositoryConnector enterpriseOMRSRepositoryConnector,
OMRSAuditLog auditLog,
String serverUserName)
Deprecated.
|
protected void |
registerWithEnterpriseTopic(String accessServiceFullName,
String serverName,
OMRSTopicConnector omrsTopicConnector,
OMRSTopicListener omrsTopicListener,
AuditLog auditLog)
Register a listener with the enterprise topic connector.
|
abstract void |
shutdown()
Shutdown the access service.
|
protected void |
throwUnexpectedInitializationException(String actionDescription,
String fullAccessServiceName,
Throwable error)
Log that an unexpected exception was received during start up.
|
protected String supportedZonesPropertyName
protected String defaultZonesPropertyName
protected String publishZonesPropertyName
protected String karmaPointPlateauPropertyName
protected String karmaPointIncrementPropertyName
@Deprecated public void initialize(AccessServiceConfig accessServiceConfigurationProperties, OMRSTopicConnector enterpriseOMRSTopicConnector, OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, OMRSAuditLog auditLog, String serverUserName) throws OMAGConfigurationErrorException
accessServiceConfigurationProperties - specific configuration properties for this access service.enterpriseOMRSTopicConnector - connector for receiving OMRS Events from the cohortsenterpriseOMRSRepositoryConnector - connector for querying the cohort repositoriesauditLog - audit log component for logging messages.serverUserName - user id to use on OMRS calls where there is no end user.OMAGConfigurationErrorException - invalid parameters in the configuration properties.public void initialize(AccessServiceConfig accessServiceConfigurationProperties, OMRSTopicConnector enterpriseOMRSTopicConnector, OMRSRepositoryConnector enterpriseOMRSRepositoryConnector, AuditLog auditLog, String serverUserName) throws OMAGConfigurationErrorException
accessServiceConfigurationProperties - specific configuration properties for this access service.enterpriseOMRSTopicConnector - connector for receiving OMRS Events from the cohortsenterpriseOMRSRepositoryConnector - connector for querying the cohort repositoriesauditLog - audit log component for logging messages.serverUserName - user id to use on OMRS calls where there is no end user.OMAGConfigurationErrorException - invalid parameters in the configuration properties.public abstract void shutdown()
protected List<String> extractSupportedZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceOptions - options passed to the access service.accessServiceFullName - name of calling serviceauditLog - audit log for error messagesOMAGConfigurationErrorException - the supported zones property is not a list of zone names.protected List<String> extractPublishZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceOptions - options passed to the access service.accessServiceFullName - name of calling serviceauditLog - audit log for error messagesOMAGConfigurationErrorException - the supported zones property is not a list of zone names.protected List<String> extractDefaultZones(Map<String,Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceOptions - options passed to the access service.accessServiceFullName - name of calling serviceauditLog - audit log for error messagesOMAGConfigurationErrorException - the supported zones property is not a list of zone names.protected int extractKarmaPointIncrement(Map<String,Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceOptions - options passed to the access service.accessServiceFullName - name of calling serviceauditLog - audit log for error messagesOMAGConfigurationErrorException - the supported zones property is not a list of zone names.protected int extractKarmaPointPlateau(Map<String,Object> accessServiceOptions, String accessServiceFullName, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceOptions - options passed to the access service.accessServiceFullName - name of calling serviceauditLog - audit log for error messagesOMAGConfigurationErrorException - the supported zones property is not a list of zone names.protected void registerWithEnterpriseTopic(String accessServiceFullName, String serverName, OMRSTopicConnector omrsTopicConnector, OMRSTopicListener omrsTopicListener, AuditLog auditLog) throws OMAGConfigurationErrorException
accessServiceFullName - name of calling access serviceserverName - name of OMAG Server instanceomrsTopicConnector - topic connector to register withomrsTopicListener - listener to registerauditLog - audit log to record messagesOMAGConfigurationErrorException - problem with topic connectionprotected String getTopicName(Connection connection)
connection - connection objectprotected OpenMetadataTopicConnector getInTopicEventBusConnector(Connection inTopicConnection, String accessServiceFullName, AuditLog parentAuditLog) throws OMAGConfigurationErrorException
inTopicConnection - connection from the configuration propertiesaccessServiceFullName - name of the calling access serviceparentAuditLog - audit log from the admin componentOMAGConfigurationErrorException - problem creating connectorprotected OpenMetadataTopicConnector getOutTopicEventBusConnector(Connection outTopicEventBusConnection, String accessServiceName, AuditLog parentAuditLog) throws OMAGConfigurationErrorException
outTopicEventBusConnection - connection from the configuration properties - the event busaccessServiceName - name of the calling access serviceparentAuditLog - audit log from the admin componentOMAGConfigurationErrorException - problem creating connectorprotected Connection getOutTopicConnection(Connection outTopicEventBusConnection, String accessServiceFullName, String accessServiceConnectorProviderClassName, AuditLog auditLog) throws OMAGConfigurationErrorException
outTopicEventBusConnection - connection from the configuration properties - the event busaccessServiceFullName - name of the calling access serviceaccessServiceConnectorProviderClassName - class name of connector providerauditLog - audit log from the admin componentOMAGConfigurationErrorException - problem creating connectorprotected void throwUnexpectedInitializationException(String actionDescription, String fullAccessServiceName, Throwable error) throws OMAGConfigurationErrorException
actionDescription - calling methodfullAccessServiceName - name of the access serviceerror - exception that was caughtOMAGConfigurationErrorException - wrapped exceptionpublic <T> T getTopicConnector(Connection topicConnection, Class<T> topicConnectorClass, AuditLog auditLog, String accessServiceFullName, String methodName) throws OMAGConfigurationErrorException
T - type nametopicConnection - connection needed to create the connectortopicConnectorClass - class to cast toaccessServiceFullName - name of the calling access serviceauditLog - audit log for this connectormethodName - calling methodOMAGConfigurationErrorException - problem creating connectorCopyright © 2018–2020 ODPi. All rights reserved.