Class GlossaryTermHandler<B>

  • Type Parameters:
    B - class for the glossary term bean

    public class GlossaryTermHandler<B>
    extends ReferenceableHandler<B>
    GlossaryTermHandler retrieves Glossary Term objects from the property server. It runs server-side and retrieves Glossary Term entities through the OMRSRepositoryConnector.
    • Constructor Detail

      • GlossaryTermHandler

        public GlossaryTermHandler​(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 discovery engine configuration handler caching the objects needed to operate within a single server instance.
        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 Asset instances from.
        defaultZones - list of zones that the access service should set in all new Asset instances.
        publishZones - list of zones that the access service sets up in published Asset instances.
        auditLog - destination for audit log events.
    • Method Detail

      • createGlossaryTerm

        public String createGlossaryTerm​(String userId,
                                         String glossaryGUID,
                                         String glossaryGUIDParameterName,
                                         String qualifiedName,
                                         String displayName,
                                         String summary,
                                         String description,
                                         String examples,
                                         String abbreviation,
                                         String usage,
                                         Map<String,​String> additionalProperties,
                                         String suppliedTypeName,
                                         Map<String,​Object> extendedProperties,
                                         InstanceStatus initialStatus,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Create a new metadata element to represent a glossary term (or a subtype).
        Parameters:
        userId - calling user
        glossaryGUID - unique identifier of the owning glossary
        glossaryGUIDParameterName - parameter supplying glossaryGUID
        qualifiedName - unique name for the category - used in other configuration
        displayName - display name for the term
        summary - short description
        description - description of the term
        examples - examples of this term
        abbreviation - abbreviation used for the term
        usage - illustrations of how the term is used
        additionalProperties - additional properties for a term
        suppliedTypeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a term subtype
        initialStatus - glossary term status to use when the object is created
        methodName - calling method
        Returns:
        unique identifier of the new metadata element for the glossary term
        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)
      • createGlossaryTermFromTemplate

        public String createGlossaryTermFromTemplate​(String userId,
                                                     String templateGUID,
                                                     String qualifiedName,
                                                     String displayName,
                                                     String description,
                                                     String methodName)
                                              throws InvalidParameterException,
                                                     UserNotAuthorizedException,
                                                     PropertyServerException
        Create a new metadata element to represent a glossary term using an existing metadata element as a template.
        Parameters:
        userId - calling user
        templateGUID - unique identifier of the metadata element to copy
        qualifiedName - unique name for the term - used in other configuration
        displayName - short display name for the term
        description - description of the term
        methodName - calling method
        Returns:
        unique identifier of the new metadata element for the glossary term
        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)
      • updateGlossaryTerm

        public void updateGlossaryTerm​(String userId,
                                       String glossaryTermGUID,
                                       String glossaryTermGUIDParameterName,
                                       String qualifiedName,
                                       String displayName,
                                       String summary,
                                       String description,
                                       String examples,
                                       String abbreviation,
                                       String usage,
                                       Map<String,​String> additionalProperties,
                                       String typeName,
                                       Map<String,​Object> extendedProperties,
                                       String methodName)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Update the properties of the metadata element representing a glossary term.
        Parameters:
        userId - calling user
        glossaryTermGUID - unique identifier of the glossary term to update
        glossaryTermGUIDParameterName - parameter supplying glossaryGUID
        qualifiedName - unique name for the category - used in other configuration
        displayName - short display name for the term
        summary - string text
        description - description of the term
        examples - string text
        abbreviation - string text
        usage - string text
        additionalProperties - additional properties for a term
        typeName - type name from the caller (enables creation of subtypes)
        extendedProperties - properties for a term subtype
        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)
      • updateGlossaryTermStatus

        public void updateGlossaryTermStatus​(String userId,
                                             String glossaryTermGUID,
                                             String glossaryTermGUIDParameterName,
                                             InstanceStatus glossaryTermStatus,
                                             String glossaryTermStatusParameterName,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Update the status of the metadata element representing a glossary term. This is only valid on a controlled glossary term.
        Parameters:
        userId - calling user
        glossaryTermGUID - unique identifier of the glossary term to update
        glossaryTermGUIDParameterName - parameter name for glossaryTermGUID
        glossaryTermStatus - new status value for the glossary term
        glossaryTermStatusParameterName - parameter name for the status value
        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)
      • setupTermCategory

        public void setupTermCategory​(String userId,
                                      String glossaryCategoryGUID,
                                      String glossaryCategoryGUIDParameterName,
                                      String glossaryTermGUID,
                                      String glossaryTermGUIDParameterName,
                                      String description,
                                      int relationshipStatus,
                                      String methodName)
                               throws InvalidParameterException,
                                      UserNotAuthorizedException,
                                      PropertyServerException
        Link a term to a category.
        Parameters:
        userId - calling user
        glossaryCategoryGUID - unique identifier of the glossary category
        glossaryCategoryGUIDParameterName - parameter supplying glossaryCategoryGUID
        glossaryTermGUID - unique identifier of the glossary term
        glossaryTermGUIDParameterName - parameter supplying glossaryTermGUID
        description - description of the categorization
        relationshipStatus - ordinal for the relationship status enum
        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)
      • setupTermRelationship

        public void setupTermRelationship​(String userId,
                                          String glossaryTermOneGUID,
                                          String glossaryTermOneGUIDParameterName,
                                          String relationshipTypeName,
                                          String relationshipTypeParameterName,
                                          String glossaryTermTwoGUID,
                                          String glossaryTermTwoGUIDParameterName,
                                          String expression,
                                          String description,
                                          int relationshipStatus,
                                          String steward,
                                          String source,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Link two terms together using a specialist relationship.
        Parameters:
        userId - calling user
        glossaryTermOneGUID - unique identifier of the glossary term at end 1
        glossaryTermOneGUIDParameterName - parameter supplying glossaryTermOneGUID
        relationshipTypeName - name of the type of relationship to create
        relationshipTypeParameterName - name of parameter passing the relationship
        glossaryTermTwoGUID - unique identifier of the glossary term at end 2
        glossaryTermTwoGUIDParameterName - parameter supplying glossaryTermTwoGUID
        description - description of the relationship
        expression - expression that describes the relationship
        relationshipStatus - ordinal for the relationship status enum (draft, active, deprecated, obsolete, other)
        steward - user id or name of steward id who assigned the relationship (or approved the discovered value).
        source - id of the source of the knowledge of the relationship
        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)
      • updateTermRelationship

        public void updateTermRelationship​(String userId,
                                           String glossaryTermOneGUID,
                                           String glossaryTermOneGUIDParameterName,
                                           String relationshipTypeName,
                                           String relationshipTypeParameterName,
                                           String glossaryTermTwoGUID,
                                           String glossaryTermTwoGUIDParameterName,
                                           String expression,
                                           String description,
                                           int relationshipStatus,
                                           String steward,
                                           String source,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Update the relationship properties for the two terms.
        Parameters:
        userId - calling user
        glossaryTermOneGUID - unique identifier of the glossary term at end 1
        glossaryTermOneGUIDParameterName - parameter supplying glossaryTermOneGUID
        relationshipTypeName - name of the type of relationship to create
        relationshipTypeParameterName - name of parameter passing the relationship
        glossaryTermTwoGUID - unique identifier of the glossary term at end 2
        glossaryTermTwoGUIDParameterName - parameter supplying glossaryTermTwoGUID
        description - description of the relationship
        expression - expression that describes the relationship
        relationshipStatus - ordinal for the relationship status enum (draft, active, deprecated, obsolete, other)
        steward - user id or name of steward id who assigned the relationship (or approved the discovered value).
        source - id of the source of the knowledge of the relationship
        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)
      • clearTermRelationship

        public void clearTermRelationship​(String userId,
                                          String glossaryTermOneGUID,
                                          String glossaryTermOneGUIDParameterName,
                                          String relationshipTypeName,
                                          String relationshipTypeParameterName,
                                          String glossaryTermTwoGUID,
                                          String glossaryTermTwoGUIDParameterName,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Remove the relationship between two terms.
        Parameters:
        userId - calling user
        glossaryTermOneGUID - unique identifier of the glossary term at end 1
        glossaryTermOneGUIDParameterName - parameter supplying glossaryTermOneGUID
        relationshipTypeName - name of the type of relationship to create
        relationshipTypeParameterName - name of parameter passing the relationship
        glossaryTermTwoGUID - unique identifier of the glossary term at end 2
        glossaryTermTwoGUIDParameterName - parameter supplying glossaryTermTwoGUID
        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)
      • getTermsByName

        public List<B> getTermsByName​(String userId,
                                      String name,
                                      String nameParameterName,
                                      int startFrom,
                                      int pageSize,
                                      String methodName)
                               throws InvalidParameterException,
                                      PropertyServerException,
                                      UserNotAuthorizedException
        Returns the glossary term object corresponding to the supplied term name.
        Parameters:
        userId - String - userId of user making request.
        name - this may be the qualifiedName or displayName of the term.
        nameParameterName - property that provided the name
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        methodName - calling method
        Returns:
        List of glossary terms retrieved from property server
        Throws:
        InvalidParameterException - one of the parameters is null or invalid.
        PropertyServerException - there is a problem retrieving information from the property (metadata) server.
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • findTerms

        public List<B> findTerms​(String userId,
                                 String name,
                                 String nameParameterName,
                                 int startFrom,
                                 int pageSize,
                                 String methodName)
                          throws InvalidParameterException,
                                 PropertyServerException,
                                 UserNotAuthorizedException
        Returns the glossary term object containing the supplied term name. This may include wildcard characters
        Parameters:
        userId - String - userId of user making request.
        name - this may be the qualifiedName or displayName of the term
        nameParameterName - property that provided the name - interpreted as a to be a regular expression
        startFrom - index of the list to start from (0 for start)
        pageSize - maximum number of elements to return.
        methodName - calling method
        Returns:
        List of glossary terms retrieved from property server
        Throws:
        InvalidParameterException - one of the parameters is null or invalid.
        PropertyServerException - there is a problem retrieving information from the property (metadata) server.
        UserNotAuthorizedException - the requesting user is not authorized to issue this request.
      • getTermsForGlossaryCategory

        public List<B> getTermsForGlossaryCategory​(String userId,
                                                   String glossaryCategoryGUID,
                                                   String glossaryCategoryGUIDParameterName,
                                                   int startFrom,
                                                   int pageSize,
                                                   String methodName)
                                            throws InvalidParameterException,
                                                   UserNotAuthorizedException,
                                                   PropertyServerException
        Retrieve the list of glossary terms associated with a glossary category.
        Parameters:
        userId - calling user
        glossaryCategoryGUID - unique identifier of the glossary category of interest
        glossaryCategoryGUIDParameterName - property supplying the glossaryCategoryGUID
        startFrom - paging start point
        pageSize - maximum results that can be returned
        methodName - calling method
        Returns:
        list of associated 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)
      • getAttachedMeanings

        public List<B> getAttachedMeanings​(String userId,
                                           String elementGUID,
                                           String elementGUIDParameterName,
                                           String elementTypeName,
                                           List<String> serviceSupportedZones,
                                           int startingFrom,
                                           int pageSize,
                                           String methodName)
                                    throws InvalidParameterException,
                                           PropertyServerException,
                                           UserNotAuthorizedException
        Return the glossary terms attached to a supplied entity through the semantic assignment.
        Parameters:
        userId - calling user
        elementGUID - identifier for the entity that the feedback is attached to
        elementGUIDParameterName - name of parameter supplying the GUID
        elementTypeName - name of the type of object being attached to
        serviceSupportedZones - supported zones for calling service
        startingFrom - where to start from in the list
        pageSize - maximum number of results that can be returned
        methodName - calling method
        Returns:
        list of objects or null if none found
        Throws:
        InvalidParameterException - the input properties are invalid
        UserNotAuthorizedException - user not authorized to issue this request
        PropertyServerException - problem accessing the property server