Class EventBrokerRESTServices

java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.server.EventBrokerRESTServices

public class EventBrokerRESTServices extends Object
EventBrokerRESTServices is the server-side implementation of the Data Manager OMAS's support for topics. It matches the EventBrokerClient.
  • Constructor Details

    • EventBrokerRESTServices

      public EventBrokerRESTServices()
      Default constructor
  • Method Details

    • createTopic

      public GUIDResponse createTopic(String serverName, String userId, boolean eventBrokerIsHome, TopicRequestBody requestBody)
      Create a new metadata element to represent a topic.
      Parameters:
      serverName - name of the server to route the request to.
      userId - calling user
      eventBrokerIsHome - should the topic be marked as owned by the event broker so others can not update?
      requestBody - properties to store
      Returns:
      unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • createTopicFromTemplate

      public GUIDResponse createTopicFromTemplate(String serverName, String userId, String templateGUID, boolean eventBrokerIsHome, TemplateRequestBody requestBody)
      Create a new metadata element to represent a topic using an existing metadata element as a template.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      templateGUID - unique identifier of the metadata element to copy
      eventBrokerIsHome - should the topic be marked as owned by the event broker so others can not update?
      requestBody - properties that override the template
      Returns:
      unique identifier of the new metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • updateTopic

      public VoidResponse updateTopic(String serverName, String userId, String topicGUID, boolean isMergeUpdate, TopicRequestBody requestBody)
      Update the metadata element representing a topic.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the metadata element to update
      isMergeUpdate - should the new properties be merged with the existing properties of overlay them?
      requestBody - new properties for this element
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • publishTopic

      public VoidResponse publishTopic(String serverName, String userId, String topicGUID, NullRequestBody nullRequestBody)
      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).
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the metadata element to publish
      nullRequestBody - empty request body
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • withdrawTopic

      public VoidResponse withdrawTopic(String serverName, String userId, String topicGUID, NullRequestBody nullRequestBody)
      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).
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the metadata element to withdraw
      nullRequestBody - empty request body
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • removeTopic

      public VoidResponse removeTopic(String serverName, String userId, String topicGUID, String qualifiedName, MetadataSourceRequestBody requestBody)
      Remove the metadata element representing a topic.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the metadata element to remove
      qualifiedName - unique name of the metadata element to remove
      requestBody - external source identifiers
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • findTopics

      public TopicsResponse findTopics(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of topic metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getTopicsByName

      public TopicsResponse getTopicsByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of topic metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getTopicsForEventBroker

      public TopicsResponse getTopicsForEventBroker(String serverName, String userId, String eventBrokerGUID, String eventBrokerName, int startFrom, int pageSize)
      Retrieve the list of topics created by this caller.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      eventBrokerGUID - unique identifier of software server capability representing the event broker
      eventBrokerName - unique name of software server capability representing the event broker
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getTopicByGUID

      public TopicResponse getTopicByGUID(String serverName, String userId, String guid)
      Retrieve the topic metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      guid - unique identifier of the requested metadata element
      Returns:
      matching metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • createEventType

      public GUIDResponse createEventType(String serverName, String userId, String topicGUID, EventTypeRequestBody requestBody)
      Create a new metadata element to represent a event type.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the topic where the schema is located
      requestBody - properties about the event type
      Returns:
      unique identifier of the new event type or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • createEventTypeFromTemplate

      public GUIDResponse createEventTypeFromTemplate(String serverName, String userId, String templateGUID, String topicGUID, TemplateRequestBody requestBody)
      Create a new metadata element to represent an event type using an existing metadata element as a template.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      templateGUID - unique identifier of the metadata element to copy
      topicGUID - unique identifier of the topic where the schema is located
      requestBody - properties that override the template
      Returns:
      unique identifier of the new event type or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • updateEventType

      public VoidResponse updateEventType(String serverName, String userId, String eventTypeGUID, boolean isMergeUpdate, EventTypeRequestBody requestBody)
      Update the metadata element representing an event type.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      eventTypeGUID - unique identifier of the metadata element to update
      isMergeUpdate - are unspecified properties unchanged (true) or removed?
      requestBody - new properties for the metadata element
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • removeEventType

      public VoidResponse removeEventType(String serverName, String userId, String eventTypeGUID, String qualifiedName, MetadataSourceRequestBody requestBody)
      Remove the metadata element representing an event type.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      eventTypeGUID - unique identifier of the metadata element to remove
      qualifiedName - unique name of the metadata element to remove
      requestBody - external source identifiers
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • findEventTypes

      public EventTypesResponse findEventTypes(String serverName, String userId, SearchStringRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of event type metadata elements that contain the search string. The search string is treated as a regular expression.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - string to find in the properties
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getEventTypesForEventSet

      public EventTypesResponse getEventTypesForEventSet(String serverName, String userId, String topicGUID, int startFrom, int pageSize)
      Return the list of event types associated with a EventType Set.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the topic to query
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of metadata elements describing the schemas associated with the requested topic or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getEventTypesForTopic

      public EventTypesResponse getEventTypesForTopic(String serverName, String userId, String topicGUID, int startFrom, int pageSize)
      Return the list of schemas associated with a topic.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      topicGUID - unique identifier of the topic to query
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of metadata elements describing the schemas associated with the requested topic or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getEventTypesByName

      public EventTypesResponse getEventTypesByName(String serverName, String userId, NameRequestBody requestBody, int startFrom, int pageSize)
      Retrieve the list of event type metadata elements with a matching qualified or display name. There are no wildcards supported on this request.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      requestBody - name to search for
      startFrom - paging start point
      pageSize - maximum results that can be returned
      Returns:
      list of matching metadata elements or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)
    • getEventTypeByGUID

      public EventTypeResponse getEventTypeByGUID(String serverName, String userId, String guid)
      Retrieve the event type metadata element with the supplied unique identifier.
      Parameters:
      serverName - name of the service to route the request to.
      userId - calling user
      guid - unique identifier of the requested metadata element
      Returns:
      requested metadata element or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to issue this request or PropertyServerException there is a problem reported in the open metadata server(s)