Class TemplateManager
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
ConstructorsConstructorDescriptionTemplateManager(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 TypeMethodDescriptionvoidaddTemplateClassification(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.voidremoveTemplateClassification(String userId, String elementGUID) Remove the classification that indicates that this element can be used as a template.
-
Constructor Details
-
TemplateManager
public TemplateManager(String serverName, String serverPlatformURLRoot, int maxPageSize, org.odpi.openmetadata.frameworks.auditlog.AuditLog auditLog) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.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.connectors.ffdc.InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesmaxPageSize- maximum number of results supported by this server- Throws:
org.odpi.openmetadata.frameworks.connectors.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.connectors.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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.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.connectors.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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsmaxPageSize- maximum number of results supported by this server- Throws:
org.odpi.openmetadata.frameworks.connectors.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.connectors.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 toserverPlatformURLRoot- the network address of the server running the OMAS REST servicesrestClient- client that issues the REST API callsmaxPageSize- maximum number of results supported by this serverauditLog- logging destination- Throws:
org.odpi.openmetadata.frameworks.connectors.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, throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerExceptionString>>> specification) Classify an asset as suitable to be used as a template for cataloguing assets of a similar types.- Specified by:
addTemplateClassificationin interfaceorg.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates- Parameters:
userId- calling userelementGUID- unique identifier of the element to classify as a templateproperties- properties of the templatespecification- values required to use the template- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- element not known, null userId or guidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-
removeTemplateClassification
public void removeTemplateClassification(String userId, String elementGUID) throws org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Remove the classification that indicates that this element can be used as a template. Any specification is also removed.- Specified by:
removeTemplateClassificationin interfaceorg.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates- Parameters:
userId- calling userelementGUID- unique identifier of the element to declassify- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- element or element not known, null userId or guidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.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.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Return a list of templates for a particular open metadata type of element.- Specified by:
getTemplatesForTypein interfaceorg.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates- Parameters:
userId- calling usertypeName- type name to query (if null, any type is returned)effectiveTime- optional effective timestartFrom- starting elementpageSize- maximum number of elements- Returns:
- list of templates
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- element not known, null userId or guidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.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.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Find templates with the requested RegEx in the string properties of the template properties.- Specified by:
findTemplatesin interfaceorg.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates- Parameters:
userId- calling usersearchString- string to search for (regEx)typeName- type name to query (if null, any type is returned)effectiveTime- optional effective timestartFrom- starting elementpageSize- maximum number of elements- Returns:
- list of templates
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- element not known, null userId or guidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.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.connectors.ffdc.InvalidParameterException, org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException, org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException Return the templates with the requested name.- Specified by:
getTemplatesByNamein interfaceorg.odpi.openmetadata.accessservices.digitalarchitecture.api.ManageTemplates- Parameters:
userId- calling username- name to search fortypeName- type name to query (if null, any type is returned)effectiveTime- optional effective timestartFrom- starting elementpageSize- maximum number of elements- Returns:
- list of templates
- Throws:
org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException- element not known, null userId or guidorg.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException- problem accessing property serverorg.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException- security access problem
-