Class EventTypeHandler<B>

  • Type Parameters:
    B - class that represents the event type

    public class EventTypeHandler<B>
    extends ReferenceableHandler<B>
    EventTypeHandler provides the exchange of metadata about EventType schema types between the repository and the OMAS.
    • Constructor Detail

      • EventTypeHandler

        public EventTypeHandler​(OpenMetadataAPIGenericConverter<B> converter,
                                Class<B> beanClass,
                                String serviceName,
                                String serverName,
                                InvalidParameterHandler invalidParameterHandler,
                                RepositoryHandler repositoryHandler,
                                OMRSRepositoryHelper repositoryHelper,
                                String localServerUserId,
                                OpenMetadataServerSecurityVerifier securityVerifier,
                                List<String> supportedZones,
                                List<String> defaultZones,
                                List<String> publishZones,
                                AuditLog auditLog)
        Construct the handler with information needed to work with B objects.
        Parameters:
        converter - specific converter for this bean class
        beanClass - name of bean class that is represented by the generic class B
        serviceName - name of this service
        serverName - name of the local server
        invalidParameterHandler - handler for managing parameter errors
        repositoryHandler - manages calls to the repository services
        repositoryHelper - provides utilities for manipulating the repository services objects
        localServerUserId - userId for this server
        securityVerifier - open metadata security services verifier
        supportedZones - list of zones that the access service is allowed to serve B instances from
        defaultZones - list of zones that the access service should set in all new B instances
        publishZones - list of zones that the access service sets up in published B instances
        auditLog - destination for audit log events
    • Method Detail

      • createEventType

        public String createEventType​(String userId,
                                      String externalSourceGUID,
                                      String externalSourceName,
                                      String topicGUID,
                                      String topicGUIDParameterName,
                                      String qualifiedName,
                                      String displayName,
                                      String description,
                                      String versionNumber,
                                      boolean isDeprecated,
                                      String author,
                                      String usage,
                                      String encodingStandard,
                                      String namespace,
                                      Map<String,​String> additionalProperties,
                                      String suppliedTypeName,
                                      Map<String,​Object> extendedProperties,
                                      String methodName)
                               throws InvalidParameterException,
                                      UserNotAuthorizedException,
                                      PropertyServerException
        Create the event type object.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        topicGUID - unique identifier of the owning topic
        topicGUIDParameterName - parameter supplying topicGUID
        qualifiedName - unique name for the event type - used in other configuration
        displayName - short display name for the event type
        description - description of the event type
        versionNumber - version of the schema type.
        isDeprecated - is the schema type deprecated
        author - name of the author
        usage - guidance on how the schema should be used.
        encodingStandard - format of the schema
        namespace - namespace where the schema is defined.
        additionalProperties - additional properties for a event type
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a event type subtype
        methodName - calling method
        Returns:
        unique identifier of the new event type object
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • createEventTypeFromTemplate

        public String createEventTypeFromTemplate​(String userId,
                                                  String externalSourceGUID,
                                                  String externalSourceName,
                                                  String topicGUID,
                                                  String topicGUIDParameterName,
                                                  String templateGUID,
                                                  String qualifiedName,
                                                  String displayName,
                                                  String description,
                                                  String methodName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Create a event type from a template.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        topicGUID - unique identifier of the owning topic
        topicGUIDParameterName - parameter supplying topicGUID
        templateGUID - unique identifier of the metadata element to copy
        qualifiedName - unique name for the event type - used in other configuration
        displayName - short display name for the event type
        description - description of the event type
        methodName - calling method
        Returns:
        unique identifier of the new metadata element
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • updateEventType

        public void updateEventType​(String userId,
                                    String externalSourceGUID,
                                    String externalSourceName,
                                    String eventTypeGUID,
                                    String eventTypeGUIDParameterName,
                                    String qualifiedName,
                                    String displayName,
                                    String description,
                                    String versionNumber,
                                    boolean isDeprecated,
                                    String author,
                                    String usage,
                                    String encodingStandard,
                                    String namespace,
                                    Map<String,​String> additionalProperties,
                                    String suppliedTypeName,
                                    Map<String,​Object> extendedProperties,
                                    boolean isMergeUpdate,
                                    String methodName)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Update the event type.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        eventTypeGUID - unique identifier for the event type to update
        eventTypeGUIDParameterName - parameter supplying the event type
        qualifiedName - unique name for the event type - used in other configuration
        displayName - short display name for the event type
        description - description of the governance event type
        versionNumber - version of the schema type.
        isDeprecated - is the schema type deprecated
        author - name of the author
        usage - guidance on how the schema should be used.
        encodingStandard - format of the schema.
        namespace - namespace where the schema is defined.
        additionalProperties - additional properties for an event type
        suppliedTypeName - type of term
        extendedProperties - properties for a governance event type subtype
        isMergeUpdate - are unspecified properties unchanged (true) or removed?
        methodName - calling method
        Throws:
        InvalidParameterException - qualifiedName or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • removeEventType

        public void removeEventType​(String userId,
                                    String externalSourceGUID,
                                    String externalSourceName,
                                    String eventTypeGUID,
                                    String eventTypeGUIDParameterName,
                                    String qualifiedName,
                                    String methodName)
                             throws InvalidParameterException,
                                    UserNotAuthorizedException,
                                    PropertyServerException
        Remove the metadata element representing a event types.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the caller
        externalSourceName - unique name of software server capability representing the caller
        eventTypeGUID - unique identifier of the metadata element to remove
        eventTypeGUIDParameterName - parameter for eventTypeGUID
        qualifiedName - validating property
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • findEventTypes

        public List<B> findEventTypes​(String userId,
                                      String searchString,
                                      String searchStringParameterName,
                                      int startFrom,
                                      int pageSize,
                                      Date effectiveTime,
                                      String methodName)
                               throws InvalidParameterException,
                                      UserNotAuthorizedException,
                                      PropertyServerException
        Retrieve the list of event types metadata elements that contain the search string. The search string is treated as a regular expression.
        Parameters:
        userId - calling user
        searchString - string to find in the properties
        searchStringParameterName - name of parameter supplying the search string
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • getEventTypesForEventSet

        public List<B> getEventTypesForEventSet​(String userId,
                                                String eventSetGUID,
                                                String eventSetGUIDParameterName,
                                                int startFrom,
                                                int pageSize,
                                                Date effectiveTime,
                                                String methodName)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Return the list of the event types defined in an event set (collection).
        Parameters:
        userId - calling user
        eventSetGUID - unique identifier of the event set to query
        eventSetGUIDParameterName - name of the parameter supplying eventSetGUID
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of metadata elements describing the event types associated with the requested event set
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)
      • getEventTypesByName

        public List<B> getEventTypesByName​(String userId,
                                           String name,
                                           String nameParameterName,
                                           int startFrom,
                                           int pageSize,
                                           Date effectiveTime,
                                           String methodName)
                                    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.
        Parameters:
        userId - calling user
        name - name to search for
        nameParameterName - parameter supplying name
        startFrom - paging start point
        pageSize - maximum results that can be returned
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of matching metadata elements
        Throws:
        InvalidParameterException - one of the parameters is invalid
        UserNotAuthorizedException - the user is not authorized to issue this request
        PropertyServerException - there is a problem reported in the open metadata server(s)