Class EventBrokerClient
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
org.odpi.openmetadata.accessservices.datamanager.client.EventBrokerClient
- All Implemented Interfaces:
EventBrokerInterface
,SchemaManagerInterface
EventBrokerClient is the client for managing topics from an Event Manager.
-
Constructor Summary
ConstructorDescriptionEventBrokerClient
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.EventBrokerClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.EventBrokerClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.EventBrokerClient
(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.EventBrokerClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptioncreateEventType
(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, EventTypeProperties properties) Create a new metadata element to represent a event type.createEventTypeFromTemplate
(String userId, String eventBrokerGUID, String eventBrokerName, String templateGUID, String topicGUID, TemplateProperties templateProperties) Create a new metadata element to represent a event type using an existing metadata element as a template.createTopic
(String userId, String eventBrokerGUID, String eventBrokerName, boolean eventBrokerIsHome, TopicProperties topicProperties) Create a new metadata element to represent a topic.createTopicFromTemplate
(String userId, String eventBrokerGUID, String eventBrokerName, boolean eventBrokerIsHome, String templateGUID, TemplateProperties templateProperties) Create a new metadata element to represent a topic using an existing metadata element as a template.findEventTypes
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of event type metadata elements that contain the search string.findTopics
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of topic metadata elements that contain the search string.getEventTypeByGUID
(String userId, String guid) Retrieve the event type metadata element with the supplied unique identifier.getEventTypesByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of event type metadata elements with a matching qualified or display name.getEventTypesForEventSet
(String userId, String eventSetGUID, int startFrom, int pageSize) Return the list of event types associated with an EventSet.getEventTypesForTopic
(String userId, String topicGUID, int startFrom, int pageSize) Return the list of event-types associated with a topic.getTopicByGUID
(String userId, String guid) Retrieve the topic metadata element with the supplied unique identifier.getTopicsByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of topic metadata elements with a matching qualified or display name.getTopicsForEventBroker
(String userId, String eventBrokerGUID, String eventBrokerName, int startFrom, int pageSize) Retrieve the list of topics created by this caller.void
publishTopic
(String userId, String topicGUID) Update the zones for the topic asset so that it becomes visible to consumers.void
removeEventType
(String userId, String eventBrokerGUID, String eventBrokerName, String eventTypeGUID, String qualifiedName) Remove the metadata element representing a event type.void
removeTopic
(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, String qualifiedName) Remove the metadata element representing a topic.void
updateEventType
(String userId, String eventBrokerGUID, String eventBrokerName, String eventTypeGUID, boolean isMergeUpdate, EventTypeProperties properties) Update the metadata element representing a event type.void
updateTopic
(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, boolean isMergeUpdate, TopicProperties topicProperties) Update the metadata element representing a topic.void
withdrawTopic
(String userId, String topicGUID) Update the zones for the topic asset so that it is no longer visible to consumers.Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
clearCalculatedValue, clearQueryTargetRelationship, clearSchemaElementRelationship, clearSchemaTypes, createEnumSchemaType, createLiteralSchemaType, createMapSchemaType, createPrimitiveSchemaType, createSchemaAttribute, createSchemaAttributeFromTemplate, createSchemaTypeChoice, createSchemaTypeFromTemplate, createStructSchemaType, findSchemaAttributes, findSchemaType, findValidValueSet, getNestedAttributes, getSchemaAttributeByGUID, getSchemaAttributesByName, getSchemaTypeByGUID, getSchemaTypeByName, getSchemaTypeForElement, getSchemaTypeParent, getValidValueSetByName, removeSchemaAttribute, removeSchemaType, setupCalculatedValue, setupQueryTargetRelationship, setupSchemaElementRelationship, setupSchemaType, updateQueryTargetRelationship, updateSchemaAttribute, updateSchemaType
Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
removeReferenceable
-
Constructor Details
-
EventBrokerClient
public EventBrokerClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
EventBrokerClient
public EventBrokerClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
EventBrokerClient
public EventBrokerClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
EventBrokerClient
public EventBrokerClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- client that issues the REST API callsmaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
EventBrokerClient
public EventBrokerClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createTopic
public String createTopic(String userId, String eventBrokerGUID, String eventBrokerName, boolean eventBrokerIsHome, TopicProperties topicProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a topic.- Specified by:
createTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokereventBrokerIsHome
- should the topic be marked as owned by the event broker so others can not update?topicProperties
- properties to store- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createTopicFromTemplate
public String createTopicFromTemplate(String userId, String eventBrokerGUID, String eventBrokerName, boolean eventBrokerIsHome, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a topic using an existing metadata element as a template.- Specified by:
createTopicFromTemplate
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokereventBrokerIsHome
- should the topic be marked as owned by the event broker so others can not update?templateGUID
- unique identifier of the metadata element to copytemplateProperties
- properties that override the template- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateTopic
public void updateTopic(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, boolean isMergeUpdate, TopicProperties topicProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a topic.- Specified by:
updateTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokertopicGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?topicProperties
- new properties for this element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
publishTopic
public void publishTopic(String userId, String topicGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the zones for the topic asset so that it becomes visible to consumers. (The zones are set to the list of zones in the publishedZones option configured for each instance of the Data Manager OMAS).- Specified by:
publishTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usertopicGUID
- unique identifier of the metadata element to publish- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
withdrawTopic
public void withdrawTopic(String userId, String topicGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the zones for the topic asset so that it is no longer visible to consumers. (The zones are set to the list of zones in the defaultZones option configured for each instance of the Data Manager OMAS. This is the setting when the topic is first created).- Specified by:
withdrawTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usertopicGUID
- unique identifier of the metadata element to withdraw- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeTopic
public void removeTopic(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a topic.- Specified by:
removeTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokertopicGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findTopics
public List<TopicElement> findTopics(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of topic metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findTopics
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getTopicsByName
public List<TopicElement> getTopicsByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of topic metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getTopicsByName
in interfaceEventBrokerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getTopicsForEventBroker
public List<TopicElement> getTopicsForEventBroker(String userId, String eventBrokerGUID, String eventBrokerName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of topics created by this caller.- Specified by:
getTopicsForEventBroker
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the topic manager (event broker)eventBrokerName
- unique name of software server capability representing the topic manager (event broker)startFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getTopicByGUID
public TopicElement getTopicByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the topic metadata element with the supplied unique identifier.- Specified by:
getTopicByGUID
in interfaceEventBrokerInterface
- Parameters:
userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- matching metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createEventType
public String createEventType(String userId, String eventBrokerGUID, String eventBrokerName, String topicGUID, EventTypeProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a event type.- Specified by:
createEventType
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokertopicGUID
- unique identifier of the topic where the event type is locatedproperties
- properties about the event type- Returns:
- unique identifier of the new event type
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
createEventTypeFromTemplate
public String createEventTypeFromTemplate(String userId, String eventBrokerGUID, String eventBrokerName, String templateGUID, String topicGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a event type using an existing metadata element as a template.- Specified by:
createEventTypeFromTemplate
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokertemplateGUID
- unique identifier of the metadata element to copytopicGUID
- unique identifier of the topic where the event type is locatedtemplateProperties
- properties that override the template- Returns:
- unique identifier of the new event type
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateEventType
public void updateEventType(String userId, String eventBrokerGUID, String eventBrokerName, String eventTypeGUID, boolean isMergeUpdate, EventTypeProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a event type.- Specified by:
updateEventType
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokereventTypeGUID
- unique identifier of the metadata element to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?properties
- new properties for the metadata element- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
removeEventType
public void removeEventType(String userId, String eventBrokerGUID, String eventBrokerName, String eventTypeGUID, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a event type.- Specified by:
removeEventType
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventBrokerGUID
- unique identifier of software server capability representing the event brokereventBrokerName
- unique name of software server capability representing the event brokereventTypeGUID
- unique identifier of the metadata element to removequalifiedName
- unique name of the metadata element to remove- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
findEventTypes
public List<EventTypeElement> findEventTypes(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of event type metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findEventTypes
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getEventTypesForEventSet
public List<EventTypeElement> getEventTypesForEventSet(String userId, String eventSetGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of event types associated with an EventSet. This is a collection of EventType definitions. These event types can be used as a template for adding the event types to a topic.- Specified by:
getEventTypesForEventSet
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usereventSetGUID
- unique identifier of the topic to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the event types associated with the requested EventSet
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getEventTypesForTopic
public List<EventTypeElement> getEventTypesForTopic(String userId, String topicGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of event-types associated with a topic.- Specified by:
getEventTypesForTopic
in interfaceEventBrokerInterface
- Parameters:
userId
- calling usertopicGUID
- unique identifier of the topic to querystartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of metadata elements describing the event-types associated with the requested topic
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getEventTypesByName
public List<EventTypeElement> getEventTypesByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of event type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getEventTypesByName
in interfaceEventBrokerInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getEventTypeByGUID
public EventTypeElement getEventTypeByGUID(String userId, String guid) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the event type metadata element with the supplied unique identifier.- Specified by:
getEventTypeByGUID
in interfaceEventBrokerInterface
- Parameters:
userId
- calling userguid
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-