Class OpenMetadataAPITemplateHandler<B>

Type Parameters:
B -
Direct Known Subclasses:
ReferenceableHandler

public class OpenMetadataAPITemplateHandler<B> extends OpenMetadataAPIGenericHandler<B>
OpenMetadataAPITemplateHandler provides the methods for managing the creation of elements using templates.
  • 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 class
      beanClass - name of bean class that is represented by the generic class B
      serviceName - name of this service
      serverName - name of the local server
      invalidParameterHandler - handler for managing parameter errors
      repositoryHandler - manages calls to the repository services
      repositoryHelper - provides utilities for manipulating the repository services objects
      localServerUserId - userId for this server
      securityVerifier - open metadata security services verifier
      supportedZones - 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, UserNotAuthorizedException
      Create 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 user
      externalSourceGUID - guid of the software capability entity that represented the external source - null for local
      externalSourceName - name of the software capability entity that represented the external source
      templateGUID - unique identifier of existing entity to use
      templateGUIDParameterName - name of parameter passing the templateGUID
      entityTypeGUID - unique identifier of the type for the entity
      entityTypeName - unique name of the type for the entity
      uniqueParameterValue - 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 service
      deepCopy - 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 template
      methodName - calling method
      Returns:
      unique identifier of the new bean
      Throws:
      InvalidParameterException - one of the parameters is invalid
      PropertyServerException - there is a problem in the repository services
      UserNotAuthorizedException - the user is not authorized to access one of the elements.