Class ITInfrastructureOMASConverter<B>

  • Direct Known Subclasses:
    ConnectionConverter, ConnectorTypeConverter, EndpointConverter

    public class ITInfrastructureOMASConverter<B>
    extends OpenMetadataAPIGenericConverter<B>
    DataManagerOMASConverter provides the generic methods for the Data Manager beans converters. Generic classes have limited knowledge of the classes these are working on and this means creating a new instance of a class from within a generic is a little involved. This class provides the generic method for creating and initializing a Data Manager bean.
    • Constructor Detail

      • ITInfrastructureOMASConverter

        public ITInfrastructureOMASConverter​(OMRSRepositoryHelper repositoryHelper,
                                             String serviceName,
                                             String serverName)
        Constructor
        Parameters:
        repositoryHelper - helper object to parse entity
        serviceName - name of this component
        serverName - name of this server
    • Method Detail

      • getMetadataElementHeader

        public ElementHeader getMetadataElementHeader​(Class<B> beanClass,
                                                      InstanceHeader header,
                                                      String methodName)
                                               throws PropertyServerException
        Extract the properties from the entity or relationship.
        Parameters:
        beanClass - name of the class to create
        header - header from the entity containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getElementStub

        public ElementStub getElementStub​(Class<B> beanClass,
                                          EntityProxy entityProxy,
                                          String methodName)
                                   throws PropertyServerException
        Extract the properties from the entity.
        Parameters:
        beanClass - name of the class to create
        entityProxy - entityProxy from the relationship containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getElementStub

        public ElementStub getElementStub​(Class<B> beanClass,
                                          EntityDetail entity,
                                          String methodName)
                                   throws PropertyServerException
        Extract the properties from the entity.
        Parameters:
        beanClass - name of the class to create
        entity - entity containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getElementStub

        public ElementStub getElementStub​(Class<B> beanClass,
                                          Relationship relationship,
                                          String methodName)
                                   throws PropertyServerException
        Extract the properties from the relationship.
        Parameters:
        beanClass - name of the class to create
        relationship - relationship containing the properties
        methodName - calling method
        Returns:
        filled out element header
        Throws:
        PropertyServerException - there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
      • getEntityClassification

        public Classification getEntityClassification​(String classificationName,
                                                      EntityDetail entity)
        Extract the requested classification from the entity.
        Parameters:
        entity - entity containing the classifications
        Returns:
        list of bean classifications
      • getClassification

        protected ElementClassification getClassification​(String classificationName,
                                                          List<ElementClassification> beanClassifications)
        Retrieve a specific named classification.
        Parameters:
        classificationName - name of classification
        beanClassifications - list of classifications retrieved from the repositories
        Returns:
        null or the requested classification
      • removeClassification

        protected List<ElementClassification> removeClassification​(String classificationName,
                                                                   List<ElementClassification> beanClassifications)
        Remove the requested classification from the bean classifications and return the resulting list.
        Parameters:
        classificationName - name of the classification
        beanClassifications - list of classifications retrieved from the repositories
        Returns:
        null or a list of classifications