java.lang.Object
org.odpi.openmetadata.accessservices.digitalarchitecture.client.TemplateManager
All Implemented Interfaces:
org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates

public class TemplateManager extends Object implements org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
TemplateManager provides specialist methods for managing templates
  • Constructor Summary

    Constructors
    Constructor
    Description
    TemplateManager(String serverName, String serverPlatformURLRoot, int maxPageSize)
    Create a new client with no authentication embedded in the HTTP request.
    TemplateManager(String serverName, String serverPlatformURLRoot, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Create a new client with no authentication embedded in the HTTP request.
    TemplateManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize)
    Create a new client that passes userId and password in each HTTP request.
    TemplateManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Create a new client that passes userId and password in each HTTP request.
    TemplateManager(String serverName, String serverPlatformURLRoot, DigitalArchitectureRESTClient restClient, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog)
    Create a new client that is going to be used in an OMAG Server (view service or integration service typically).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTemplateClassification(String userId, String elementGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.templates.TemplateClassificationProperties properties, Map<String,List<Map<String,String>>> specification)
    Classify an asset as suitable to be used as a template for cataloguing assets of a similar types.
    List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement>
    findTemplates(String userId, String searchString, String typeName, Date effectiveTime, int startFrom, int pageSize)
    Find templates with the requested RegEx in the string properties of the template properties.
    List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement>
    getTemplatesByName(String userId, String name, String typeName, Date effectiveTime, int startFrom, int pageSize)
    Return the templates with the requested name.
    List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement>
    getTemplatesForType(String userId, String typeName, Date effectiveTime, int startFrom, int pageSize)
    Return a list of templates for a particular open metadata type of element.
    void
    Remove the classification that indicates that this element can be used as a template.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TemplateManager

      public TemplateManager(String serverName, String serverPlatformURLRoot, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • TemplateManager

      public TemplateManager(String serverName, String serverPlatformURLRoot, int maxPageSize) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException
      Create a new client with no authentication embedded in the HTTP request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      maxPageSize - maximum number of results supported by this server
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • TemplateManager

      public TemplateManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • TemplateManager

      public TemplateManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException
      Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      userId - caller's userId embedded in all HTTP requests
      password - caller's userId embedded in all HTTP requests
      maxPageSize - maximum number of results supported by this server
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • TemplateManager

      public TemplateManager(String serverName, String serverPlatformURLRoot, DigitalArchitectureRESTClient restClient, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException
      Create a new client that is going to be used in an OMAG Server (view service or integration service typically).
      Parameters:
      serverName - name of the server to connect to
      serverPlatformURLRoot - the network address of the server running the OMAS REST services
      restClient - client that issues the REST API calls
      maxPageSize - maximum number of results supported by this server
      auditLog - logging destination
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
  • Method Details

    • addTemplateClassification

      public void addTemplateClassification(String userId, String elementGUID, org.odpi.openmetadata.frameworks.openmetadata.properties.templates.TemplateClassificationProperties properties, Map<String,List<Map<String,String>>> specification) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException
      Classify an asset as suitable to be used as a template for cataloguing assets of a similar types.
      Specified by:
      addTemplateClassification in interface org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the element to classify as a template
      properties - properties of the template
      specification - values required to use the template
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - element not known, null userId or guid
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException - security access problem
    • removeTemplateClassification

      public void removeTemplateClassification(String userId, String elementGUID) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException
      Remove the classification that indicates that this element can be used as a template. Any specification is also removed.
      Specified by:
      removeTemplateClassification in interface org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
      Parameters:
      userId - calling user
      elementGUID - unique identifier of the element to declassify
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - element or element not known, null userId or guid
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException - security access problem
    • getTemplatesForType

      public List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement> getTemplatesForType(String userId, String typeName, Date effectiveTime, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException
      Return a list of templates for a particular open metadata type of element.
      Specified by:
      getTemplatesForType in interface org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
      Parameters:
      userId - calling user
      typeName - type name to query (if null, any type is returned)
      effectiveTime - optional effective time
      startFrom - starting element
      pageSize - maximum number of elements
      Returns:
      list of templates
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - element not known, null userId or guid
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException - security access problem
    • findTemplates

      public List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement> findTemplates(String userId, String searchString, String typeName, Date effectiveTime, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException
      Find templates with the requested RegEx in the string properties of the template properties.
      Specified by:
      findTemplates in interface org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
      Parameters:
      userId - calling user
      searchString - string to search for (regEx)
      typeName - type name to query (if null, any type is returned)
      effectiveTime - optional effective time
      startFrom - starting element
      pageSize - maximum number of elements
      Returns:
      list of templates
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - element not known, null userId or guid
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException - security access problem
    • getTemplatesByName

      public List<org.odpi.openmetadata.accessservices.digitalarchitecture.metadataelements.TemplateElement> getTemplatesByName(String userId, String name, String typeName, Date effectiveTime, int startFrom, int pageSize) throws org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException
      Return the templates with the requested name.
      Specified by:
      getTemplatesByName in interface org.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates
      Parameters:
      userId - calling user
      name - name to search for
      typeName - type name to query (if null, any type is returned)
      effectiveTime - optional effective time
      startFrom - starting element
      pageSize - maximum number of elements
      Returns:
      list of templates
      Throws:
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.InvalidParameterException - element not known, null userId or guid
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.PropertyServerException - problem accessing property server
      org.odpi.openmetadata.frameworks.openmetadata.ffdc.UserNotAuthorizedException - security access problem