Class ValidValuesOnboardingResource

java.lang.Object
org.odpi.openmetadata.accessservices.assetowner.server.spring.ValidValuesOnboardingResource

@RestController @RequestMapping("/servers/{serverName}/open-metadata/access-services/asset-owner/users/{userId}") public class ValidValuesOnboardingResource extends Object
ValidValuesOnboardingResource 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

    • ValidValuesOnboardingResource

      public ValidValuesOnboardingResource()
      Default constructor
  • Method Details

    • createValidValueSet

      @PostMapping(path="/valid-values/new-set") public GUIDResponse createValidValueSet(@PathVariable String serverName, @PathVariable String userId, @RequestBody 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

      @PostMapping(path="/valid-values/new-definition/{setGUID}") public GUIDResponse createValidValueDefinition(@PathVariable String serverName, @PathVariable String userId, @PathVariable String setGUID, @RequestParam(required=false,defaultValue="false") boolean isDefaultValue, @RequestBody 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 for the new object.
      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

      @PostMapping(path="/valid-values/{validValueGUID}/update") public VoidResponse updateValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestBody ValidValuesRequestBody requestBody)
      Update the properties of the valid value. All properties are updated. If only changing some 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

      @PostMapping(path="/valid-values/{validValueGUID}/delete") public VoidResponse deleteValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestBody 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

      @PostMapping(path="/valid-values/sets/{setGUID}/members/{validValueGUID}") public VoidResponse attachValidValueToSet(@PathVariable String serverName, @PathVariable String userId, @PathVariable String setGUID, @PathVariable String validValueGUID, @RequestParam(required=false,defaultValue="false") boolean isDefaultValue, @RequestBody(required=false) 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

      @PostMapping(path="/valid-values/sets/{setGUID}/members/{validValueGUID}/delete") public VoidResponse detachValidValueFromSet(@PathVariable String serverName, @PathVariable String userId, @PathVariable String setGUID, @PathVariable String validValueGUID, @RequestBody(required=false) 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

      @GetMapping(path="/valid-values/{validValueGUID}") public ValidValueResponse getValidValueByGUID(@PathVariable String serverName, @PathVariable String userId, @PathVariable 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

      @PostMapping(path="/valid-values/by-name") public ValidValuesResponse getValidValueByName(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestBody String validValueName)
      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
      startFrom - paging starting point
      pageSize - maximum number of return values.
      validValueName - qualified name of the valid value.
      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

      @PostMapping(path="/valid-values/by-search-string") public ValidValuesResponse findValidValues(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startFrom, @RequestParam int pageSize, @RequestBody String searchString)
      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
      startFrom - paging starting point
      pageSize - maximum number of return values.
      searchString - string value to look for - may contain RegEx characters.
      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

      @GetMapping(path="/valid-values/sets/{validValueSetGUID}/members") public ValidValuesResponse getValidValueSetMembers(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueSetGUID, @RequestParam int startFrom, @RequestParam 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

      @GetMapping(path="/valid-values/{validValueGUID}/set-membership") public ValidValuesResponse getSetsForValidValue(@PathVariable String serverName, @PathVariable String userId, @PathVariable String validValueGUID, @RequestParam int startFrom, @RequestParam 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.