Interface OMRSTypeDefManager
- All Known Implementing Classes:
OMRSRepositoryContentManager
public interface OMRSTypeDefManager
OMRSTypeDefManager provides maintenance methods for managing the TypeDefs in the local cache.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeTypeDef
(String sourceName, AttributeTypeDef newAttributeTypeDef) Cache a definition of a new AttributeTypeDef.void
addTypeDef
(String sourceName, TypeDef newTypeDef) Cache a definition of a new TypeDef.void
deleteAttributeTypeDef
(String sourceName, String obsoleteAttributeTypeDefGUID, String obsoleteAttributeTypeDefName) Delete a cached AttributeTypeDef.void
deleteTypeDef
(String sourceName, String obsoleteTypeDefGUID, String obsoleteTypeDefName) Delete a cached TypeDef.getEntityURL
(String sourceName, String guid) Return the URL string to use for direct access to the metadata instance.getInitialStatus
(String sourceName, String typeName, String methodName) Return the initial status set up for the instance.getInstanceType
(String sourceName, TypeDefCategory category, String typeName, String methodName) Return identifiers for the TypeDef that matches the supplied type name.getRelationshipURL
(String sourceName, String guid) Return the URL string to use for direct access to the metadata instance.boolean
isValidClassificationForEntity
(String sourceName, String classificationTypeName, String entityTypeName, String methodName) Return boolean indicating if a classification type can be applied to a specified entity.boolean
isValidTypeCategory
(String sourceName, TypeDefCategory category, String typeName, String methodName) Return a boolean indicating that the type name matches the category.void
reIdentifyAttributeTypeDef
(String sourceName, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, AttributeTypeDef newAttributeTypeDef) Change the identifiers for an AttributeTypeDef.void
reIdentifyTypeDef
(String sourceName, String originalTypeDefGUID, String originalTypeDefName, TypeDef newTypeDef) Change the identifiers for a TypeDef.void
updateTypeDef
(String sourceName, TypeDef typeDef) Update one or more properties of a cached TypeDef.
-
Method Details
-
addTypeDef
Cache a definition of a new TypeDef.- Parameters:
sourceName
- source of the request (used for logging)newTypeDef
- TypeDef structure describing the new TypeDef.
-
addAttributeTypeDef
Cache a definition of a new AttributeTypeDef.- Parameters:
sourceName
- source of the request (used for logging)newAttributeTypeDef
- AttributeTypeDef structure describing the new TypeDef.
-
updateTypeDef
Update one or more properties of a cached TypeDef.- Parameters:
sourceName
- source of the request (used for logging)typeDef
- TypeDef structure.
-
deleteTypeDef
Delete a cached TypeDef.- Parameters:
sourceName
- source of the request (used for logging)obsoleteTypeDefGUID
- String unique identifier for the TypeDef.obsoleteTypeDefName
- String unique name for the TypeDef.
-
deleteAttributeTypeDef
void deleteAttributeTypeDef(String sourceName, String obsoleteAttributeTypeDefGUID, String obsoleteAttributeTypeDefName) Delete a cached AttributeTypeDef.- Parameters:
sourceName
- source of the request (used for logging)obsoleteAttributeTypeDefGUID
- String unique identifier for the AttributeTypeDef.obsoleteAttributeTypeDefName
- String unique name for the AttributeTypeDef.
-
reIdentifyTypeDef
void reIdentifyTypeDef(String sourceName, String originalTypeDefGUID, String originalTypeDefName, TypeDef newTypeDef) Change the identifiers for a TypeDef.- Parameters:
sourceName
- source of the request (used for logging).originalTypeDefGUID
- TypeDef's original unique identifier.originalTypeDefName
- TypeDef's original unique name.newTypeDef
- updated TypeDef with new identifiers.
-
reIdentifyAttributeTypeDef
void reIdentifyAttributeTypeDef(String sourceName, String originalAttributeTypeDefGUID, String originalAttributeTypeDefName, AttributeTypeDef newAttributeTypeDef) Change the identifiers for an AttributeTypeDef.- Parameters:
sourceName
- source of the request (used for logging).originalAttributeTypeDefGUID
- AttributeTypeDef's original unique identifier.originalAttributeTypeDefName
- AttributeTypeDef's original unique name.newAttributeTypeDef
- updated AttributeTypeDef with new identifiers
-
isValidTypeCategory
boolean isValidTypeCategory(String sourceName, TypeDefCategory category, String typeName, String methodName) throws TypeErrorException Return a boolean indicating that the type name matches the category.- Parameters:
sourceName
- source of the request (used for logging)category
- TypeDefCategory enum value to testtypeName
- type name to testmethodName
- name of calling method.- Returns:
- boolean flag indicating that the type name is of the specified category
- Throws:
TypeErrorException
- the type name is not a recognized type or the category is incorrect or there is an error in the type definition (TypeDef) cached.
-
isValidClassificationForEntity
boolean isValidClassificationForEntity(String sourceName, String classificationTypeName, String entityTypeName, String methodName) throws TypeErrorException Return boolean indicating if a classification type can be applied to a specified entity. This uses the list of valid entity types located in the ClassificationDef.- Parameters:
sourceName
- source of the request (used for logging)classificationTypeName
- name of the classification's type (ClassificationDef)entityTypeName
- name of the entity's type (EntityDef)methodName
- name of calling method.- Returns:
- boolean indicating if the classification is valid for the entity.
- Throws:
TypeErrorException
- the type name is not a recognized type or the category is incorrect or there is an error in the type definition (TypeDef) cached.
-
getInstanceType
InstanceType getInstanceType(String sourceName, TypeDefCategory category, String typeName, String methodName) throws TypeErrorException Return identifiers for the TypeDef that matches the supplied type name. If the type name is not recognized, null is returned.- Parameters:
sourceName
- source of the request (used for logging)category
- category of typetypeName
- String type name the type name is not recognized or of the wrong category.methodName
- name of calling method.- Returns:
- InstanceType object containing TypeDef unique identifier (guid), typeDef name and version
- Throws:
TypeErrorException
- the type name is not a recognized type or the category is incorrect or there is an error in the type definition (TypeDef) cached.
-
getInitialStatus
InstanceStatus getInitialStatus(String sourceName, String typeName, String methodName) throws TypeErrorException Return the initial status set up for the instance.- Parameters:
sourceName
- source of the request (used for logging)typeName
- name of the type to extract the initial status from.methodName
- calling method- Returns:
- InstanceStatus enum
- Throws:
TypeErrorException
- the type name is not recognized.
-
getEntityURL
Return the URL string to use for direct access to the metadata instance.- Parameters:
sourceName
- source of the request (used for logging)guid
- unique identifier for the instance.- Returns:
- String URL with placeholder for variables such as userId.
-
getRelationshipURL
Return the URL string to use for direct access to the metadata instance.- Parameters:
sourceName
- source of the request (used for logging)guid
- unique identifier for the instance.- Returns:
- String URL with placeholder for variables such as userId.
-