Class OMRSDynamicTypeMetadataCollectionBase

    • Constructor Detail

      • OMRSDynamicTypeMetadataCollectionBase

        public OMRSDynamicTypeMetadataCollectionBase​(OMRSRepositoryConnector parentConnector,
                                                     java.lang.String repositoryName,
                                                     OMRSRepositoryHelper repositoryHelper,
                                                     OMRSRepositoryValidator repositoryValidator,
                                                     java.lang.String metadataCollectionId)
        Constructor ensures the metadata collection is linked to its connector and knows its metadata collection Id.
        Parameters:
        parentConnector - connector that this metadata collection supports. The connector has the information to call the metadata repository.
        repositoryName - name of this repository.
        repositoryHelper - helper class for building types and instances
        repositoryValidator - validator class for checking open metadata repository objects and parameters.
        metadataCollectionId - unique identifier of the metadata collection Id.
    • Method Detail

      • addTypeDef

        public void addTypeDef​(java.lang.String userId,
                               org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef newTypeDef)
                        throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                               org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                               org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefKnownException,
                               org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException,
                               org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException,
                               org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Create a definition of a new TypeDef.
        Overrides:
        addTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        newTypeDef - TypeDef structure describing the new TypeDef.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the new TypeDef is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefKnownException - the TypeDef is already stored in the repository.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException - the new TypeDef conflicts with an existing TypeDef.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException - the new TypeDef has invalid contents.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • addAttributeTypeDef

        public void addAttributeTypeDef​(java.lang.String userId,
                                        org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef newAttributeTypeDef)
                                 throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefKnownException,
                                        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException,
                                        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException,
                                        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Create a definition of a new AttributeTypeDef.
        Overrides:
        addAttributeTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        newAttributeTypeDef - TypeDef structure describing the new TypeDef.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the new TypeDef is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefKnownException - the TypeDef is already stored in the repository.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException - the new TypeDef conflicts with an existing TypeDef.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException - the new TypeDef has invalid contents.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • verifyTypeDef

        public boolean verifyTypeDef​(java.lang.String userId,
                                     org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
                              throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                     org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                     org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException,
                                     org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException,
                                     org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Verify that a definition of a TypeDef is either new - or matches the definition already stored.
        Overrides:
        verifyTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        typeDef - TypeDef structure describing the TypeDef to test.
        Returns:
        boolean - true means the TypeDef matches the local definition - false means the TypeDef is not known.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the TypeDef is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException - the new TypeDef conflicts with an existing TypeDef.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException - the new TypeDef has invalid contents.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • verifyAttributeTypeDef

        public boolean verifyAttributeTypeDef​(java.lang.String userId,
                                              org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef attributeTypeDef)
                                       throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                              org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                              org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException,
                                              org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException,
                                              org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Verify that a definition of an AttributeTypeDef is either new - or matches the definition already stored.
        Overrides:
        verifyAttributeTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        attributeTypeDef - TypeDef structure describing the TypeDef to test.
        Returns:
        boolean - true means the TypeDef matches the local definition - false means the TypeDef is not known.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the TypeDef is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefConflictException - the new TypeDef conflicts with an existing TypeDef.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidTypeDefException - the new TypeDef has invalid contents.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • updateTypeDef

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef updateTypeDef​(java.lang.String userId,
                                                                                                                                            org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch typeDefPatch)
                                                                                                                                     throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                                                                                                            org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                                                                                                                            org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException,
                                                                                                                                            org.odpi.openmetadata.repositoryservices.ffdc.exception.PatchErrorException
        Update one or more properties of the TypeDef. The TypeDefPatch controls what types of updates are safe to make to the TypeDef.
        Overrides:
        updateTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        typeDefPatch - TypeDef patch describing change to TypeDef.
        Returns:
        updated TypeDef
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the TypeDefPatch is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException - the requested TypeDef is not found in the metadata collection.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.PatchErrorException - the TypeDef can not be updated because the supplied patch is incompatible with the stored TypeDef.
      • deleteTypeDef

        public void deleteTypeDef​(java.lang.String userId,
                                  java.lang.String obsoleteTypeDefGUID,
                                  java.lang.String obsoleteTypeDefName)
                           throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException,
                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefInUseException,
                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Delete the TypeDef. This is only possible if the TypeDef has never been used to create instances or any instances of this TypeDef have been purged from the metadata collection.
        Overrides:
        deleteTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        obsoleteTypeDefGUID - String unique identifier for the TypeDef.
        obsoleteTypeDefName - String unique name for the TypeDef.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the one of TypeDef identifiers is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException - the requested TypeDef is not found in the metadata collection.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefInUseException - the TypeDef can not be deleted because there are instances of this type in the the metadata collection. These instances need to be purged before the TypeDef can be deleted.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • deleteAttributeTypeDef

        public void deleteAttributeTypeDef​(java.lang.String userId,
                                           java.lang.String obsoleteTypeDefGUID,
                                           java.lang.String obsoleteTypeDefName)
                                    throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                           org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                           org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException,
                                           org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefInUseException,
                                           org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Delete an AttributeTypeDef. This is only possible if the AttributeTypeDef has never been used to create instances or any instances of this AttributeTypeDef have been purged from the metadata collection.
        Overrides:
        deleteAttributeTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        obsoleteTypeDefGUID - String unique identifier for the AttributeTypeDef.
        obsoleteTypeDefName - String unique name for the AttributeTypeDef.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the one of AttributeTypeDef identifiers is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException - the requested AttributeTypeDef is not found in the metadata collection.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefInUseException - the AttributeTypeDef can not be deleted because there are instances of this type in the the metadata collection. These instances need to be purged before the AttributeTypeDef can be deleted.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • reIdentifyTypeDef

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef reIdentifyTypeDef​(java.lang.String userId,
                                                                                                                                                java.lang.String originalTypeDefGUID,
                                                                                                                                                java.lang.String originalTypeDefName,
                                                                                                                                                java.lang.String newTypeDefGUID,
                                                                                                                                                java.lang.String newTypeDefName)
                                                                                                                                         throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                                                                                                                org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                                                                                                                                org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException,
                                                                                                                                                org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Change the guid or name of an existing TypeDef to a new value. This is used if two different TypeDefs are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.
        Overrides:
        reIdentifyTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        originalTypeDefGUID - the original guid of the TypeDef.
        originalTypeDefName - the original name of the TypeDef.
        newTypeDefGUID - the new identifier for the TypeDef.
        newTypeDefName - new name for this TypeDef.
        Returns:
        typeDef - new values for this TypeDef, including the new guid/name.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - one of the parameters is invalid or null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException - the TypeDef identified by the original guid/name is not found in the metadata collection.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • reIdentifyAttributeTypeDef

        public org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.AttributeTypeDef reIdentifyAttributeTypeDef​(java.lang.String userId,
                                                                                                                                                                  java.lang.String originalAttributeTypeDefGUID,
                                                                                                                                                                  java.lang.String originalAttributeTypeDefName,
                                                                                                                                                                  java.lang.String newAttributeTypeDefGUID,
                                                                                                                                                                  java.lang.String newAttributeTypeDefName)
                                                                                                                                                           throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                                                                                                                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                                                                                                                                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException,
                                                                                                                                                                  org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException
        Change the guid or name of an existing TypeDef to a new value. This is used if two different TypeDefs are discovered to have the same guid. This is extremely unlikely but not impossible so the open metadata protocol has provision for this.
        Overrides:
        reIdentifyAttributeTypeDef in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        originalAttributeTypeDefGUID - the original guid of the AttributeTypeDef.
        originalAttributeTypeDefName - the original name of the AttributeTypeDef.
        newAttributeTypeDefGUID - the new identifier for the AttributeTypeDef.
        newAttributeTypeDefName - new name for this AttributeTypeDef.
        Returns:
        attributeTypeDef - new values for this AttributeTypeDef, including the new guid/name.
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - one of the parameters is invalid or null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.TypeDefNotKnownException - the AttributeTypeDef identified by the original guid/name is not found in the metadata collection.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - the userId is not permitted to perform this operation.
      • getHomeClassifications

        public java.util.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification> getHomeClassifications​(java.lang.String userId,
                                                                                                                                                                             java.lang.String entityGUID)
                                                                                                                                                                      throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException
        Retrieve any locally homed classifications assigned to the requested entity. This method is implemented by repository connectors that are able to store classifications for entities that are homed in another repository.
        Overrides:
        getHomeClassifications in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        entityGUID - unique identifier of the entity with classifications to retrieve
        Returns:
        list of all the classifications for this entity that are homed in this repository
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the entity is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException - the entity is not recognized by this repository
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - to calling user is not authorized to retrieve this metadata
        org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException - this method is not supported
      • getHomeClassifications

        public java.util.List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification> getHomeClassifications​(java.lang.String userId,
                                                                                                                                                                             java.lang.String entityGUID,
                                                                                                                                                                             java.util.Date asOfTime)
                                                                                                                                                                      throws org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException,
                                                                                                                                                                             org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException
        Retrieve any locally homed classifications assigned to the requested entity. This method is implemented by repository connectors that are able to store classifications for entities that are homed in another repository.
        Overrides:
        getHomeClassifications in class OMRSMetadataCollectionBase
        Parameters:
        userId - unique identifier for requesting user.
        entityGUID - unique identifier of the entity with classifications to retrieve
        asOfTime - the time used to determine which version of the entity that is desired.
        Returns:
        list of all the classifications for this entity that are homed in this repository
        Throws:
        org.odpi.openmetadata.repositoryservices.ffdc.exception.InvalidParameterException - the entity is null.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.RepositoryErrorException - there is a problem communicating with the metadata repository where the metadata collection is stored.
        org.odpi.openmetadata.repositoryservices.ffdc.exception.EntityNotKnownException - the entity is not recognized by this repository
        org.odpi.openmetadata.repositoryservices.ffdc.exception.UserNotAuthorizedException - to calling user is not authorized to retrieve this metadata
        org.odpi.openmetadata.repositoryservices.ffdc.exception.FunctionNotSupportedException - this method is not supported