Class DisplayDataContainerHandler<SCHEMA_ATTRIBUTE,​SCHEMA_TYPE>


  • public class DisplayDataContainerHandler<SCHEMA_ATTRIBUTE,​SCHEMA_TYPE>
    extends ReferenceableHandler<B>
    DisplayDataContainerHandler manages the schemas for display data containers. It is build on the SchemaAttributeHandler. Its role is to maintain a simple interface. It automatically creates and links in the schema type information in the structure and keeps it linked together.
    • Constructor Detail

      • DisplayDataContainerHandler

        public DisplayDataContainerHandler​(OpenMetadataAPIGenericConverter<SCHEMA_ATTRIBUTE> dataContainerConverter,
                                           Class<SCHEMA_ATTRIBUTE> dataContainerClass,
                                           OpenMetadataAPIGenericConverter<SCHEMA_TYPE> schemaTypeConverter,
                                           Class<SCHEMA_TYPE> schemaTypeClass,
                                           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 relational data handler with information needed to work with assets and schemas.
        Parameters:
        dataContainerConverter - specific converter for the SCHEMA_ATTRIBUTE bean class
        dataContainerClass - name of bean class that is represented by the generic class SCHEMA_ATTRIBUTE
        schemaTypeConverter - specific converter for the SCHEMA_TYPE bean class
        schemaTypeClass - name of bean class that is represented by the generic class SCHEMA_TYPE
        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

      • createDataContainer

        public String createDataContainer​(String userId,
                                          String externalSourceGUID,
                                          String externalSourceName,
                                          String parentGUID,
                                          String qualifiedName,
                                          String displayName,
                                          String description,
                                          boolean isDeprecated,
                                          int elementPosition,
                                          int minCardinality,
                                          int maxCardinality,
                                          Map<String,​String> additionalProperties,
                                          String typeName,
                                          Map<String,​Object> extendedProperties,
                                          Map<String,​String> vendorProperties,
                                          Date effectiveTime,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Create a new metadata element to represent a data container.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        parentGUID - unique identifier of the data container's parent where the data container is located
        qualifiedName - unique name for the data container
        displayName - the stored display name property for the data container
        description - the stored description property associated with the data container
        isDeprecated - is this table deprecated?
        elementPosition - which order is the element when listing from parent's perspective
        maxCardinality - maximum number of instances of this element
        minCardinality - minimum number of instances of this element
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DisplayDataContainer - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the data container technology
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        unique identifier of the new metadata element for the data container
        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)
      • createDataContainerFromTemplate

        public String createDataContainerFromTemplate​(String userId,
                                                      String externalSourceGUID,
                                                      String externalSourceName,
                                                      String templateGUID,
                                                      String parentGUID,
                                                      String qualifiedName,
                                                      String displayName,
                                                      String description,
                                                      Date effectiveTime,
                                                      String methodName)
                                               throws InvalidParameterException,
                                                      UserNotAuthorizedException,
                                                      PropertyServerException
        Create a new metadata element to represent a data container using an existing metadata element as a template.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS - if null a local element is created
        externalSourceName - unique name of software server capability representing the DBMS
        templateGUID - unique identifier of the metadata element to copy
        parentGUID - unique identifier of the data container's parent where the data container is located.
        qualifiedName - unique name for the data container's parent
        displayName - the stored display name property for the data container
        description - the stored description property associated with the data container
        methodName - calling method
        Returns:
        unique identifier of the new data container's parent
        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)
      • updateDataContainer

        public void updateDataContainer​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String dataContainerGUID,
                                        String qualifiedName,
                                        String displayName,
                                        String description,
                                        boolean isDeprecated,
                                        Map<String,​String> additionalProperties,
                                        String typeName,
                                        Map<String,​Object> extendedProperties,
                                        Map<String,​String> vendorProperties,
                                        boolean isMergeUpdate,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Update the metadata element representing a data container.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        dataContainerGUID - unique identifier of the data container to update
        qualifiedName - unique name for the data container's parent
        displayName - the stored display name property for the data container
        description - the stored description property associated with the data container
        isDeprecated - is this table deprecated?
        additionalProperties - any arbitrary properties not part of the type system
        typeName - name of the type that is a subtype of DisplayDataContainer - or null to create standard type
        extendedProperties - properties from any subtype
        vendorProperties - additional properties relating to the source of the data container technology
        isMergeUpdate - are unspecified properties unchanged (true) or removed?
        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)
      • removeDataContainer

        public void removeDataContainer​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String dataContainerGUID,
                                        String dataContainerGUIDParameterName,
                                        String qualifiedName,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Remove the metadata element representing a data container.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        dataContainerGUID - unique identifier of the metadata element to remove
        dataContainerGUIDParameterName - name of parameter supplying dataContainerGUID
        qualifiedName - unique name of the metadata element to remove
        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)
      • findDataContainers

        public List<SCHEMA_ATTRIBUTE> findDataContainers​(String userId,
                                                         String searchString,
                                                         int startFrom,
                                                         int pageSize,
                                                         Date effectiveTime,
                                                         String methodName)
                                                  throws InvalidParameterException,
                                                         UserNotAuthorizedException,
                                                         PropertyServerException
        Retrieve the list of data container 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
        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)
      • getContainersForParent

        public List<SCHEMA_ATTRIBUTE> getContainersForParent​(String userId,
                                                             String parentGUID,
                                                             int startFrom,
                                                             int pageSize,
                                                             Date effectiveTime,
                                                             String methodName)
                                                      throws InvalidParameterException,
                                                             UserNotAuthorizedException,
                                                             PropertyServerException
        Retrieve the list of data containers associated with a data container's parent.
        Parameters:
        userId - calling user
        parentGUID - unique identifier of the data container's parent of interest
        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 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)
      • getDataContainersByName

        public List<SCHEMA_ATTRIBUTE> getDataContainersByName​(String userId,
                                                              String name,
                                                              int startFrom,
                                                              int pageSize,
                                                              Date effectiveTime,
                                                              String methodName)
                                                       throws InvalidParameterException,
                                                              UserNotAuthorizedException,
                                                              PropertyServerException
        Retrieve the list of data container 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
        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)
      • setupQueryTargetRelationship

        public void setupQueryTargetRelationship​(String userId,
                                                 String externalSourceGUID,
                                                 String externalSourceName,
                                                 String schemaElementGUID,
                                                 String schemaElementGUIDParameterName,
                                                 String schemaElementTypeName,
                                                 String queryId,
                                                 String query,
                                                 String queryTargetGUID,
                                                 String queryTargetGUIDParameterName,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Create a new query relationship for a derived schema element.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        schemaElementGUID - unique identifier of the schema element that this query supports
        schemaElementGUIDParameterName - parameter name for schemaElementGUID
        schemaElementTypeName - name of type for schema element
        queryId - identifier for the query - used as a placeholder in the formula (stored in the column's CalculatedValue classification)
        query - the query that is made on the targetGUID
        queryTargetGUID - the unique identifier of the target (this is a schema element - typically a schema attribute)
        queryTargetGUIDParameterName - parameter supplying queryTargetGUID
        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)
      • updateQueryTargetRelationship

        public void updateQueryTargetRelationship​(String userId,
                                                  String externalSourceGUID,
                                                  String externalSourceName,
                                                  String schemaElementGUID,
                                                  String schemaElementGUIDParameterName,
                                                  String schemaElementTypeName,
                                                  String queryId,
                                                  String query,
                                                  String queryTargetGUID,
                                                  String queryTargetGUIDParameterName,
                                                  String methodName)
                                           throws InvalidParameterException,
                                                  UserNotAuthorizedException,
                                                  PropertyServerException
        Update the query properties for a query relationship for a derived schema element.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        schemaElementGUID - unique identifier of the schema element that this query supports
        schemaElementGUIDParameterName - parameter name for schemaElementGUID
        schemaElementTypeName - name of type for schema element
        queryId - identifier for the query - used as a placeholder in the formula (stored in the column's CalculatedValue classification)
        query - the query that is made on the targetGUID
        queryTargetGUID - the unique identifier of the target (this is a schema element - typically a schema attribute)
        queryTargetGUIDParameterName - parameter supplying queryTargetGUID
        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)
      • clearQueryTargetRelationship

        public void clearQueryTargetRelationship​(String userId,
                                                 String externalSourceGUID,
                                                 String externalSourceName,
                                                 String schemaElementGUID,
                                                 String schemaElementGUIDParameterName,
                                                 String schemaElementTypeName,
                                                 String queryTargetGUID,
                                                 String queryTargetGUIDParameterName,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Update the query properties for a query relationship for a derived schema element.
        Parameters:
        userId - calling user
        externalSourceGUID - unique identifier of software server capability representing the DBMS
        externalSourceName - unique name of software server capability representing the DBMS
        schemaElementGUID - unique identifier of the schema element that this query supports
        schemaElementGUIDParameterName - parameter name for schemaElementGUID
        schemaElementTypeName - name of type for schema element
        queryTargetGUID - the unique identifier of the target (this is a schema element - typically a schema attribute)
        queryTargetGUIDParameterName - parameter supplying queryTargetGUID
        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)