Class ValidValueManagement
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
org.odpi.openmetadata.accessservices.communityprofile.client.ValidValueManagement
- All Implemented Interfaces:
RelatedElementsManagementInterface
,ValidValueManagementInterface
public class ValidValueManagement
extends CommunityProfileBaseClient
implements ValidValueManagementInterface
ValidValueManagerClient supports the APIs to maintain valid values and their related objects.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
baseURLTemplatePrefix, openMetadataStoreClient, propertyHelper
-
Constructor Summary
ConstructorDescriptionValidValueManagement
(String serverName, String serverPlatformURLRoot, int maxPageSize) Create a new client with no authentication embedded in the HTTP request.ValidValueManagement
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize) Create a new client that passes userId and password in each HTTP request.ValidValueManagement
(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.ValidValueManagement
(String serverName, String serverPlatformURLRoot, CommunityProfileRESTClient restClient, int maxPageSize) Create a new client that is going to be used in an OMAG Server.ValidValueManagement
(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
clearReferenceValueTag
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String validValueGUID) Remove a reference value assignment relationship between an element and a valid value.void
clearValidValueMember
(String userId, String externalSourceGUID, String externalSourceName, String validValueSetGUID, String validValueMemberGUID) Remove a membership relationship between a validValue and a validValueSet that it belongs to.void
clearValidValues
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String validValueGUID) Remove a valid value assignment relationship between an element and a valid value.createValidValue
(String userId, String externalSourceGUID, String externalSourceName, ValidValueProperties validValueProperties) Create a new metadata element to represent a valid value.findValidValues
(String userId, String searchString, int startFrom, int pageSize) Retrieve the list of metadata elements that contain the search string.getAllValidValues
(String userId, int startFrom, int pageSize) Retrieve the list of valid values.getAssigneesOfReferenceValue
(String userId, String validValueGUID, int startFrom, int pageSize) Return information about the person roles linked to a validValue.getConsumersOfValidValue
(String userId, String validValueGUID, int startFrom, int pageSize) Return information about the consumers linked to a validValue.getReferenceValues
(String userId, String elementGUID, int startFrom, int pageSize) Return information about the valid values linked as reference value tags to an element.getSetsForValidValue
(String userId, String validValueGUID, int startFrom, int pageSize) Page through the list of valid value sets that a valid value definition/set belongs to.getValidValueByGUID
(String userId, String validValueGUID) Retrieve the metadata element with the supplied unique identifier.getValidValuesByName
(String userId, String name, int startFrom, int pageSize) Retrieve the list of metadata elements with a matching qualified or display name.getValidValueSetMembers
(String userId, String validValueSetGUID, int startFrom, int pageSize) Page through the members of a valid value set.getValidValuesForConsumer
(String userId, String elementGUID) Return information about the valid value set linked to an element as its set of valid values.void
removeValidValue
(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID) Remove the metadata element representing a valid value.void
setupReferenceValueTag
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, ReferenceValueAssignmentProperties properties, String validValueGUID) Create a reference value assignment relationship between an element and a valid value to show that the valid value is a semiformal tag/classification.void
setupValidValueMember
(String userId, String externalSourceGUID, String externalSourceName, String validValueSetGUID, ValidValueMembershipProperties properties, String validValueMemberGUID) Create a membership relationship between a validValue and a validValueSet that it belongs to.void
setupValidValues
(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, ValidValueAssignmentProperties properties, String validValueGUID) Create a valid value assignment relationship between an element and a valid value (typically, a valid value set) to show that the valid value defines the values that can be stored in the data item that the element represents.void
updateValidValue
(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID, boolean isMergeUpdate, ValidValueProperties validValueProperties) Update the metadata element representing a valid value.Methods inherited from class org.odpi.openmetadata.accessservices.communityprofile.client.CommunityProfileBaseClient
clearAssignmentScope, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getMoreInformation, getResourceList, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupMoreInformation, setupResource, setupStakeholder, updateRelationship
-
Constructor Details
-
ValidValueManagement
public ValidValueManagement(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.
-
ValidValueManagement
public ValidValueManagement(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.
-
ValidValueManagement
public ValidValueManagement(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.
-
ValidValueManagement
public ValidValueManagement(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.
-
ValidValueManagement
public ValidValueManagement(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
-
createValidValue
public String createValidValue(String userId, String externalSourceGUID, String externalSourceName, ValidValueProperties validValueProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a new metadata element to represent a valid value.- Specified by:
createValidValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callervalidValueProperties
- properties about the valid value to store- Returns:
- unique identifier of the new valid value
- 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)
-
updateValidValue
public void updateValidValue(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID, boolean isMergeUpdate, ValidValueProperties validValueProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the metadata element representing a valid value. It is possible to use the subtype property classes or set up specialized properties in extended properties.- Specified by:
updateValidValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callervalidValueGUID
- unique identifier of the metadata element to updateisMergeUpdate
- should the new properties be merged with existing properties (true) or completely replace them (false)?validValueProperties
- new properties for the metadata element- 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)
-
setupValidValueMember
public void setupValidValueMember(String userId, String externalSourceGUID, String externalSourceName, String validValueSetGUID, ValidValueMembershipProperties properties, String validValueMemberGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a membership relationship between a validValue and a validValueSet that it belongs to.- Specified by:
setupValidValueMember
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callervalidValueSetGUID
- unique identifier of the valid value setproperties
- describes the properties of the membershipvalidValueMemberGUID
- unique identifier of the member- 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)
-
clearValidValueMember
public void clearValidValueMember(String userId, String externalSourceGUID, String externalSourceName, String validValueSetGUID, String validValueMemberGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a membership relationship between a validValue and a validValueSet that it belongs to.- Specified by:
clearValidValueMember
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callervalidValueSetGUID
- unique identifier of the valid value setvalidValueMemberGUID
- unique identifier of the member- 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)
-
setupValidValues
public void setupValidValues(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, ValidValueAssignmentProperties properties, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a valid value assignment relationship between an element and a valid value (typically, a valid value set) to show that the valid value defines the values that can be stored in the data item that the element represents.- Specified by:
setupValidValues
in interfaceValidValueManagementInterface
- 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
- describes the permissions that the role has in the validValuevalidValueGUID
- unique identifier of the valid value- 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)
-
clearValidValues
public void clearValidValues(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a valid value assignment relationship between an element and a valid value.- Specified by:
clearValidValues
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- unique identifier of the elementvalidValueGUID
- unique identifier of the valid value- 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)
-
setupReferenceValueTag
public void setupReferenceValueTag(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, ReferenceValueAssignmentProperties properties, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a reference value assignment relationship between an element and a valid value to show that the valid value is a semiformal tag/classification.- Specified by:
setupReferenceValueTag
in interfaceValidValueManagementInterface
- 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
- describes the quality of the assignmentvalidValueGUID
- unique identifier of the valid value- 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)
-
clearReferenceValueTag
public void clearReferenceValueTag(String userId, String externalSourceGUID, String externalSourceName, String elementGUID, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a reference value assignment relationship between an element and a valid value.- Specified by:
clearReferenceValueTag
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callerelementGUID
- unique identifier of the elementvalidValueGUID
- unique identifier of the valid value- 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)
-
removeValidValue
public void removeValidValue(String userId, String externalSourceGUID, String externalSourceName, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the metadata element representing a valid value.- Specified by:
removeValidValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of software capability representing the callerexternalSourceName
- unique name of software capability representing the callervalidValueGUID
- unique identifier of the metadata element to remove- 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)
-
findValidValues
public List<ValidValueElement> findValidValues(String userId, String searchString, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of metadata elements that contain the search string. The search string is treated as a regular expression.- Specified by:
findValidValues
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling usersearchString
- string to find in the propertiesstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata 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)
-
getValidValuesByName
public List<ValidValueElement> getValidValuesByName(String userId, String name, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Specified by:
getValidValuesByName
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling username
- name to search forstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata 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)
-
getAllValidValues
public List<ValidValueElement> getAllValidValues(String userId, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of valid values.- Specified by:
getAllValidValues
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- list of matching metadata 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)
-
getValidValueSetMembers
public List<ValidValueElement> getValidValueSetMembers(String userId, String validValueSetGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Page through the members of a valid value set.- Specified by:
getValidValueSetMembers
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling uservalidValueSetGUID
- unique identifier of the valid value setstartFrom
- paging starting pointpageSize
- maximum number of return values.- Returns:
- list of valid value beans
- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
getSetsForValidValue
public List<ValidValueElement> getSetsForValidValue(String userId, String validValueGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Page through the list of valid value sets that a valid value definition/set belongs to.- Specified by:
getSetsForValidValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling uservalidValueGUID
- unique identifier of valid value to querystartFrom
- paging starting pointpageSize
- maximum number of return values.- Returns:
- list of valid value beans
- Throws:
InvalidParameterException
- one of the parameters is invalid.UserNotAuthorizedException
- the user is not authorized to make this request.PropertyServerException
- the repository is not available or not working properly.
-
getValidValuesForConsumer
public ValidValueElement getValidValuesForConsumer(String userId, String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the valid value set linked to an element as its set of valid values.- Specified by:
getValidValuesForConsumer
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier for the element using the valid value set- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException
- name or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getConsumersOfValidValue
public List<RelatedElement> getConsumersOfValidValue(String userId, String validValueGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the consumers linked to a validValue.- Specified by:
getConsumersOfValidValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling uservalidValueGUID
- unique identifier for the validValuestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException
- name or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getReferenceValues
public List<ValidValueElement> getReferenceValues(String userId, String elementGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the valid values linked as reference value tags to an element.- Specified by:
getReferenceValues
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier for the elementstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of valid values
- Throws:
InvalidParameterException
- name or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getAssigneesOfReferenceValue
public List<RelatedElement> getAssigneesOfReferenceValue(String userId, String validValueGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the person roles linked to a validValue.- Specified by:
getAssigneesOfReferenceValue
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling uservalidValueGUID
- unique identifier for the validValuestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one)
- Throws:
InvalidParameterException
- name or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getValidValueByGUID
public ValidValueElement getValidValueByGUID(String userId, String validValueGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata element with the supplied unique identifier.- Specified by:
getValidValueByGUID
in interfaceValidValueManagementInterface
- Parameters:
userId
- calling uservalidValueGUID
- unique identifier of the requested metadata element- Returns:
- requested metadata element
- 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)
-