Class ValidValuesRESTServices

java.lang.Object
org.odpi.openmetadata.accessservices.assetowner.server.ValidValuesRESTServices

public class ValidValuesRESTServices extends Object
ValidValuesAssetOwner provides the API operations to create and maintain lists of valid value definitions grouped into a valid value set. Both valid value definitions and valid value sets have the same attributes and so inherit from ValidValue where all the attributes are defined. A set is just grouping of valid values. Valid value definitions and set can be nested many times in other valid value sets.
  • Constructor Details

    • ValidValuesRESTServices

      public ValidValuesRESTServices()
      Default constructor
  • Method Details

    • createValidValueSet

      public GUIDResponse createValidValueSet(String serverName, String userId, ValidValuesRequestBody requestBody)
      Create a new valid value set. This just creates the Set itself. Members are added either as they are created, or they can be attached to a set after they are created.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      requestBody - parameters for the new object.
      Returns:
      unique identifier for the new set or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • createValidValueDefinition

      public GUIDResponse createValidValueDefinition(String serverName, String userId, String setGUID, boolean isDefaultValue, ValidValuesRequestBody requestBody)
      Create a new valid value definition.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      setGUID - unique identifier of the set to attach this to.
      isDefaultValue - is this the default value for the set?
      requestBody - parameters to update.
      Returns:
      unique identifier for the new definition InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • updateValidValue

      public VoidResponse updateValidValue(String serverName, String userId, String validValueGUID, ValidValuesRequestBody requestBody)
      Update the properties of the valid value. All properties are updated. If only changing some if the properties, retrieve the current values from the repository and pass existing values back on this call if they are not to change.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      requestBody - parameters to update.
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • deleteValidValue

      public VoidResponse deleteValidValue(String serverName, String userId, String validValueGUID, String qualifiedName)
      Remove the valid value form the repository. All links to it are deleted too.
      Parameters:
      serverName - name of calling server
      userId - calling user
      validValueGUID - unique identifier of the value to delete
      qualifiedName - unique name of the value to delete. This is used to verify that the correct valid value is being deleted.
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • attachValidValueToSet

      public VoidResponse attachValidValueToSet(String serverName, String userId, String setGUID, String validValueGUID, boolean isDefaultValue, NullRequestBody requestBody)
      Create a link between a valid value set or definition and a set. This means the valid value is a member of the set.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      setGUID - unique identifier of the set.
      validValueGUID - unique identifier of the valid value to add to the set.
      isDefaultValue - is this the default value for the set?
      requestBody - null request body supplied to satisfy REST protocol
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • detachValidValueFromSet

      public VoidResponse detachValidValueFromSet(String serverName, String userId, String setGUID, String validValueGUID, NullRequestBody requestBody)
      Remove the link between a valid value and a set it is a member of.
      Parameters:
      serverName - name of calling server
      userId - calling user
      setGUID - owning set
      validValueGUID - unique identifier of the member to be removed.
      requestBody - null request body supplied to satisfy REST protocol
      Returns:
      void or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • getValidValueByGUID

      public ValidValueResponse getValidValueByGUID(String serverName, String userId, String validValueGUID)
      Retrieve a specific valid value from the repository.
      Parameters:
      serverName - name of calling server
      userId - calling user
      validValueGUID - unique identifier of the valid value.
      Returns:
      Valid value bean or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • getValidValueByName

      public ValidValuesResponse getValidValueByName(String serverName, String userId, String validValueName, int startFrom, int pageSize)
      Retrieve a specific valid value from the repository. Duplicates may be returned if multiple valid values have been assigned the same qualified name.
      Parameters:
      serverName - name of calling server
      userId - calling user
      validValueName - qualified name of the valid value.
      startFrom - starting element (used in paging through large result sets)
      pageSize - maximum number of results to return
      Returns:
      Valid value beans or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • findValidValues

      public ValidValuesResponse findValidValues(String serverName, String userId, int startFrom, int pageSize, FilterRequestBody requestBody)
      Locate valid values that match the search string. It considers the names, description, scope, usage and preferred value.
      Parameters:
      serverName - name of calling server
      userId - calling user
      requestBody - string value to look for - may contain RegEx characters.
      startFrom - paging starting point
      pageSize - maximum number of return values.
      Returns:
      list of valid value beans or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • getValidValueSetMembers

      public ValidValuesResponse getValidValueSetMembers(String serverName, String userId, String validValueSetGUID, int startFrom, int pageSize)
      Page through the members of a valid value set.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueSetGUID - unique identifier of the valid value set.
      startFrom - paging starting point
      pageSize - maximum number of return values.
      Returns:
      list of valid value beans or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.
    • getSetsForValidValue

      public ValidValuesResponse getSetsForValidValue(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of valid value sets that a valid value definition/set belongs to.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of valid value to query
      startFrom - paging starting point
      pageSize - maximum number of return values.
      Returns:
      list of valid value beans or InvalidParameterException one of the parameters is invalid or UserNotAuthorizedException the user is not authorized to make this request or PropertyServerException the repository is not available or not working properly.