Class AssetOwnerBaseClient
java.lang.Object
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
org.odpi.openmetadata.accessservices.assetowner.client.AssetOwnerBaseClient
- All Implemented Interfaces:
RelatedElementsManagementInterface
,ConnectorFactoryInterface
- Direct Known Subclasses:
AssetCertificationManager
,AssetLicenseManager
,AssetOwner
,ExternalReferenceManager
public class AssetOwnerBaseClient
extends ConnectedAssetClientBase
implements RelatedElementsManagementInterface
AssetOwnerBaseClient supports the common properties and functions for the Community Profile OMAS.
-
Field Summary
Modifier and TypeFieldDescriptionprotected NullRequestBody
protected final AssetOwnerRESTClient
protected static final String
protected final String
Fields inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.ConnectedAssetClientBase
auditLog, invalidParameterHandler, serverName, serverPlatformURLRoot
-
Constructor Summary
ConstructorDescriptionAssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.AssetOwnerBaseClient
(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.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize, AuditLog auditLog) Create a new client that is going to be used in an OMAG Server.AssetOwnerBaseClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearCatalogTemplate
(String userId, String elementGUID, String templateGUID) Remove a "CatalogTemplate" relationship between two referenceables.void
clearMoreInformation
(String userId, String elementGUID, String detailGUID) Remove a "MoreInformation" relationship between two referenceables.void
clearResource
(String userId, String elementGUID, String resourceGUID) Remove a "ResourceList" relationship between two referenceables.void
clearStakeholder
(String userId, String elementGUID, String stakeholderGUID) Remove a "Stakeholder" relationship between two referenceables.getCatalogTemplateList
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the list of templates assigned to an element via the "CatalogTemplate" relationship.getDescriptiveElements
(String userId, String detailGUID, int startFrom, int pageSize) Retrieve the descriptive elements linked via a "MoreInformation" relationship between two referenceables.getMoreInformation
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the detail elements linked via a "MoreInformation" relationship between two referenceables.getResourceList
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the list of resources assigned to an element via the "ResourceList" relationship between two referenceables.getStakeholderCommissionedElements
(String userId, String stakeholderGUID, int startFrom, int pageSize) Retrieve the elements commissioned by a stakeholder, linked via the "Stakeholder" relationship between two referenceables.getStakeholders
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the stakeholder elements linked via the "Stakeholder" relationship between two referenceables.getSupportedByResource
(String userId, String resourceGUID, int startFrom, int pageSize) Retrieve the list of elements assigned to a resource via the "ResourceList" relationship between two referenceables.getSupportedByTemplate
(String userId, String templateGUID, int startFrom, int pageSize) Retrieve the list of elements assigned to a template via the "CatalogTemplate" relationship.void
removeReferenceable
(String userId, String elementGUID, String elementGUIDParameterName, String urlTemplate, String methodName) Remove the metadata element.void
setupCatalogTemplate
(String userId, String elementGUID, String templateGUID) Create a "CatalogTemplate" relationship between a consuming element and a template element.void
setupMoreInformation
(String userId, String elementGUID, RelationshipProperties properties, String detailGUID) Create a "MoreInformation" relationship between an element that is descriptive and one that is providing the detail.void
setupResource
(String userId, String elementGUID, ResourceListProperties properties, String resourceGUID) Create a "ResourceList" relationship between a consuming element and an element that represents resources.void
setupStakeholder
(String userId, String elementGUID, StakeholderProperties properties, String stakeholderGUID) Create a "Stakeholder" relationship between an element and its stakeholder.void
updateRelationship
(String userId, String relationshipGUID, String relationshipGUIDParameterName, boolean isMergeUpdate, String relationshipName, RelationshipProperties properties, String urlTemplate, String methodName) Update the properties of a multi-link relationship.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
-
Field Details
-
restClient
-
serviceURLName
- See Also:
-
urlTemplatePrefix
- See Also:
-
nullRequestBody
-
-
Constructor Details
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(String serverName, String serverPlatformURLRoot, 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 servicesauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(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
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(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
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(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
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(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
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(String serverName, String serverPlatformURLRoot, String userId, String password, 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 requestsauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server.- 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 server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
AssetOwnerBaseClient
public AssetOwnerBaseClient(String serverName, String serverPlatformURLRoot, AssetOwnerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client that is going to be used in an OMAG Server.- 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:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
updateRelationship
public void updateRelationship(String userId, String relationshipGUID, String relationshipGUIDParameterName, boolean isMergeUpdate, String relationshipName, RelationshipProperties properties, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the properties of a multi-link relationship.- Parameters:
userId
- calling userrelationshipGUID
- unique identifier of the primary elementrelationshipGUIDParameterName
- name of parameter passing the relationshipGUIDisMergeUpdate
- should the supplied properties overlay the existing properties or replace themrelationshipName
- type name of relationshipproperties
- describes the properties for the relationshipurlTemplate
- URL to call (no expected placeholders)methodName
- calling method- Throws:
InvalidParameterException
- one of the properties is invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
removeReferenceable
public void removeReferenceable(String userId, String elementGUID, String elementGUIDParameterName, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element.- Parameters:
userId
- calling userelementGUID
- unique identifier of the metadata element to removeelementGUIDParameterName
- name of parameter passing the elementGUIDurlTemplate
- URL to call (no expected placeholders)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupMoreInformation
public void setupMoreInformation(String userId, String elementGUID, RelationshipProperties properties, String detailGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a "MoreInformation" relationship between an element that is descriptive and one that is providing the detail.- Specified by:
setupMoreInformation
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the element that is descriptiveproperties
- properties of the relationshipdetailGUID
- unique identifier of the element that provides the detail- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearMoreInformation
public void clearMoreInformation(String userId, String elementGUID, String detailGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "MoreInformation" relationship between two referenceables.- Specified by:
clearMoreInformation
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the element that is descriptivedetailGUID
- unique identifier of the element that provides the detail- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getMoreInformation
public List<RelatedElement> getMoreInformation(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the detail elements linked via a "MoreInformation" relationship between two referenceables.- Specified by:
getMoreInformation
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the element that is descriptivestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getDescriptiveElements
public List<RelatedElement> getDescriptiveElements(String userId, String detailGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the descriptive elements linked via a "MoreInformation" relationship between two referenceables.- Specified by:
getDescriptiveElements
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userdetailGUID
- unique identifier of the element that provides the detailstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupStakeholder
public void setupStakeholder(String userId, String elementGUID, StakeholderProperties properties, String stakeholderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a "Stakeholder" relationship between an element and its stakeholder.- Specified by:
setupStakeholder
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementproperties
- properties of the relationshipstakeholderGUID
- unique identifier of the stakeholder- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearStakeholder
public void clearStakeholder(String userId, String elementGUID, String stakeholderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "Stakeholder" relationship between two referenceables.- Specified by:
clearStakeholder
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementstakeholderGUID
- unique identifier of the stakeholder- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getStakeholders
public List<RelatedElement> getStakeholders(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the stakeholder elements linked via the "Stakeholder" relationship between two referenceables.- Specified by:
getStakeholders
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getStakeholderCommissionedElements
public List<RelatedElement> getStakeholderCommissionedElements(String userId, String stakeholderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the elements commissioned by a stakeholder, linked via the "Stakeholder" relationship between two referenceables.- Specified by:
getStakeholderCommissionedElements
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userstakeholderGUID
- unique identifier of the stakeholderstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupResource
public void setupResource(String userId, String elementGUID, ResourceListProperties properties, String resourceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a "ResourceList" relationship between a consuming element and an element that represents resources.- Specified by:
setupResource
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementproperties
- properties of the relationshipresourceGUID
- unique identifier of the resource- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearResource
public void clearResource(String userId, String elementGUID, String resourceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "ResourceList" relationship between two referenceables.- Specified by:
clearResource
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementresourceGUID
- unique identifier of the resource- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getResourceList
public List<RelatedElement> getResourceList(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of resources assigned to an element via the "ResourceList" relationship between two referenceables.- Specified by:
getResourceList
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getSupportedByResource
public List<RelatedElement> getSupportedByResource(String userId, String resourceGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of elements assigned to a resource via the "ResourceList" relationship between two referenceables.- Specified by:
getSupportedByResource
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userresourceGUID
- unique identifier of the resourcestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
setupCatalogTemplate
public void setupCatalogTemplate(String userId, String elementGUID, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a "CatalogTemplate" relationship between a consuming element and a template element.- Specified by:
setupCatalogTemplate
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementtemplateGUID
- unique identifier of the template- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
clearCatalogTemplate
public void clearCatalogTemplate(String userId, String elementGUID, String templateGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "CatalogTemplate" relationship between two referenceables.- Specified by:
clearCatalogTemplate
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementtemplateGUID
- unique identifier of the template- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getCatalogTemplateList
public List<RelatedElement> getCatalogTemplateList(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of templates assigned to an element via the "CatalogTemplate" relationship.- Specified by:
getCatalogTemplateList
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier of the elementstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getSupportedByTemplate
public List<RelatedElement> getSupportedByTemplate(String userId, String templateGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of elements assigned to a template via the "CatalogTemplate" relationship.- Specified by:
getSupportedByTemplate
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling usertemplateGUID
- unique identifier of the templatestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of related elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-