Class ReferenceDataRESTServices

java.lang.Object
org.odpi.openmetadata.accessservices.digitalarchitecture.server.ReferenceDataRESTServices

public class ReferenceDataRESTServices extends Object
ReferenceDataRESTServices 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

    • ReferenceDataRESTServices

      public ReferenceDataRESTServices()
      Default constructor
  • Method Details

    • createValidValueSet

      public GUIDResponse createValidValueSet(String serverName, String userId, ValidValueProperties 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, ValidValueProperties 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, boolean isMergeUpdate, ValidValueProperties 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.
      isMergeUpdate - should the new properties be merged with existing properties (true) or completely replace them (false)?
      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.
    • linkValidValueToImplementation

      public VoidResponse linkValidValueToImplementation(String serverName, String userId, String validValueGUID, String assetGUID, ValidValuesImplProperties requestBody)
      Link a valid value to an asset that provides the implementation. Typically, this method is used to link a valid value set to a code table.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      assetGUID - unique identifier of the asset that implements the valid value.
      requestBody - implementation relationship properties
      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.
    • classifyAssetAsReferenceData

      public VoidResponse classifyAssetAsReferenceData(String serverName, String userId, String assetGUID, NullRequestBody requestBody)
      Add the ReferenceData classification to an asset. IF the asset is already classified in this way, the method is a no-op.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      assetGUID - unique identifier of the asset that contains reference data.
      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.
    • unlinkValidValueFromImplementation

      public VoidResponse unlinkValidValueFromImplementation(String serverName, String userId, String validValueGUID, String assetGUID, NullRequestBody requestBody)
      Remove the link between a valid value and an implementing asset.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      assetGUID - unique identifier of the asset that used to implement the valid value.
      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.
    • declassifyAssetAsReferenceData

      public VoidResponse declassifyAssetAsReferenceData(String serverName, String userId, String assetGUID, NullRequestBody requestBody)
      Remove the ReferenceData classification form an Asset. If the asset was not classified in this way, this call is a no-op.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      assetGUID - unique identifier of asset.
      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.
    • assignValidValueToConsumer

      public VoidResponse assignValidValueToConsumer(String serverName, String userId, String validValueGUID, String consumerGUID, ValidValueAssignmentProperties requestBody)
      Link a valid value typically to a schema element or glossary term to show that it uses the valid values.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      consumerGUID - unique identifier of the element to link to.
      requestBody - request body supplied to pass the strictRequirement flag
      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.
    • unassignValidValueFromConsumer

      public VoidResponse unassignValidValueFromConsumer(String serverName, String userId, String validValueGUID, String consumerGUID, NullRequestBody requestBody)
      Remove the link between a valid value and a consumer.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      consumerGUID - unique identifier of the element to remove the link from.
      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.
    • assignReferenceValueToItem

      public VoidResponse assignReferenceValueToItem(String serverName, String userId, String validValueGUID, String referenceableGUID, ReferenceValueAssignmentProperties requestBody)
      Link a valid value as a reference value to a referencable to act as a tag/classification to help with locating and grouping the referenceable.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      referenceableGUID - unique identifier of the element to link to.
      requestBody - properties for the relationship.
      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.
    • unassignReferenceValueFromItem

      public VoidResponse unassignReferenceValueFromItem(String serverName, String userId, String validValueGUID, String referenceableGUID, NullRequestBody requestBody)
      Remove the reference value link between a valid value and a referenceable (item).
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValueGUID - unique identifier of the valid value.
      referenceableGUID - unique identifier of the element to remove the link from.
      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.
    • mapValidValues

      public VoidResponse mapValidValues(String serverName, String userId, String validValue1GUID, String validValue2GUID, ValidValuesMappingProperties requestBody)
      Link together 2 valid values from different sets that have equivalent values/meanings.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValue1GUID - unique identifier of the valid value.
      validValue2GUID - unique identifier of the other valid value to link to.
      requestBody - properties for the relationship.
      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.
    • unmapValidValues

      public VoidResponse unmapValidValues(String serverName, String userId, String validValue1GUID, String validValue2GUID, NullRequestBody requestBody)
      Remove the reference value link between a valid value and a referenceable (item).
      Parameters:
      serverName - name of calling server
      userId - calling user.
      validValue1GUID - unique identifier of the valid value.
      validValue2GUID - unique identifier of the other valid value element to remove the link from.
      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, NameRequestBody requestBody, 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
      requestBody - qualified name of the valid value.
      startFrom - paging starting point
      pageSize - maximum number of return values.
      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, SearchStringRequestBody requestBody, int startFrom, int pageSize)
      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.
    • getValidValuesAssignmentConsumers

      public ValidValueAssignmentConsumersResponse getValidValuesAssignmentConsumers(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of consumers for a valid value.
      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 consumers 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.
    • getValidValuesAssignmentDefinition

      public ValidValueAssignmentDefinitionsResponse getValidValuesAssignmentDefinition(String serverName, String userId, String referenceableGUID, int startFrom, int pageSize)
      Page through the list of valid values assigned to referenceable element.
      Parameters:
      serverName - name of calling server
      userId - calling user.
      referenceableGUID - unique identifier of anchoring referenceable
      startFrom - paging starting point
      pageSize - maximum number of return values.
      Returns:
      list of consumers 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.
    • getValidValuesImplementationAssets

      public ValidValuesImplAssetsResponse getValidValuesImplementationAssets(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of implementations for a valid value.
      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 asset 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.
    • getValidValuesImplementationDefinitions

      public ValidValuesImplDefinitionsResponse getValidValuesImplementationDefinitions(String serverName, String userId, String assetGUID, int startFrom, int pageSize)
      Page through the list of valid values defining the content of a reference data asset. This is always called from the assetHandler after it has checked that the asset is in the right zone.
      Parameters:
      serverName - name of calling server
      userId - calling user
      assetGUID - unique identifier of asset 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.
    • getValidValueMappings

      public ValidValueMappingsResponse getValidValueMappings(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of mappings for a valid value. These are other valid values from different valid value sets that are equivalent in some way. The association description covers the type of association.
      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 mappings to other 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.
    • getValidValuesMappings

      public ValidValuesMappingsResponse getValidValuesMappings(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of mapping relationships associated with a valid value. These are other valid values from different valid value sets that are equivalent in some way. The association description covers the type of association.
      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 mappings to other 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.
    • getReferenceValueAssignedItems

      public ReferenceValueAssignmentItemsResponse getReferenceValueAssignedItems(String serverName, String userId, String validValueGUID, int startFrom, int pageSize)
      Page through the list of referenceables that have this valid value as a reference value.
      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 referenceable 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.
    • getReferenceValueAssignments

      public ReferenceValueAssignmentDefinitionsResponse getReferenceValueAssignments(String serverName, String userId, String referenceableGUID, int startFrom, int pageSize)
      Page through the list of assigned reference values for a referenceable.
      Parameters:
      serverName - name of calling server
      userId - calling user
      referenceableGUID - unique identifier of assigned item
      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.