Class AssetCertificationManager
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
org.odpi.openmetadata.accessservices.assetowner.client.AssetOwnerBaseClient
org.odpi.openmetadata.accessservices.assetowner.client.AssetCertificationManager
- All Implemented Interfaces:
AssetCertificationInterface
,RelatedElementsManagementInterface
,ConnectorFactoryInterface
public class AssetCertificationManager
extends AssetOwnerBaseClient
implements AssetCertificationInterface
AssetCertificationManager is the java client for managing certification types and the certification of elements.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.assetowner.client.AssetOwnerBaseClient
nullRequestBody, restClient, serviceURLName, urlTemplatePrefix
Fields inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
auditLog, invalidParameterHandler, serverName, serverPlatformURLRoot
-
Constructor Summary
ConstructorDescriptionAssetCertificationManager
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.AssetCertificationManager
(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.AssetCertificationManager
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.AssetCertificationManager
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.AssetCertificationManager
(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize) Create a new client that uses the supplied rest client. -
Method Summary
Modifier and TypeMethodDescriptioncertifyElement
(String userId, String elementGUID, String certificationTypeGUID, CertificationProperties properties) Link an element to a certification type and include details of the certification in the relationship properties.void
decertifyElement
(String userId, String certificationGUID) Remove the certification for an element.getCertifications
(String userId, String elementGUID, int startFrom, int pageSize) Return information about the certifications linked to an element.getCertificationTypeByDocId
(String userId, String documentIdentifier) Retrieve the certification type by its assigned unique document identifier.getCertificationTypeByDomainId
(String userId, int domainIdentifier, int startFrom, int pageSize) Retrieve all the certification type definitions for a specific governance domain.getCertificationTypeByGUID
(String userId, String certificationTypeGUID) Retrieve the certification type by the unique identifier assigned by this service when it was created.getCertificationTypesByTitle
(String userId, String title, int startFrom, int pageSize) Retrieve all the certification types for a particular title.getCertifiedElements
(String userId, String certificationTypeGUID, int startFrom, int pageSize) Return information about the elements linked to a certification.void
updateCertification
(String userId, String certificationGUID, boolean isMergeUpdate, CertificationProperties properties) Update the properties of a certification.Methods inherited from class org.odpi.openmetadata.accessservices.assetowner.client.AssetOwnerBaseClient
clearCatalogTemplate, clearMoreInformation, clearResource, clearStakeholder, getCatalogTemplateList, getDescriptiveElements, getMoreInformation, getResourceList, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, getSupportedByTemplate, removeReferenceable, setupCatalogTemplate, setupMoreInformation, setupResource, setupStakeholder, updateRelationship
Methods inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
getAnchorAssetFromGUID, getAssetForConnection, getAssetProperties, getAssetSummary, getConnectionByGUID, getConnectionByName, getConnectionForAsset, getConnectorByConnection, getConnectorByGUID, getConnectorByName, getConnectorForAsset, getConnectorForAsset, getConnectorForConnection, logAssetAuditMessage, saveConnection, saveConnection
-
Constructor Details
-
AssetCertificationManager
public AssetCertificationManager(String serverName, String serverPlatformURLRoot) throws 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 services- Throws:
InvalidParameterException
- bad input parameters
-
AssetCertificationManager
public AssetCertificationManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws 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 requests- Throws:
InvalidParameterException
- bad input parameters
-
AssetCertificationManager
public AssetCertificationManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws 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
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- bad input parameters
-
AssetCertificationManager
public AssetCertificationManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws 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
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- bad input parameters
-
AssetCertificationManager
public AssetCertificationManager(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that uses the supplied rest client. This is typically used when called from another OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- internal client for rest callsmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- bad input parameters
-
-
Method Details
-
getCertificationTypeByGUID
public CertificationTypeElement getCertificationTypeByGUID(String userId, String certificationTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the certification type by the unique identifier assigned by this service when it was created.- Specified by:
getCertificationTypeByGUID
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling usercertificationTypeGUID
- identifier of the governance definition to retrieve- Returns:
- properties of the certification type
- Throws:
InvalidParameterException
- guid or userId is null; guid is not recognizedPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCertificationTypeByDocId
public CertificationTypeElement getCertificationTypeByDocId(String userId, String documentIdentifier) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the certification type by its assigned unique document identifier.- Specified by:
getCertificationTypeByDocId
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling userdocumentIdentifier
- identifier to search for- Returns:
- properties of the matching certification type
- Throws:
InvalidParameterException
- documentIdentifier or userId is null; documentIdentifier is not recognizedPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCertificationTypesByTitle
public List<CertificationTypeElement> getCertificationTypesByTitle(String userId, String title, int startFrom, int pageSize) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Retrieve all the certification types for a particular title. The title can include regEx wildcards.- Specified by:
getCertificationTypesByTitle
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling usertitle
- short description of the certificationstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- list of matching certification types (null if no matching elements)
- Throws:
InvalidParameterException
- title or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCertificationTypeByDomainId
public List<CertificationTypeElement> getCertificationTypeByDomainId(String userId, int domainIdentifier, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve all the certification type definitions for a specific governance domain.- Specified by:
getCertificationTypeByDomainId
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling userdomainIdentifier
- identifier to search forstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- properties of the matching certification type definitions
- Throws:
InvalidParameterException
- domainIdentifier or userId is null; domainIdentifier is not recognizedPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
certifyElement
public String certifyElement(String userId, String elementGUID, String certificationTypeGUID, CertificationProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link an element to a certification type and include details of the certification in the relationship properties.- Specified by:
certifyElement
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the element being certifiedcertificationTypeGUID
- unique identifier for the certification typeproperties
- the properties of the certification- Returns:
- unique identifier of the new relationship
- Throws:
InvalidParameterException
- one of the properties is invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
updateCertification
public void updateCertification(String userId, String certificationGUID, boolean isMergeUpdate, CertificationProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a certification.- Specified by:
updateCertification
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling usercertificationGUID
- unique identifier of the certification relationship being updatedisMergeUpdate
- should the supplied properties overlay the existing properties or replace themproperties
- the properties of the certification- Throws:
InvalidParameterException
- one of the properties is invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
decertifyElement
public void decertifyElement(String userId, String certificationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the certification for an element.- Specified by:
decertifyElement
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling usercertificationGUID
- unique identifier of the certification relationship- Throws:
InvalidParameterException
- one of the properties is invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCertifiedElements
public List<RelatedElement> getCertifiedElements(String userId, String certificationTypeGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the elements linked to a certification.- Specified by:
getCertifiedElements
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling usercertificationTypeGUID
- unique identifier for the certificationstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the certification
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getCertifications
public List<RelatedElement> getCertifications(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the certifications linked to an element.- Specified by:
getCertifications
in interfaceAssetCertificationInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier for the certificationstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the certification
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-