Class OMRSFixedTypeMetadataCollectionBase
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollectionBase
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSFixedTypeMetadataCollectionBase
- All Implemented Interfaces:
AuditLoggingComponent
OMRSFixedTypeMetadataCollectionBase provides a base class for an open metadata repository that
has a fixed type system. Its constructor requires the fixed list of types and attribute types
that its implementing repository supports. Once this is in place,
OMRSFixedTypeMetadataCollectionBase can support all the type management methods.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
auditLog, metadataCollectionId, metadataCollectionName, parentConnector, repositoryHelper, repositoryName, repositoryValidator
-
Constructor Summary
ConstructorsConstructorDescriptionOMRSFixedTypeMetadataCollectionBase
(OMRSRepositoryConnector parentConnector, String repositoryName, OMRSRepositoryHelper repositoryHelper, OMRSRepositoryValidator repositoryValidator, String metadataCollectionId, List<String> supportedAttributeTypeNames, List<String> supportedTypeNames) Constructor ensures the metadata collection is linked to its connector and knows its metadata collection id. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeTypeDef
(String userId, AttributeTypeDef newAttributeTypeDef) Create a definition of a new AttributeTypeDef.void
addTypeDef
(String userId, TypeDef newTypeDef) Create a definition of a new TypeDef.void
deleteAttributeTypeDef
(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) Delete an AttributeTypeDef.void
deleteTypeDef
(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) Delete the TypeDef.reIdentifyAttributeTypeDef
(String userId, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, String newAttributeTypeDefGUID, String newAttributeTypeDefName) Change the guid or name of an existing TypeDef to a new value.reIdentifyTypeDef
(String userId, String originalTypeDefGUID, String originalTypeDefName, String newTypeDefGUID, String newTypeDefName) Change the guid or name of an existing TypeDef to a new value.updateTypeDef
(String userId, TypeDefPatch typeDefPatch) Update one or more properties of the TypeDef.boolean
verifyAttributeTypeDef
(String userId, AttributeTypeDef attributeTypeDef) Verify that a definition of an AttributeTypeDef is either new or matches the definition already stored.boolean
verifyTypeDef
(String userId, TypeDef typeDef) Verify that a definition of a TypeDef is either new or matches the definition already stored.Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollectionBase
addEntity, addEntityParameterValidation, addEntityParameterValidation, addEntityProxy, addEntityProxyParameterValidation, addExternalEntity, addExternalEntityParameterValidation, addExternalRelationship, addExternalRelationshipParameterValidation, addRelationship, addRelationshipParameterValidation, addRelationshipParameterValidation, addTypeDefGallery, attributeTypeDefCategoryParameterValidation, attributeTypeDefParameterValidation, classifyEntity, classifyEntity, classifyEntityParameterValidation, classifyEntityParameterValidation, classifyEntityParameterValidation, declassifyEntity, declassifyEntityParameterValidation, declassifyEntityParameterValidation, declassifyEntityParameterValidation, deleteEntity, deleteEntityReferenceCopy, deleteRelationship, deleteRelationshipReferenceCopy, filterAttributeTypeDefsByCategory, filterAttributeTypeDefsByGUID, filterAttributeTypeDefsByName, filterTypeDefsByCategory, filterTypeDefsByGUID, filterTypeDefsByName, filterTypeDefsByProperty, filterTypeDefsBySearchCriteria, filterTypesByExternalID, filterTypesByWildCardName, findAttributeTypeDefsByCategory, findEntities, findEntitiesByClassification, findEntitiesByClassificationParameterValidation, findEntitiesByProperty, findEntitiesByPropertyParameterValidation, findEntitiesByPropertyValue, findEntitiesByPropertyValueParameterValidation, findEntitiesParameterValidation, findRelationships, findRelationshipsByProperty, findRelationshipsByPropertyParameterValidation, findRelationshipsByPropertyValue, findRelationshipsByPropertyValueParameterValidation, findRelationshipsParameterValidation, findTypeDefsByCategory, findTypeDefsByProperty, findTypesByExternalID, findTypesByName, getAllTypes, getAttributeTypeDefByGUID, getAttributeTypeDefByName, getEntityDetail, getEntityDetail, getEntityDetailHistory, getEntityNeighborhood, getEntityNeighborhoodParameterValidation, getEntityProxy, getEntitySummary, getHomeClassifications, getHomeClassifications, getInstanceHistoryParameterValidation, getInstanceParameterValidation, getInstanceParameterValidation, getLinkingEntities, getLinkingEntitiesParameterValidation, getMetadataCollectionId, getRelatedEntities, getRelatedEntitiesParameterValidation, getRelationship, getRelationship, getRelationshipHistory, getRelationshipsForEntity, getRelationshipsForEntityParameterValidation, getTypeDefByGUID, getTypeDefByName, getTypeDefForInstance, isEntityKnown, isRelationshipKnown, manageAttributeTypeDefParameterValidation, manageInstanceParameterValidation, manageInstanceParameterValidation, manageInstanceParameterValidation, manageReferenceInstanceParameterValidation, manageTypeDefParameterValidation, newAttributeTypeDefParameterValidation, newTypeDefParameterValidation, purgeClassificationReferenceCopy, purgeEntity, purgeEntityReferenceCopy, purgeEntityReferenceCopy, purgeRelationship, purgeRelationshipReferenceCopy, purgeRelationshipReferenceCopy, referenceInstanceParameterValidation, refreshEntityReferenceCopy, refreshRelationshipReferenceCopy, reHomeEntity, reHomeInstanceParameterValidation, reHomeRelationship, reIdentifyEntity, reIdentifyInstanceParameterValidation, reIdentifyRelationship, removeInstanceParameterValidation, reportEntityNotKnown, reportEntityProxyOnly, reportRelationshipNotKnown, reportTypeDefAlreadyDefined, reportTypeDefConflict, reportTypeDefInUse, reportTypeDefNotSupported, reportUnknownTypeGUID, reportUnknownTypeName, reportUnsupportedAsOfTimeFunction, restoreEntity, restoreRelationship, reTypeEntity, reTypeInstanceParameterValidation, reTypeRelationship, saveClassificationReferenceCopy, saveClassificationReferenceCopy, saveEntityReferenceCopy, saveRelationshipReferenceCopy, searchForTypeDefs, typeDefCategoryParameterValidation, typeDefExternalIDParameterValidation, typeDefParameterValidation, typeDefPropertyParameterValidation, typeDefSearchParameterValidation, typeGUIDParameterValidation, typeNameParameterValidation, undoEntityUpdate, undoRelationshipUpdate, updateEntityClassification, updateEntityClassificationParameterValidation, updateEntityClassificationParameterValidation, updateEntityProperties, updateEntityStatus, updateInstancePropertiesPropertyValidation, updateInstanceStatusParameterValidation, updateRelationshipProperties, updateRelationshipStatus, updateTypeDefParameterValidation
Methods inherited from class org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataCollection
basicRequestValidation, classifyEntity, classifyEntity, declassifyEntity, getConnectorComponentDescription, getMetadataCollectionId, purgeClassificationReferenceCopy, reHomeEntity, reHomeRelationship, reportUnsupportedOptionalFunction, saveInstanceReferenceCopies, setAuditLog, updateEntityClassification, validateRepositoryConnector
-
Constructor Details
-
OMRSFixedTypeMetadataCollectionBase
public OMRSFixedTypeMetadataCollectionBase(OMRSRepositoryConnector parentConnector, String repositoryName, OMRSRepositoryHelper repositoryHelper, OMRSRepositoryValidator repositoryValidator, String metadataCollectionId, List<String> supportedAttributeTypeNames, List<String> supportedTypeNames) 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 instancesrepositoryValidator
- validator class for checking open metadata repository objects and parameters.metadataCollectionId
- unique identifier of the metadata collection id.supportedAttributeTypeNames
- list of attribute type names supported by the implementing repositorysupportedTypeNames
- list of type names supported by the implementing repository
-
-
Method Details
-
verifyTypeDef
public boolean verifyTypeDef(String userId, TypeDef typeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefConflictException, InvalidTypeDefException, UserNotAuthorizedException Verify that a definition of a TypeDef is either new or matches the definition already stored.- Overrides:
verifyTypeDef
in classOMRSMetadataCollectionBase
- 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:
InvalidParameterException
- the TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
verifyAttributeTypeDef
public boolean verifyAttributeTypeDef(String userId, AttributeTypeDef attributeTypeDef) throws InvalidParameterException, RepositoryErrorException, TypeDefNotSupportedException, TypeDefConflictException, InvalidTypeDefException, UserNotAuthorizedException Verify that a definition of an AttributeTypeDef is either new or matches the definition already stored.- Overrides:
verifyAttributeTypeDef
in classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.attributeTypeDef
- TypeDef structure describing the TypeDef to test.- Returns:
- boolean where true means the TypeDef matches the local definition where false means the TypeDef is not known.
- Throws:
InvalidParameterException
- the TypeDef is null.RepositoryErrorException
- there is a problem communicating with the metadata repository where the metadata collection is stored.TypeDefNotSupportedException
- the repository is not able to support this TypeDef.TypeDefConflictException
- the new TypeDef conflicts with an existing TypeDef.InvalidTypeDefException
- the new TypeDef has invalid contents.UserNotAuthorizedException
- the userId is not permitted to perform this operation.
-
addTypeDef
Create a definition of a new TypeDef.- Overrides:
addTypeDef
in classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.newTypeDef
- TypeDef structure describing the new TypeDef.- Throws:
FunctionNotSupportedException
- the repository does not support this call.
-
addAttributeTypeDef
public void addAttributeTypeDef(String userId, AttributeTypeDef newAttributeTypeDef) throws FunctionNotSupportedException Create a definition of a new AttributeTypeDef.- Overrides:
addAttributeTypeDef
in classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.newAttributeTypeDef
- TypeDef structure describing the new TypeDef.- Throws:
FunctionNotSupportedException
- the repository does not support this call.
-
updateTypeDef
public TypeDef updateTypeDef(String userId, TypeDefPatch typeDefPatch) throws FunctionNotSupportedException 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 classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.typeDefPatch
- TypeDef patch describing change to TypeDef.- Returns:
- updated TypeDef
- Throws:
FunctionNotSupportedException
- the repository does not support this call.
-
deleteTypeDef
public void deleteTypeDef(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) throws FunctionNotSupportedException 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 classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.obsoleteTypeDefGUID
- String unique identifier for the TypeDef.obsoleteTypeDefName
- String unique name for the TypeDef.- Throws:
FunctionNotSupportedException
- the repository does not support this call.
-
deleteAttributeTypeDef
public void deleteAttributeTypeDef(String userId, String obsoleteTypeDefGUID, String obsoleteTypeDefName) throws FunctionNotSupportedException 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 classOMRSMetadataCollectionBase
- Parameters:
userId
- unique identifier for requesting user.obsoleteTypeDefGUID
- String unique identifier for the AttributeTypeDef.obsoleteTypeDefName
- String unique name for the AttributeTypeDef.- Throws:
FunctionNotSupportedException
- the repository does not support this call.
-
reIdentifyTypeDef
public TypeDef reIdentifyTypeDef(String userId, String originalTypeDefGUID, String originalTypeDefName, String newTypeDefGUID, String newTypeDefName) throws FunctionNotSupportedException 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 classOMRSMetadataCollectionBase
- 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:
FunctionNotSupportedException
- the repository does not support this call.
-
reIdentifyAttributeTypeDef
public AttributeTypeDef reIdentifyAttributeTypeDef(String userId, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, String newAttributeTypeDefGUID, String newAttributeTypeDefName) throws FunctionNotSupportedException 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 classOMRSMetadataCollectionBase
- 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:
FunctionNotSupportedException
- the repository does not support this call.
-