Class OpenMetadataAPITemplateHandler<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPITemplateHandler<B>
- Type Parameters:
B
-
- Direct Known Subclasses:
ReferenceableHandler
OpenMetadataAPITemplateHandler provides the methods for managing the creation of elements using templates.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
OpenMetadataAPIGenericHandler.AnchorIdentifiers
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
assetActionDescription, auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, qualifiedNamePropertyNamesList, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones
-
Constructor Summary
ConstructorDescriptionOpenMetadataAPITemplateHandler
(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptioncreateBeanFromTemplate
(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String templateGUIDParameterName, String entityTypeGUID, String entityTypeName, String uniqueParameterValue, String uniqueParameterName, OpenMetadataAPIGenericBuilder propertyBuilder, List<String> serviceSupportedZones, boolean deepCopy, boolean templateSubstitute, boolean allowRetrieve, Map<String, String> placeholderProperties, String methodName) Create a new entity in the repository based on the contents of an existing entity (the template).createBeanFromTemplate
(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String templateGUIDParameterName, String entityTypeGUID, String entityTypeName, String uniqueParameterValue, String uniqueParameterName, OpenMetadataAPIGenericBuilder propertyBuilder, List<String> serviceSupportedZones, boolean deepCopy, boolean templateSubstitute, Map<String, String> placeholderProperties, String methodName) Create a new entity in the repository based on the contents of an existing entity (the template).Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorGUIDToBuilder, addAnchorsClassification, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanInRepository, createBeanInRepository, deleteAnchoredEntity, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteRelationship, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, findEntities, findEntities, findEntities, getAllAttachmentLinks, getAnchorGUIDFromAnchorsClassification, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntities, getAttachedEntitiesFromUser, getAttachedEntity, getAttachedEntity, getAttachedEntityFromUser, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getAttachmentsForType, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanHistory, getBeansByClassification, getBeansByCreator, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getDomainName, getDomainName, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getSpecification, getSupplementaryProperties, getUniqueAttachmentLink, getUniqueAttachmentLink, isBeanIsolated, isEntityATypeOf, linkElementToElement, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, multiLinkElementToElement, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, uncheckedLinkElementToElement, undoBeanUpdateInRepository, undoBeanUpdateInRepository, undoBeanUpdateInRepository, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipEffectivityDates, updateRelationshipProperties, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, validateUniqueProperty, verifyExternalSourceIdentity
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIRootHandler
getConverter, getElementStub, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getSupportedZones, getTypeDefByName, setSecurityVerifier
-
Constructor Details
-
OpenMetadataAPITemplateHandler
public OpenMetadataAPITemplateHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services- Parameters:
converter
- specific converter for this bean classbeanClass
- name of bean class that is represented by the generic class BserviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrepositoryHandler
- manages calls to the repository servicesrepositoryHelper
- provides utilities for manipulating the repository services objectslocalServerUserId
- userId for this serversecurityVerifier
- open metadata security services verifiersupportedZones
- list of zones that the access service is allowed to serve Asset instances from.defaultZones
- list of zones that the access service should set in all new Asset instances.publishZones
- list of zones that the access service sets up in published Asset instances.auditLog
- destination for audit log events.
-
-
Method Details
-
createBeanFromTemplate
public String createBeanFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String templateGUIDParameterName, String entityTypeGUID, String entityTypeName, String uniqueParameterValue, String uniqueParameterName, OpenMetadataAPIGenericBuilder propertyBuilder, List<String> serviceSupportedZones, boolean deepCopy, boolean templateSubstitute, Map<String, String> placeholderProperties, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate a new entity in the repository based on the contents of an existing entity (the template). The supplied builder is preloaded with properties that should override the properties from the template. This is the top-level method to call from the specific handlers.- Parameters:
userId
- calling userexternalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourcetemplateGUID
- unique identifier of existing entity to usetemplateGUIDParameterName
- name of parameter passing the templateGUIDentityTypeGUID
- unique identifier of the type for the entityentityTypeName
- unique name of the type for the entityuniqueParameterValue
- the value of a unique property (typically qualifiedName) in the new entity - this is used to create unique names in the attachments.uniqueParameterName
- name of the property where the unique value is stored.propertyBuilder
- this property builder has the new properties supplied by the caller. They will be augmented by the template properties and classification.serviceSupportedZones
- list of supported zones for this servicedeepCopy
- should the template creation extend to the anchored elements or just the direct entity?templateSubstitute
- is this element a template substitute (used as the "other end" of a new/updated relationship)placeholderProperties
- values to override placeholder variables in the templatemethodName
- calling method- Returns:
- unique identifier of the new bean
- Throws:
InvalidParameterException
- one of the parameters is invalidPropertyServerException
- there is a problem in the repository servicesUserNotAuthorizedException
- the user is not authorized to access one of the elements.
-
createBeanFromTemplate
public String createBeanFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String templateGUID, String templateGUIDParameterName, String entityTypeGUID, String entityTypeName, String uniqueParameterValue, String uniqueParameterName, OpenMetadataAPIGenericBuilder propertyBuilder, List<String> serviceSupportedZones, boolean deepCopy, boolean templateSubstitute, boolean allowRetrieve, Map<String, String> placeholderProperties, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate a new entity in the repository based on the contents of an existing entity (the template). The supplied builder is preloaded with properties that should override the properties from the template. This is the top-level method to call from the specific handlers.- Parameters:
userId
- calling userexternalSourceGUID
- guid of the software capability entity that represented the external source - null for localexternalSourceName
- name of the software capability entity that represented the external sourcetemplateGUID
- unique identifier of existing entity to usetemplateGUIDParameterName
- name of parameter passing the templateGUIDentityTypeGUID
- unique identifier of the type for the entityentityTypeName
- unique name of the type for the entityuniqueParameterValue
- the value of a unique property (typically qualifiedName) in the new entity - this is used to create unique names in the attachments.uniqueParameterName
- name of the property where the unique value is stored.propertyBuilder
- this property builder has the new properties supplied by the caller. They will be augmented by the template properties and classification.serviceSupportedZones
- list of supported zones for this servicedeepCopy
- should the template creation extend to the anchored elements or just the direct entity?templateSubstitute
- is this element a template substitute (used as the "other end" of a new/updated relationship)allowRetrieve
- can an existing element be returned if it existsplaceholderProperties
- values to override placeholder variables in the templatemethodName
- calling method- Returns:
- unique identifier of the new bean
- Throws:
InvalidParameterException
- one of the parameters is invalidPropertyServerException
- there is a problem in the repository servicesUserNotAuthorizedException
- the user is not authorized to access one of the elements.
-