Class CohortMemberConfigurationClient
java.lang.Object
org.odpi.openmetadata.adminservices.client.OMAGServerConfigurationClient
org.odpi.openmetadata.adminservices.client.CohortMemberConfigurationClient
- Direct Known Subclasses:
ConformanceTestServerConfigurationClient,MetadataAccessServerConfigurationClient,RepositoryProxyConfigurationClient
CohortMemberConfigurationClient provides the interfaces to add an OMAG Server to an Open Metadata Repository Cohort.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.adminservices.client.OMAGServerConfigurationClient
invalidParameterHandler, nullRequestBody, restClient, serverName, serverPlatformRootURL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCohortRegistration(String cohortName, Map<String, Object> additionalProperties) Enable registration of server to an open metadata repository cohort using the default topic structure (SINGLE_TOPIC).voidaddCohortRegistration(String cohortName, CohortTopicStructure cohortTopicStructure, Map<String, Object> additionalProperties) Enable registration of server to an open metadata repository cohort using the topic pattern specified by cohortTopicStructure.voidaddStartUpOpenMetadataArchiveFile(String fileName) Add a new open metadata archive file to load at startup.voidaddStartUpOpenMetadataArchiveList(List<Connection> connections) Add a list of connections to connectors that can access an open metadata archive file.voidclearCohortRegistration(String cohortName) Unregister this server from an open metadata repository cohort.voidRemove all configuration for a local repository.voidClear the list of open metadata archives for loading at server startup.getCohortTopicName(String cohortName) Retrieve the current topic name for the cohort.getDedicatedCohortTopicNames(String cohortName) Retrieve the current topic names for the three dedicated topics of the cohort.Return the local metadata collection id.Return the local metadata collection name.voidoverrideCohortTopicName(String cohortName, String topicName) Override the current topic name for the cohort.voidoverrideInstancesCohortTopicName(String cohortName, String topicName) Override the current topic name for the registration topic for the cohort.voidoverrideRegistrationCohortTopicName(String cohortName, String topicName) Override the current topic name for the registration topic for the cohort.voidoverrideTypesCohortTopicName(String cohortName, String topicName) Override the current topic name for the registration topic for the cohort.voidresetRemoteCohortURL(String serverURLRoot) Update the URL broadcast across the cohort to allow other members to issue queries to this repository.voidsetCohortConfig(String cohortName, CohortConfig cohortConfig) Set up the configuration properties for a cohort.voidsetLocalMetadataCollectionId(String metadataCollectionId) Set up the local metadata collection id.voidSet up the local metadata collection name.protected voidsetLocalRepositoryConfig(LocalRepositoryConfig localRepositoryConfig) Set up the configuration for the local repository in one operation.Methods inherited from class org.odpi.openmetadata.adminservices.client.OMAGServerConfigurationClient
addAuditLogDestination, addConsoleAuditLogDestination, addEventTopicAuditLogDestination, addEventTopicAuditLogDestination, addFileAuditLogDestination, addFileAuditLogDestination, addJDBCAuditLogDestination, addSLF4JAuditLogDestination, clearAuditLogDestination, clearAuditLogDestinations, clearOMAGServerConfig, clearServerSecurityConnection, deployOMAGServerConfig, getBasicServerProperties, getOMAGServerConfig, getOMAGServerInstanceConfig, getServerSecurityConnection, getServerTypeClassification, setAuditLogDestinations, setBasicServerProperties, setDefaultAuditLog, setEventBus, setMaxPageSize, setOMAGServerConfig, setOrganizationName, setServerDescription, setServerSecurityConnection, setServerType, setServerURLRoot, setServerUserId, updateAuditLogDestination
-
Constructor Details
-
CohortMemberConfigurationClient
public CohortMemberConfigurationClient(String serverName, String serverPlatformRootURL, String secretStoreProvider, String secretStoreLocation, String secretStoreCollection, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformRootURL- the network address of the server running the admin servicessecretStoreProvider- class name of the secrets storesecretStoreLocation- location (networkAddress) of the secrets storesecretStoreCollection- name of the collection of secrets to use to connect to the remote serverauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
addCohortRegistration
public void addCohortRegistration(String cohortName, Map<String, Object> additionalProperties) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionEnable registration of server to an open metadata repository cohort using the default topic structure (SINGLE_TOPIC). A cohort is a group of open metadata repositories that are sharing metadata. An OMAG server can connect to zero, one or more cohorts. Each cohort needs a unique name. The members of the cohort use a shared topic to exchange registration information and events related to changes in their supported metadata types and instances. They are also able to query each other's metadata directly through REST calls.- Parameters:
cohortName- name of the cohort.additionalProperties- additional properties for the event bus connection- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
addCohortRegistration
public void addCohortRegistration(String cohortName, CohortTopicStructure cohortTopicStructure, Map<String, Object> additionalProperties) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionEnable registration of server to an open metadata repository cohort using the topic pattern specified by cohortTopicStructure. A cohort is a group of open metadata repositories that are sharing metadata. An OMAG server can connect to zero, one or more cohorts. Each cohort needs a unique name. The members of the cohort use a shared topic to exchange registration information and events related to changes in their supported metadata types and instances. They are also able to query each other's metadata directly through REST calls.- Parameters:
cohortName- name of the cohortcohortTopicStructure- the style of cohort topic set up to useadditionalProperties- additional properties for the event bus connection- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this commandInvalidParameterException- invalid parameterOMAGConfigurationErrorException- unusual state in the admin server
-
getCohortTopicName
public String getCohortTopicName(String cohortName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Retrieve the current topic name for the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.- Returns:
- string topic name
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getDedicatedCohortTopicNames
public DedicatedTopicList getDedicatedCohortTopicNames(String cohortName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Retrieve the current topic names for the three dedicated topics of the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.- Returns:
- List of topic names - registration first, then types and then instances
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
overrideCohortTopicName
public void overrideCohortTopicName(String cohortName, String topicName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the current topic name for the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.topicName- new name for the topic.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
overrideRegistrationCohortTopicName
public void overrideRegistrationCohortTopicName(String cohortName, String topicName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the current topic name for the registration topic for the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.topicName- new name for the topic.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
overrideTypesCohortTopicName
public void overrideTypesCohortTopicName(String cohortName, String topicName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the current topic name for the registration topic for the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.topicName- new name for the topic.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
overrideInstancesCohortTopicName
public void overrideInstancesCohortTopicName(String cohortName, String topicName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Override the current topic name for the registration topic for the cohort. This call can only be made once the cohort is set up with addCohortRegistration().- Parameters:
cohortName- name of the cohort.topicName- new name for the topic.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setCohortConfig
public void setCohortConfig(String cohortName, CohortConfig cohortConfig) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Set up the configuration properties for a cohort. This may reconfigure an existing cohort or create a cohort. Use setCohortMode to delete a cohort.- Parameters:
cohortName- name of the cohortcohortConfig- configuration for the cohort- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearCohortRegistration
public void clearCohortRegistration(String cohortName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Unregister this server from an open metadata repository cohort.- Parameters:
cohortName- name of the cohort.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
addStartUpOpenMetadataArchiveFile
public void addStartUpOpenMetadataArchiveFile(String fileName) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Add a new open metadata archive file to load at startup.- Parameters:
fileName- name of the open metadata archive file.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
addStartUpOpenMetadataArchiveList
public void addStartUpOpenMetadataArchiveList(List<Connection> connections) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Add a list of connections to connectors that can access an open metadata archive file.- Parameters:
connections- list of connections to open metadata archive connectors- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearOpenMetadataArchives
public void clearOpenMetadataArchives() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionClear the list of open metadata archives for loading at server startup.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setLocalRepositoryConfig
protected void setLocalRepositoryConfig(LocalRepositoryConfig localRepositoryConfig) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Set up the configuration for the local repository in one operation. This overrides the current values.- Parameters:
localRepositoryConfig- - configuration properties for the local repository.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
clearLocalRepository
public void clearLocalRepository() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionRemove all configuration for a local repository. The default is no local repository. This call can be used to remove subsequent local repository configuration. This call effectively sets the type of a metadata server back to a metadata access point.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
resetRemoteCohortURL
public void resetRemoteCohortURL(String serverURLRoot) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Update the URL broadcast across the cohort to allow other members to issue queries to this repository. This method is needed to reconfigure a server that has moved from one platform to another. Once the URL is updated, and the server restarted, it will broadcast its new URL to the rest of the cohort.- Parameters:
serverURLRoot- String url.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getLocalMetadataCollectionName
public String getLocalMetadataCollectionName() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionReturn the local metadata collection name. If the local repository is not configured then the invalid parameter exception is returned.- Returns:
- string guid
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setLocalMetadataCollectionName
public void setLocalMetadataCollectionName(String name) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Set up the local metadata collection name. If a null is passed, the connection name is cleared to null. If this is not set then the default value is the local server name.- Parameters:
name- metadata collection name.- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
getLocalMetadataCollectionId
public String getLocalMetadataCollectionId() throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorExceptionReturn the local metadata collection id. If the local repository is not configured then the invalid parameter exception is returned.- Returns:
- string guid
- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-
setLocalMetadataCollectionId
public void setLocalMetadataCollectionId(String metadataCollectionId) throws UserNotAuthorizedException, InvalidParameterException, OMAGConfigurationErrorException Set up the local metadata collection id. If the local repository is not configured then the invalid parameter exception is returned.- Parameters:
metadataCollectionId- unique identifier for the metadata collection- Throws:
UserNotAuthorizedException- the supplied userId is not authorized to issue this command.InvalidParameterException- invalid parameter.OMAGConfigurationErrorException- unusual state in the admin server.
-