Class StewardshipActionRESTServices


  • public class StewardshipActionRESTServices
    extends Object
    The StewardshipActionRESTServices provides the server-side implementation of the Stewardship Action Open Metadata Assess Service (OMAS). This interface provides connections to assets and APIs for adding feedback on the asset.
    • Constructor Detail

      • StewardshipActionRESTServices

        public StewardshipActionRESTServices()
        Default constructor
    • Method Detail

      • getOutTopicConnection

        public ConnectionResponse getOutTopicConnection​(String serverName,
                                                        String userId,
                                                        String callerId)
        Return the connection object for the Stewardship Action OMAS's out topic.
        Parameters:
        serverName - name of the service to route the request to.
        userId - identifier of calling user.
        callerId - unique identifier of the caller
        Returns:
        connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the discovery engine definition.
      • linkElementsAsDuplicates

        public VoidResponse linkElementsAsDuplicates​(String serverName,
                                                     String userId,
                                                     String element1GUID,
                                                     String element2GUID,
                                                     DuplicatesRequestBody requestBody)
        Create a simple relationship between two elements. These elements must be of the same type. If the relationship already exists, the properties are updated.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        element1GUID - unique identifier of first element
        element2GUID - unique identifier of second element
        requestBody - parameters for the relationship
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • unlinkElementsAsDuplicates

        public VoidResponse unlinkElementsAsDuplicates​(String serverName,
                                                       String userId,
                                                       String element1GUID,
                                                       String element2GUID,
                                                       NullRequestBody requestBody)
        Remove the relationship between two elements that marks them as duplicates.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        element1GUID - unique identifier of first element
        element2GUID - unique identifier of second element
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • markElementAsKnownDuplicate

        public VoidResponse markElementAsKnownDuplicate​(String serverName,
                                                        String userId,
                                                        String elementGUID,
                                                        NullRequestBody requestBody)
        Classify an element as a known duplicate. This will mean that it is included in duplicate processing during metadata retrieval requests.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid, or the elements are of different types PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • unmarkElementAsKnownDuplicate

        public VoidResponse unmarkElementAsKnownDuplicate​(String serverName,
                                                          String userId,
                                                          String elementGUID,
                                                          NullRequestBody requestBody)
        Remove the classification that identifies this element as a known duplicate.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - unique identifier of the element
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getPeerDuplicates

        public DuplicatesResponse getPeerDuplicates​(String serverName,
                                                    String userId,
                                                    String elementGUID,
                                                    int startFrom,
                                                    int pageSize)
        List the elements that are linked as peer duplicates to the requested element.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - element to query
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of linked duplicates or InvalidParameterException one of the parameters is null or invalid PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • markAsConsolidatedDuplicate

        public VoidResponse markAsConsolidatedDuplicate​(String serverName,
                                                        String userId,
                                                        String consolidatedDuplicateGUID,
                                                        DuplicatesRequestBody requestBody)
        Mark an element as a consolidated duplicate (or update the properties if it is already marked as such). This method assumes that a standard create method has been used to create the element first using the values from contributing elements. It is just adding the ConsolidatedDuplicate classification to the element.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        consolidatedDuplicateGUID - unique identifier of the element that contains the consolidated information from a collection of elements that are all duplicates of one another.
        requestBody - properties for the relationship
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • linkElementToConsolidatedDuplicate

        public VoidResponse linkElementToConsolidatedDuplicate​(String serverName,
                                                               String userId,
                                                               String consolidatedDuplicateGUID,
                                                               String contributingElementGUID,
                                                               NullRequestBody requestBody)
        Create a ConsolidatedDuplicateLink relationship between the consolidated duplicate element and one of its contributing element.
        Parameters:
        serverName - name of the service to route the request to
        userId - calling user
        consolidatedDuplicateGUID - unique identifier of consolidated duplicate
        contributingElementGUID - unique identifier of duplicate element
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • unlinkElementFromConsolidatedDuplicate

        public VoidResponse unlinkElementFromConsolidatedDuplicate​(String serverName,
                                                                   String userId,
                                                                   String consolidatedDuplicateGUID,
                                                                   String contributingElementGUID,
                                                                   NullRequestBody requestBody)
        Remove the relationship between two elements that marks them as duplicates.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        consolidatedDuplicateGUID - unique identifier of consolidated duplicate
        contributingElementGUID - unique identifier of duplicate element
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getContributingDuplicates

        public ElementStubsResponse getContributingDuplicates​(String serverName,
                                                              String userId,
                                                              String consolidatedDuplicateGUID,
                                                              int startFrom,
                                                              int pageSize)
        List the elements that are contributing to a consolidating duplicate element.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        consolidatedDuplicateGUID - element to query
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of contributing duplicates or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • getConsolidatedDuplicate

        public ElementStubResponse getConsolidatedDuplicate​(String serverName,
                                                            String userId,
                                                            String elementGUID)
        Return details of the consolidated duplicate for a requested element.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        elementGUID - element to query
        Returns:
        header of consolidated duplicated or null if none or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
      • removeConsolidatedDuplicate

        public VoidResponse removeConsolidatedDuplicate​(String serverName,
                                                        String userId,
                                                        String consolidatedDuplicateGUID,
                                                        NullRequestBody requestBody)
        Remove the consolidated duplicate element and the links to the elements that contributed to its values.
        Parameters:
        serverName - name of the service to route the request to.
        userId - calling user
        consolidatedDuplicateGUID - unique identifier of element to remove
        requestBody - null request body
        Returns:
        void or InvalidParameterException one of the parameters is null or invalid or the elements are not linked as duplicates PropertyServerException problem accessing property server UserNotAuthorizedException security access problem