Class OpenMetadataAPIGenericConverter<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter<B>
- Direct Known Subclasses:
OMFConverter,OpenMetadataAPIDummyBeanConverter
OpenMetadataAPIGenericConverter provides the generic methods for the bean converters used to provide translation between
specific Open Metadata API beans and the repository services API beans.
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 an Open Metadata API bean.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final PropertyHelperprotected OMRSRepositoryHelperprotected Stringprotected String -
Constructor Summary
ConstructorsConstructorDescriptionOpenMetadataAPIGenericConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor captures the initial content -
Method Summary
Modifier and TypeMethodDescriptionvoidfillElementControlHeader(ElementControlHeader elementControlHeader, InstanceAuditHeader header) Fill an omf control header from the information in a repository services element header.getArguments(InstanceProperties instanceProperties) Extract the "arguments" property from the supplied instance properties.getAttachedClassifications(List<Classification> entityClassifications) Extract the classifications from the entity.protected StringgetAttributeName(InstanceProperties instanceProperties) Extract the "attributeName" property from the supplied instance properties.protected InstancePropertiesgetClassificationProperties(String classificationName, List<Classification> entityClassifications) Extract the properties for the requested classification from the list of classifications.protected InstancePropertiesgetClassificationProperties(String classificationName, EntityDetail entity) Extract the properties for the requested classification from the entity.protected StringgetConditions(InstanceProperties instanceProperties) Extract the "conditions" property from the supplied instance properties.protected StringgetDescription(InstanceProperties instanceProperties) Extract the description property from the supplied instance properties.protected StringgetDisplayName(InstanceProperties instanceProperties) Extract the displayName property from the supplied instance properties.protected ElementOriginCategorygetElementOriginCategory(InstanceProvenanceType instanceProvenanceType) Translate the repository services' InstanceProvenanceType to an ElementOrigin.protected ElementStatusgetElementStatus(InstanceStatus instanceStatus) Translate the repository services' InstanceStatus to an ElementStatus.getElementStub(Class<B> beanClass, EntityProxy entityProxy, String methodName) Extract the properties from the entity.getElementType(InstanceAuditHeader instanceHeader) Convert information from a repository instance into an Open Metadata Framework ElementType.protected ElementVersionsExtract detail of the version of the element and the user's maintaining it.protected ElementHeadergetMetadataElementHeader(Class<B> beanClass, EntityDetail entity, String methodName) Extract the properties from the entity.getMetadataElementHeader(Class<B> beanClass, InstanceHeader header, List<Classification> entityClassifications, String methodName) Extract the properties from the entity.getNewBean(Class<B> beanClass, EntityDetail entity, String methodName) Using the supplied entity, return a new instance of the bean.getNewBean(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) Using the supplied instances, return a new instance of the bean.getNewComplexBean(Class<B> beanClass, EntityDetail primaryEntity, List<Relationship> relationships, String methodName) Using the supplied instances, return a new instance of the bean.getNewComplexGraphBean(Class<B> beanClass, EntityDetail primaryEntity, List<EntityDetail> supplementaryEntities, List<Relationship> relationships, String methodName) Using the supplied instances, return a new instance of the bean.getNewComplexRelatedEntityBean(Class<B> beanClass, EntityDetail primaryEntity, Relationship relationship, List<RelatedEntity> relatedEntities, String methodName) Using the supplied instances, return a new instance of the bean.getNewRelationshipBean(Class<B> beanClass, Relationship relationship, String methodName) Using the supplied relationship, return a new instance of the bean.<T> BgetNewSchemaAttributeBean(Class<B> beanClass, EntityDetail schemaAttributeEntity, Class<T> typeClass, T schemaType, List<Relationship> schemaAttributeRelationships, String methodName) Extract the properties from the schema attribute entity.getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, B externalSchemaType, B mapFromSchemaType, B mapToSchemaType, List<B> schemaTypeOptions, String methodName) Return the converted bean.getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, String externalSchemaTypeGUID, B externalSchemaType, String mapFromSchemaTypeGUID, B mapFromSchemaType, String mapToSchemaTypeGUID, B mapToSchemaType, List<String> schemaTypeOptionGUIDs, List<B> schemaTypeOptions, List<Relationship> queryTargets, String methodName) Return the converted bean.protected intgetPosition(InstanceProperties instanceProperties) Extract the position property from the supplied instance properties.protected StringgetQualifiedName(InstanceProperties instanceProperties) Extract the qualifiedName property from the supplied instance properties.getRemainingExtendedProperties(InstanceProperties instanceProperties) Convert the remaining properties into a map that is returned as the extended properties.protected voidhandleBadEntity(String beanClassName, EntityDetail entity, String methodName) Throw an exception to indicate that a retrieved entity has missing information.protected voidhandleBadRelationship(String beanClassName, Relationship relationship, String methodName) Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.protected voidhandleInvalidBeanClass(String beanClassName, Exception error, String methodName) Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.protected voidhandleMissingMetadataInstance(String beanClassName, TypeDefCategory typeDefCategory, String methodName) Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.protected voidhandleUnexpectedBeanClass(String beanClassName, String expectedBeanClass, String methodName) Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.mapElementProperties(InstanceProperties instanceProperties) Fill out the properties for the omf Open Metadata Element bean with values from an OMRS entity.protected PrimitiveTypeCategorymapPrimitiveDefCategory(PrimitiveDefCategory primitiveDefCategory) Convert OMRS value in omf value.protected StringremoveActionTargetName(InstanceProperties instanceProperties) Extract and delete the actionTargetName property from the supplied instance properties.removeAdditionalProperties(InstanceProperties instanceProperties) Extract and delete the qualifiedName property from the supplied instance properties.protected StringremoveCapabilityType(InstanceProperties instanceProperties) Extract and delete the type property from the supplied instance properties.protected StringremoveCapabilityVersion(InstanceProperties instanceProperties) Extract and delete the capabilityVersion property from the supplied instance properties.protected StringremoveClearPassword(InstanceProperties instanceProperties) Extract and delete the clear password property from the supplied instance properties.protected DateremoveCompletionDate(InstanceProperties instanceProperties) Extract and delete the completionDate property from the supplied instance properties.removeCompletionGuards(InstanceProperties instanceProperties) Extract and delete the completionGuards property from the supplied instance properties.protected StringremoveCompletionMessage(InstanceProperties instanceProperties) Extract and delete the completionMessage property from the supplied instance properties.removeConfigurationProperties(InstanceProperties instanceProperties) Extract and delete the configuration properties property from the supplied instance properties.protected StringremoveConnectorFrameworkName(InstanceProperties instanceProperties) Extract and delete the connector framework name property from the supplied instance properties.protected StringremoveConnectorInterfaceLanguage(InstanceProperties instanceProperties) Extract and delete the connector interface language property from the supplied instance properties.removeConnectorInterfaces(InstanceProperties instanceProperties) Extract and delete the connector interfaces property from the supplied instance properties.protected StringremoveConnectorProviderClassName(InstanceProperties instanceProperties) Extract and delete the connector provider class name property from the supplied instance properties.protected StringremoveDescription(InstanceProperties instanceProperties) Extract and delete the description property from the supplied instance properties.protected StringremoveDisplayName(InstanceProperties instanceProperties) Extract and delete the displayName property from the supplied instance properties.protected intremoveDomainIdentifier(InstanceProperties instanceProperties) Extract and delete the domain identifier property from the supplied instance properties.protected StringremoveEncryptedPassword(InstanceProperties instanceProperties) Extract and delete the encrypted password property from the supplied instance properties.protected StringremoveEncryptionMethod(InstanceProperties instanceProperties) Extract and delete the encryption method property from the supplied instance properties.protected StringremoveExecutorEngineGUID(InstanceProperties instanceProperties) Extract and delete the executorEngineGUID property from the supplied instance properties.protected StringremoveExecutorEngineName(InstanceProperties instanceProperties) Extract and delete the executorEngineName property from the supplied instance properties.protected StringremoveExpectedDataFormat(InstanceProperties instanceProperties) Extract and delete the expected data format property from the supplied instance properties.protected StringremoveFormula(InstanceProperties instanceProperties) Extract and delete the formula property from the supplied instance properties.protected StringremoveFormulaType(InstanceProperties instanceProperties) Extract and delete the formulaType property from the supplied instance properties.protected StringremoveGovernanceActionTypeGUID(InstanceProperties instanceProperties) Extract and delete the governanceActionTypeGUID property from the supplied instance properties.protected StringremoveGovernanceActionTypeName(InstanceProperties instanceProperties) Extract and delete the governanceActionTypeName property from the supplied instance properties.protected StringremoveGuard(InstanceProperties instanceProperties) Extract and delete the guard property from the supplied instance properties.protected booleanremoveIgnoreMultipleTriggers(InstanceProperties instanceProperties) Extract and delete the ignoreMultipleTriggers property from the supplied instance properties.protected booleanremoveMandatoryGuard(InstanceProperties instanceProperties) Extract and delete the mandatoryGuard property from the supplied instance properties.removeMandatoryGuards(InstanceProperties instanceProperties) Extract and delete the mandatoryGuards property from the supplied instance properties.protected StringremoveName(InstanceProperties instanceProperties) Extract and delete the name property from the supplied instance properties.protected StringremoveNetworkAddress(InstanceProperties instanceProperties) Extract and delete the networkAddress property from the supplied instance properties.protected StringremovePatchLevel(InstanceProperties instanceProperties) Extract and delete the patchLevel property from the supplied instance properties.protected DateremoveProcessEndTime(InstanceProperties instanceProperties) Extract and delete the processStartTime property from the supplied instance properties.protected StringremoveProcessingEngineUserId(InstanceProperties instanceProperties) Extract and delete the processingEngineUserId property from the supplied instance properties.protected StringremoveProcessName(InstanceProperties instanceProperties) Extract and delete the processName property from the supplied instance properties.protected DateremoveProcessStartTime(InstanceProperties instanceProperties) Extract and delete the processStartTime property from the supplied instance properties.protected StringremoveProcessStepGUID(InstanceProperties instanceProperties) Extract and delete the processStepGUID property from the supplied instance properties.protected StringremoveProcessStepName(InstanceProperties instanceProperties) Extract and delete the processStepName property from the supplied instance properties.protected StringremoveProtocol(InstanceProperties instanceProperties) Extract and delete the protocol property from the supplied instance properties.protected StringremoveQualifiedName(InstanceProperties instanceProperties) Extract and delete the qualifiedName property from the supplied instance properties.removeReceivedGuards(InstanceProperties instanceProperties) Extract and delete the receivedGuards property from the supplied instance properties.removeRecognizedAdditionalProperties(InstanceProperties instanceProperties) Extract and delete the recognizedAdditionalProperties property from the supplied instance properties.removeRecognizedConfigurationProperties(InstanceProperties instanceProperties) Extract and delete the recognized configuration properties property from the supplied instance properties.removeRecognizedSecuredProperties(InstanceProperties instanceProperties) Extract and delete the recognizedSecuredProperties property from the supplied instance properties.protected DateremoveRequestedStartDate(InstanceProperties instanceProperties) Extract and delete the requestedStartDate property from the supplied instance properties.protected StringremoveRequesterUserId(InstanceProperties instanceProperties) Extract and delete the requesterUserId property from the supplied instance properties.removeRequestParameters(InstanceProperties instanceProperties) Extract and delete the requestParameters property from the supplied instance properties.protected StringremoveRequestType(InstanceProperties instanceProperties) Extract and delete the requestType property from the supplied instance properties.removeSecuredProperties(InstanceProperties instanceProperties) Extract and delete the securedProperties property from the supplied instance properties.protected StringremoveSource(InstanceProperties instanceProperties) Extract and delete the type property from the supplied instance properties.protected DateremoveStartTime(InstanceProperties instanceProperties) Extract and delete the startDate property from the supplied instance properties.protected StringremoveSupportedAssetTypeName(InstanceProperties instanceProperties) Extract and delete the supported asset type name property from the supplied instance properties.protected StringremoveSupportedDeployedImplementationType(InstanceProperties instanceProperties) Extract and delete the type property from the supplied instance properties.removeTargetTechnologyInterfaces(InstanceProperties instanceProperties) Extract and delete the target technology interfaces property from the supplied instance properties.protected StringremoveTargetTechnologyName(InstanceProperties instanceProperties) Extract and delete the target technology name property from the supplied instance properties.protected StringremoveTargetTechnologySource(InstanceProperties instanceProperties) Extract and delete the target technology source property from the supplied instance properties.removeTargetTechnologyVersions(InstanceProperties instanceProperties) Extract and delete the target technology versions property from the supplied instance properties.protected StringremoveUserId(InstanceProperties instanceProperties) Extract and delete the userId property from the supplied instance properties.protected booleanremoveUsesBlockingCalls(InstanceProperties instanceProperties) Extract and remove the usesBlockingCalls property from the supplied instance properties.protected StringremoveVersionIdentifier(InstanceProperties instanceProperties) Extract and delete the version identifier property from the supplied instance properties.protected intremoveWaitTime(InstanceProperties instanceProperties) Extract and delete the waitTime property from the supplied instance properties.protected voidvalidateInstanceType(String expectedTypeName, String beanClassName, String actualTypeName, String methodName) Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.
-
Field Details
-
repositoryHelper
-
serviceName
-
serverName
-
propertyHelper
-
-
Constructor Details
-
OpenMetadataAPIGenericConverter
public OpenMetadataAPIGenericConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor captures the initial content- Parameters:
repositoryHelper- helper object to parse entityserviceName- name of this componentserverName- name of this server
-
-
Method Details
-
getNewBean
public B getNewBean(Class<B> beanClass, EntityDetail entity, String methodName) throws PropertyServerException Using the supplied entity, return a new instance of the bean. This is used for most beans that have a one to one correspondence with the repository instances.- Parameters:
beanClass- name of the class to createentity- entity containing the propertiesmethodName- calling method- Returns:
- bean populated with properties from the entity supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewBean
public B getNewBean(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of the bean. This is used for beans that contain a combination of the properties from an entity and that of a connected relationship.- Parameters:
beanClass- name of the class to createentity- entity containing the propertiesrelationship- relationship used to access the entitymethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewComplexBean
public B getNewComplexBean(Class<B> beanClass, EntityDetail primaryEntity, List<Relationship> relationships, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of the bean. It is used for beans such as an AnnotationProperties or DataField bean which combine knowledge from the entity and its linked relationships.- Parameters:
beanClass- name of the class to createprimaryEntity- entity that is the root of the collection of entities that make up the content of the beanrelationships- relationships linking the entitiesmethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewComplexRelatedEntityBean
public B getNewComplexRelatedEntityBean(Class<B> beanClass, EntityDetail primaryEntity, Relationship relationship, List<RelatedEntity> relatedEntities, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of the bean. It is used for beans such as an AnnotationProperties or DataField bean which combine knowledge from the entity and its linked relationships.- Parameters:
beanClass- name of the class to createprimaryEntity- entity that is the root of the collection of entities that make up the content of the beanrelationship- relationship used to access the entityrelatedEntities- relationships linking the entitiesmethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewComplexGraphBean
public B getNewComplexGraphBean(Class<B> beanClass, EntityDetail primaryEntity, List<EntityDetail> supplementaryEntities, List<Relationship> relationships, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of the bean. It is used for beans such as a connection bean which made up of 3 entities (Connection, ConnectorType and Endpoint) plus the relationships between them. The relationships may be omitted if they do not have any properties.- Parameters:
beanClass- name of the class to createprimaryEntity- entity that is the root of the collection of entities that make up the content of the beansupplementaryEntities- entities connected to the primary entity by the relationshipsrelationships- relationships linking the entitiesmethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewRelationshipBean
public B getNewRelationshipBean(Class<B> beanClass, Relationship relationship, String methodName) throws PropertyServerException Using the supplied relationship, return a new instance of the bean. It is used for beans that represent a simple relationship between two entities.- Parameters:
beanClass- name of the class to createrelationship- relationship linking the entitiesmethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewSchemaTypeBean
public B getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, B externalSchemaType, B mapFromSchemaType, B mapToSchemaType, List<B> schemaTypeOptions, String methodName) throws PropertyServerException Return the converted bean. This is a special method used for schema types since they are stored as a collection of instances.- Parameters:
beanClass- name of the class to createschemaRootHeader- header of the schema element that holds the root informationschemaTypeTypeName- name of type of the schema type to createinstanceProperties- properties describing the schema typeschemaRootClassifications- classifications from the schema root entityattributeCount- number of attributes (for a complex schema type)validValueSetGUID- unique identifier of the set of valid values (for an enum schema type)externalSchemaType- unique identifier for the properties of the schema type that is shared by multiple attributes/assetsmapFromSchemaType- bean containing the properties of the schema type that is part of a map definitionmapToSchemaType- bean containing the properties of the schema type that is part of a map definitionschemaTypeOptions- list of schema types that could be the type for this attributemethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewSchemaTypeBean
public B getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, String externalSchemaTypeGUID, B externalSchemaType, String mapFromSchemaTypeGUID, B mapFromSchemaType, String mapToSchemaTypeGUID, B mapToSchemaType, List<String> schemaTypeOptionGUIDs, List<B> schemaTypeOptions, List<Relationship> queryTargets, String methodName) throws PropertyServerException Return the converted bean. This is a special method used for schema types since they are stored as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself.- Parameters:
beanClass- name of the class to createschemaRootHeader- header of the schema element that holds the root informationschemaTypeTypeName- name of type of the schema type to createinstanceProperties- properties describing the schema typeschemaRootClassifications- classifications from the schema root entityattributeCount- number of attributes (for a complex schema type)validValueSetGUID- unique identifier of the set of valid values (for an enum schema type)externalSchemaTypeGUID- unique identifier of the external schema typeexternalSchemaType- unique identifier for the properties of the schema type that is shared by multiple attributes/assetsmapFromSchemaTypeGUID- unique identifier of the mapFrom schema typemapFromSchemaType- bean containing the properties of the schema type that is part of a map definitionmapToSchemaTypeGUID- unique identifier of the mapTo schema typemapToSchemaType- bean containing the properties of the schema type that is part of a map definitionschemaTypeOptionGUIDs- list of unique identifiers for schema types that could be the type for this attributeschemaTypeOptions- list of schema types that could be the type for this attributequeryTargets- list of relationships to schema types that contain data values used to derive the schema type value(s)methodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
getNewSchemaAttributeBean
public <T> B getNewSchemaAttributeBean(Class<B> beanClass, EntityDetail schemaAttributeEntity, Class<T> typeClass, T schemaType, List<Relationship> schemaAttributeRelationships, String methodName) throws PropertyServerException Extract the properties from the schema attribute entity. Each API creates a specialization of this method for its beans.- Type Parameters:
T- bean type used to create the schema type- Parameters:
beanClass- name of the class to createschemaAttributeEntity- entity containing the properties for the main schema attributetypeClass- name of type used to describe the schema typeschemaType- bean containing the properties of the schema type - this is filled out by the schema type converterschemaAttributeRelationships- relationships containing the links to other schema attributesmethodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- a problem instantiating the bean
-
handleInvalidBeanClass
protected void handleInvalidBeanClass(String beanClassName, Exception error, String methodName) throws PropertyServerException Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.- Parameters:
beanClassName- class name of beanerror- exception generated when the new bean is createdmethodName- method that is missing- Throws:
PropertyServerException- a problem in the use of the generic handlers because the converter has been configured with a type of bean that is not a known class
-
handleUnexpectedBeanClass
protected void handleUnexpectedBeanClass(String beanClassName, String expectedBeanClass, String methodName) throws PropertyServerException Throw an exception to indicate that one of the update methods has not been implemented by an OMAS.- Parameters:
beanClassName- class name of beanexpectedBeanClass- class name that the converter is able to processmethodName- method that is missing- Throws:
PropertyServerException- 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
-
handleMissingMetadataInstance
protected void handleMissingMetadataInstance(String beanClassName, TypeDefCategory typeDefCategory, String methodName) throws PropertyServerException Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.- Parameters:
beanClassName- class name of beantypeDefCategory- class name that the converter is able to processmethodName- method that is missing- Throws:
PropertyServerException- 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
-
validateInstanceType
protected void validateInstanceType(String expectedTypeName, String beanClassName, String actualTypeName, String methodName) throws PropertyServerException Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.- Parameters:
expectedTypeName- name of the type that the instance should matchbeanClassName- class name of beanactualTypeName- type of instancemethodName- calling method- Throws:
PropertyServerException- 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
-
handleBadEntity
protected void handleBadEntity(String beanClassName, EntityDetail entity, String methodName) throws PropertyServerException Throw an exception to indicate that a retrieved entity has missing information.- Parameters:
beanClassName- class name of beanentity- the entity with the bad headermethodName- calling method- Throws:
PropertyServerException- an invalid instance has been returned from the metadata repositories
-
handleBadRelationship
protected void handleBadRelationship(String beanClassName, Relationship relationship, String methodName) throws PropertyServerException Throw an exception to indicate that a critical instance (typically the main entity) has not been passed to the converter.- Parameters:
beanClassName- class name of beanrelationship- the relationship with the bad headermethodName- calling method- Throws:
PropertyServerException- an invalid instance has been returned from the metadata repositories
-
getClassificationProperties
protected InstanceProperties getClassificationProperties(String classificationName, EntityDetail entity) Extract the properties for the requested classification from the entity.- Parameters:
classificationName- name of classificationentity- entity containing classification- Returns:
- list of properties for the named classification
-
getClassificationProperties
protected InstanceProperties getClassificationProperties(String classificationName, List<Classification> entityClassifications) Extract the properties for the requested classification from the list of classifications.- Parameters:
classificationName- name of classificationentityClassifications- list of classifications from an entity- Returns:
- list of properties for the named classification
-
getMetadataElementHeader
protected ElementHeader getMetadataElementHeader(Class<B> beanClass, EntityDetail entity, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
beanClass- name of the class to createentity- entity containing the propertiesmethodName- calling method- Returns:
- filled out element header
- Throws:
PropertyServerException- 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
-
fillElementControlHeader
public void fillElementControlHeader(ElementControlHeader elementControlHeader, InstanceAuditHeader header) Fill an omf control header from the information in a repository services element header.- Parameters:
elementControlHeader- omf object control headerheader- OMRS element header
-
mapPrimitiveDefCategory
Convert OMRS value in omf value.- Parameters:
primitiveDefCategory- OMRS value- Returns:
- omf equivalent
-
mapElementProperties
Fill out the properties for the omf Open Metadata Element bean with values from an OMRS entity.- Parameters:
instanceProperties- retrieve properties- Returns:
- properties mapped to omf
-
getAttachedClassifications
public List<AttachedClassification> getAttachedClassifications(List<Classification> entityClassifications) Extract the classifications from the entity.- Parameters:
entityClassifications- classifications direct from the entity- Returns:
- list of bean classifications
-
getMetadataElementHeader
public ElementHeader getMetadataElementHeader(Class<B> beanClass, InstanceHeader header, List<Classification> entityClassifications, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
beanClass- name of the class to createheader- header from the entity containing the propertiesentityClassifications- classification if this is an entitymethodName- calling method- Returns:
- filled out element header
- Throws:
PropertyServerException- 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
-
getElementStatus
Translate the repository services' InstanceStatus to an ElementStatus.- Parameters:
instanceStatus- value from the repository services- Returns:
- ElementStatus enum
-
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 createentityProxy- entityProxy from the relationship containing the propertiesmethodName- calling method- Returns:
- filled out element header
- Throws:
PropertyServerException- 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
-
getElementType
Convert information from a repository instance into an Open Metadata Framework ElementType.- Parameters:
instanceHeader- values from the server- Returns:
- OCF ElementType object
-
getElementVersions
Extract detail of the version of the element and the user's maintaining it.- Parameters:
header- audit header from the repository- Returns:
- ElementVersions object
-
getElementOriginCategory
protected ElementOriginCategory getElementOriginCategory(InstanceProvenanceType instanceProvenanceType) Translate the repository services' InstanceProvenanceType to an ElementOrigin.- Parameters:
instanceProvenanceType- value from the repository services- Returns:
- ElementOrigin enum
-
getQualifiedName
Extract the qualifiedName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
removeQualifiedName
Extract and delete the qualifiedName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
removeAdditionalProperties
Extract and delete the qualifiedName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- map or null
-
getRemainingExtendedProperties
Convert the remaining properties into a map that is returned as the extended properties.- Parameters:
instanceProperties- properties from entity- Returns:
- map or null
-
removeDisplayName
Extract and delete the displayName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
getDisplayName
Extract the displayName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
removeName
Extract and delete the name property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
removeVersionIdentifier
Extract and delete the version identifier property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string name or null
-
getDescription
Extract the description property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeDescription
Extract and delete the description property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeNetworkAddress
Extract and delete the networkAddress property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeProtocol
Extract and delete the protocol property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeEncryptionMethod
Extract and delete the encryption method property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeConnectorProviderClassName
Extract and delete the connector provider class name property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeSupportedAssetTypeName
Extract and delete the supported asset type name property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeExpectedDataFormat
Extract and delete the expected data format property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeConnectorFrameworkName
Extract and delete the connector framework name property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeConnectorInterfaceLanguage
Extract and delete the connector interface language property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeConnectorInterfaces
Extract and delete the connector interfaces property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeTargetTechnologySource
Extract and delete the target technology source property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeTargetTechnologyName
Extract and delete the target technology name property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeTargetTechnologyInterfaces
Extract and delete the target technology interfaces property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeTargetTechnologyVersions
Extract and delete the target technology versions property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeRecognizedAdditionalProperties
Extract and delete the recognizedAdditionalProperties property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeRecognizedSecuredProperties
Extract and delete the recognizedSecuredProperties property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeRecognizedConfigurationProperties
protected List<String> removeRecognizedConfigurationProperties(InstanceProperties instanceProperties) Extract and delete the recognized configuration properties property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeSecuredProperties
Extract and delete the securedProperties property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeConfigurationProperties
Extract and delete the configuration properties property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string list or null
-
removeUserId
Extract and delete the userId property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeClearPassword
Extract and delete the clear password property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeEncryptedPassword
Extract and delete the encrypted password property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
getArguments
Extract the "arguments" property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeSupportedDeployedImplementationType
Extract and delete the type property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeCapabilityType
Extract and delete the type property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeCapabilityVersion
Extract and delete the capabilityVersion property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removePatchLevel
Extract and delete the patchLevel property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
getPosition
Extract the position property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- integer - default 0
-
removeFormula
Extract and delete the formula property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeFormulaType
Extract and delete the formulaType property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeProcessStartTime
Extract and delete the processStartTime property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeProcessEndTime
Extract and delete the processStartTime property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeUsesBlockingCalls
Extract and remove the usesBlockingCalls property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeSource
Extract and delete the type property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
removeDomainIdentifier
Extract and delete the domain identifier property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- integer = default is 0 which is ALL
-
removeProcessingEngineUserId
Extract and delete the processingEngineUserId property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeRequesterUserId
Extract and delete the requesterUserId property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeRequestType
Extract and delete the requestType property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeRequestParameters
Extract and delete the requestParameters property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeExecutorEngineGUID
Extract and delete the executorEngineGUID property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeExecutorEngineName
Extract and delete the executorEngineName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeProcessName
Extract and delete the processName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeProcessStepGUID
Extract and delete the processStepGUID property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeProcessStepName
Extract and delete the processStepName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeGovernanceActionTypeGUID
Extract and delete the governanceActionTypeGUID property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeGovernanceActionTypeName
Extract and delete the governanceActionTypeName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeGuard
Extract and delete the guard property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeMandatoryGuards
Extract and delete the mandatoryGuards property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- list of guards
-
removeMandatoryGuard
Extract and delete the mandatoryGuard property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- flag
-
removeIgnoreMultipleTriggers
Extract and delete the ignoreMultipleTriggers property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- flag
-
removeWaitTime
Extract and delete the waitTime property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- integer
-
removeReceivedGuards
Extract and delete the receivedGuards property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- list of guards
-
removeCompletionGuards
Extract and delete the completionGuards property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- list of guards
-
removeCompletionMessage
Extract and delete the completionMessage property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string
-
removeStartTime
Extract and delete the startDate property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- date
-
removeRequestedStartDate
Extract and delete the requestedStartDate property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- date
-
removeCompletionDate
Extract and delete the completionDate property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- date
-
removeActionTargetName
Extract and delete the actionTargetName property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- String text or null
-
getConditions
Extract the "conditions" property from the supplied instance properties.- Parameters:
instanceProperties- properties from entity- Returns:
- string text or null
-
getAttributeName
Extract the "attributeName" property from the supplied instance properties.- Parameters:
instanceProperties- properties from ReferenceValueAssignment relationship- Returns:
- string text or null
-