Class CommunityProfileBaseClient
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
- All Implemented Interfaces:
RelatedElementsManagementInterface
- Direct Known Subclasses:
CollectionManagement
,CommunityManagement
,LocationManagement
,MetadataSourceClient
,OrganizationManagement
,SecurityGroupManagement
,ToDoActionManagement
,UserIdentityManagement
,ValidValueManagement
public class CommunityProfileBaseClient
extends Object
implements RelatedElementsManagementInterface
CommunityProfileBaseClient supports the common properties and functions for the Community Profile OMAS.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected final OpenMetadataStoreClient
protected final PropertyHelper
-
Constructor Summary
ConstructorDescriptionCommunityProfileBaseClient
(String serverName, String serverPlatformURLRoot, int maxPageSize) Create a new client with no authentication embedded in the HTTP request.CommunityProfileBaseClient
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) Create a new client that passes userId and password in each HTTP request.CommunityProfileBaseClient
(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, int maxPageSize) Create a new client that passes userId and password in each HTTP request.CommunityProfileBaseClient
(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.CommunityProfileBaseClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog, int maxPageSize) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAssignmentScope
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String scopeGUID) Remove an "AssignmentScope" relationship between two referenceables.void
clearMoreInformation
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String detailGUID) Remove a "MoreInformation" relationship between two referenceables.void
clearResource
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String resourceGUID) Remove a "ResourceList" relationship between two referenceables.void
clearStakeholder
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String stakeholderGUID) Remove a "Stakeholder" relationship between two referenceables.getAssignedActors
(String userId, String scopeGUID, int startFrom, int pageSize) Retrieve the assigned actors linked by the "AssignmentScope" relationship between two referenceables.getAssignedScopes
(String userId, String elementGUID, int startFrom, int pageSize) Retrieve the assigned scopes linked by the "AssignmentScope" relationship between two referenceables.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.void
removeReferenceable
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, String urlTemplate, String methodName) Remove the metadata element.void
setupAssignmentScope
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, AssignmentScopeProperties properties, String scopeGUID) Create an "AssignmentScope" relationship between an element and its scope.void
setupMoreInformation
(String userId, String externalSourceGUID, String externalSourceName, 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 externalSourceGUID, String externalSourceName, 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 externalSourceGUID, String externalSourceName, String elementGUID, StakeholderProperties properties, String stakeholderGUID) Create a "Stakeholder" relationship between an element and its stakeholder.void
updateRelationship
(String userId, String externalSourceGUID, String externalSourceName, String primaryElementGUID, String primaryElementGUIDParameterName, RelationshipProperties properties, String secondaryElementGUID, String secondaryElementGUIDParameterName, boolean isMergeUpdate, String urlTemplate, String methodName) Update the properties of the relationship between two elements.
-
Field Details
-
propertyHelper
-
openMetadataStoreClient
-
baseURLTemplatePrefix
- See Also:
-
-
Constructor Details
-
CommunityProfileBaseClient
public CommunityProfileBaseClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog, int maxPageSize) 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 destinationmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
CommunityProfileBaseClient
public CommunityProfileBaseClient(String serverName, String serverPlatformURLRoot, int maxPageSize) 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
- maximum value allowed for page size- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
CommunityProfileBaseClient
public CommunityProfileBaseClient(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) 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
- maximum value allowed for page size- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
CommunityProfileBaseClient
public CommunityProfileBaseClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, int maxPageSize) 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 destinationmaxPageSize
- maximum value allowed for page size- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
CommunityProfileBaseClient
public CommunityProfileBaseClient(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient 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.
-
-
Method Details
-
updateRelationship
public void updateRelationship(String userId, String externalSourceGUID, String externalSourceName, String primaryElementGUID, String primaryElementGUIDParameterName, RelationshipProperties properties, String secondaryElementGUID, String secondaryElementGUIDParameterName, boolean isMergeUpdate, String urlTemplate, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of the relationship between two elements.- Parameters:
userId
- the name of the calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerprimaryElementGUID
- unique identifier of the primary elementprimaryElementGUIDParameterName
- name of parameter passing the primaryElementGUIDproperties
- describes the properties for the relationshipsecondaryElementGUID
- unique identifier of the element to connect it tosecondaryElementGUIDParameterName
- name of parameter passing the secondaryElementGUIDisMergeUpdate
- should the supplied properties be overlaid on the existing properties (true) or replace them (falseurlTemplate
- URL to call (no expected placeholders)methodName
- calling method- Throws:
InvalidParameterException
- one of the parameters is invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
removeReferenceable
public void removeReferenceable(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String elementGUIDParameterName, String urlTemplate, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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 externalSourceGUID, String externalSourceName, 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 userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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 externalSourceGUID, String externalSourceName, String elementGUID, String detailGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "MoreInformation" relationship between two referenceables.- Specified by:
clearMoreInformation
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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 externalSourceGUID, String externalSourceName, 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 userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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 externalSourceGUID, String externalSourceName, String elementGUID, String stakeholderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "Stakeholder" relationship between two referenceables.- Specified by:
clearStakeholder
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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)
-
setupAssignmentScope
public void setupAssignmentScope(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, AssignmentScopeProperties properties, String scopeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create an "AssignmentScope" relationship between an element and its scope.- Specified by:
setupAssignmentScope
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- unique identifier of the elementproperties
- properties of the relationshipscopeGUID
- unique identifier of the scope- 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)
-
clearAssignmentScope
public void clearAssignmentScope(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String scopeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove an "AssignmentScope" relationship between two referenceables.- Specified by:
clearAssignmentScope
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- unique identifier of the elementscopeGUID
- unique identifier of the scope- 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)
-
getAssignedScopes
public List<RelatedElement> getAssignedScopes(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the assigned scopes linked by the "AssignmentScope" relationship between two referenceables.- Specified by:
getAssignedScopes
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)
-
getAssignedActors
public List<RelatedElement> getAssignedActors(String userId, String scopeGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the assigned actors linked by the "AssignmentScope" relationship between two referenceables.- Specified by:
getAssignedActors
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userscopeGUID
- unique identifier of the scopestartFrom
- 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 externalSourceGUID, String externalSourceName, 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 userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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 externalSourceGUID, String externalSourceName, String elementGUID, String resourceGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a "ResourceList" relationship between two referenceables.- Specified by:
clearResource
in interfaceRelatedElementsManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- 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)
-