Interface SubmitMetadataService


  • public interface SubmitMetadataService
    SubmitMetadataService will get/delete/save metadata associated with a form submission. Also it will list all the submissions of a user.
    • Method Detail

      • submitMetadata

        JSONObject submitMetadata​(java.util.Map<java.lang.String,​java.lang.Object> submittedMetaPropMap)
                           throws FormsPortalException
        Parameters:
        submittedMetaPropMap - : consists of all the metadata information regarding this form submission instance
        Returns:
        The metadata object of submitted form in JSON format. For adaptive form, this object will also be used for redirect URL creation
        Throws:
        FormsPortalException
      • submitMetadataAsynchronously

        JSONObject submitMetadataAsynchronously​(java.util.Map<java.lang.String,​java.lang.Object> submittedMetaPropMap)
                                         throws FormsPortalException
        Saves the metadata asynchronously with owner info being passed in the map itself
        Parameters:
        submittedMetaPropMap - consists of all the metadata information regarding this form submission instance
        Returns:
        The metadata object of submitted form in JSON format.
        Throws:
        FormsPortalException
      • deleteMetadata

        boolean deleteMetadata​(java.lang.String submitID)
                        throws FormsPortalException
        Parameters:
        submitID - : metadata identifier associated with this submission
        Returns:
        status of delete operation on submitted Metadata
        Throws:
        FormsPortalException
      • getSubmissions

        JSONArray getSubmissions​(java.lang.String cutPoints)
                          throws FormsPortalException
        Parameters:
        cutPoints - : comma separated string of cutPoints that tells about what set of properties of a submission is expected in the response
        Returns:
        list of submitted Forms' metadata objects so that they could be shown on forms portal UI
        Throws:
        FormsPortalException
      • getProperty

        java.lang.String[] getProperty​(java.lang.String submitID,
                                       java.lang.String propertyName)
                                throws FormsPortalException
        Parameters:
        submitID - : identifier associated with this submission
        propertyName - : name of the metadata property queried to get
        Returns:
        property value. In case this is a multivalued property, return a string array consisting of all the values. If this is a single valued property return an array with only one value. If this submission instance doesn't have this property then return an empty array. NEVER RETURN NULL.
        Throws:
        FormsPortalException
      • deleteProperty

        boolean deleteProperty​(java.lang.String submitID,
                               java.lang.String propertyName)
                        throws FormsPortalException
        Parameters:
        submitID - : identifier associated with this submission
        propertyName - : name of the metadata property queried for deletion
        Returns:
        status of operation performed to delete property with name "propertyName"
        Throws:
        FormsPortalException
      • getSubmissionsOfAllUsers

        JSONObject getSubmissionsOfAllUsers​(java.lang.String formPath,
                                            java.lang.String cutPoints,
                                            java.util.Map<java.lang.String,​java.lang.String> searchOptions)
                                     throws FormsPortalException
        Parameters:
        formPath - : Path of the form, whose submissions you want to get listed. Path is the unique identifier of a form
        cutPoints - : What set of properties you'd want to get listed of submissions
        searchOptions - : This would contain 4 keys basically. 1. limit: Page size i.e. total number of results a page can show 2. offset: Start index in total results set 3. orderby: Sorting submissions list based on this property 4. sort: Ascending or descending order
        Returns:
        A JSON array which would contain submissions object
        Throws:
        FormsPortalException
      • addComment

        java.lang.String addComment​(java.lang.String submitID,
                                    java.lang.String commentContent,
                                    java.lang.String owner)
                             throws FormsPortalException
        Parameters:
        submitID - : Identification number of this submission instance (basically metadata id of this submission)
        commentContent - : content of the comment
        owner - : Principal Name of the person who made this comment. If owner information is null, please get this information from current session object
        Returns:
        Id of this comment
        Throws:
        FormsPortalException
      • getFormsForSubmissionReview

        JSONArray getFormsForSubmissionReview()
                                       throws FormsPortalException
        Returns:
        A JSON Array of Form Objects. Each one of them would consist of formName and formPath attributes. Please note, the list of forms returned should be the one for whom loggged-in reviewer is authorized to review
        Throws:
        FormsPortalException
      • getAllComments

        JSONArray getAllComments​(java.lang.String submitID)
                          throws FormsPortalException
        Parameters:
        submitID - : metadata ID of submission whose review comments are requested
        Returns:
        A JSON Array consisting of comment objects.
        Throws:
        FormsPortalException