Interface DraftDataService


  • public interface DraftDataService
    DraftDataService service will get/delete/save user data (attachments and form data) filled with a draft instance of Form
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean deleteAttachment​(java.lang.String attachmentID)
      To delete an attachment
      boolean deleteData​(java.lang.String userDataID)
      To delete data associated with this draft
      byte[] getAttachment​(java.lang.String attachmentID)
      To get attachment bytes
      byte[] getData​(java.lang.String userDataID)
      Returns the user data stored against the ID passed as the argument
      java.lang.String saveAttachment​(byte[] attachmentBytes)
      Saves the attachment for current form instance
      java.lang.String saveData​(java.lang.String draftDataID, java.lang.String formName, java.lang.String formData)
      To save/modify user data for this userDataID, it will be null in case of creation
    • Method Detail

      • saveData

        java.lang.String saveData​(java.lang.String draftDataID,
                                  java.lang.String formName,
                                  java.lang.String formData)
                           throws FormsPortalException
        To save/modify user data for this userDataID, it will be null in case of creation
        Parameters:
        draftDataID - : unique identifier associated with the form data
        formName - : name of the form whose draft is being saved
        formData - : user data associated with this draft
        Returns:
        userdataID corresponding to which user data has been stored and which can be used later to retrieve this user data
        Throws:
        FormsPortalException
      • getData

        byte[] getData​(java.lang.String userDataID)
                throws FormsPortalException
        Returns the user data stored against the ID passed as the argument
        Parameters:
        userDataID - : unique data id for user data associated with a draft
        Returns:
        user data associated with this data ID
        Throws:
        FormsPortalException
      • deleteData

        boolean deleteData​(java.lang.String userDataID)
                    throws FormsPortalException
        To delete data associated with this draft
        Parameters:
        userDataID - : unique data id for data associated with a draft
        Returns:
        status of delete operation on data associated with this draft
        Throws:
        FormsPortalException
      • saveAttachment

        java.lang.String saveAttachment​(byte[] attachmentBytes)
                                 throws FormsPortalException
        Saves the attachment for current form instance
        Parameters:
        attachmentsBytes - : byte array of the attachment to be saved
        Returns:
        unique id (attachmentID) for the attachment just saved (so that it could be retrieved later)
        Throws:
        FormsPortalException
      • deleteAttachment

        boolean deleteAttachment​(java.lang.String attachmentID)
                          throws FormsPortalException
        To delete an attachment
        Parameters:
        attachmentID - : unique id for this attachment
        Returns:
        status of delete operation performed on attachment corresponding to this attachment ID
        Throws:
        FormsPortalException
      • getAttachment

        byte[] getAttachment​(java.lang.String attachmentID)
                      throws FormsPortalException
        To get attachment bytes
        Parameters:
        attachmentID - : unique id for this attachment
        Returns:
        data corresponding to this attachmentID
        Throws:
        FormsPortalException