Interface DraftMetadataService


  • public interface DraftMetadataService
    DraftMetadataService will get/delete/save metadata associated with a draft. Also it will list all the drafts for a user.
    • Method Detail

      • saveMetadata

        java.lang.String saveMetadata​(java.util.Map<java.lang.String,​java.lang.Object> draftMetadataPropMap)
                               throws FormsPortalException
        Parameters:
        draftMetaPropMap - : This map would expect draftID key with other metadata properties associated with draft
        Returns:
        draftID of the draft just saved
        Throws:
        FormsPortalException
      • deleteMetadata

        boolean deleteMetadata​(java.lang.String draftID)
                        throws FormsPortalException
        Parameters:
        draftID - : metadata identifier associated with draft
        Returns:
        status of delete operation just performed on draft metadata
        Throws:
        FormsPortalException
      • getDrafts

        JSONArray getDrafts​(java.lang.String cutPoints)
                     throws FormsPortalException
        Parameters:
        cutPoints - : comma separated string of cutPoints that tells about what set of properties of a draft is expected in the response
        Returns:
        a JSON Array of JSON Objects, each representing a draft instance. This list returned should be specific to logged-in user
        Throws:
        FormsPortalException
      • getProperty

        java.lang.String[] getProperty​(java.lang.String draftID,
                                       java.lang.String propertyName)
                                throws FormsPortalException
        Parameters:
        draftID - : identifier associated with draft
        propertyName - : name of 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 draft instance doesn't have this property then return an empty array. NEVER RETURN NULL.
        Throws:
        FormsPortalException
      • deleteProperty

        boolean deleteProperty​(java.lang.String draftID,
                               java.lang.String propertyName)
                        throws FormsPortalException
        Parameters:
        draftID - : Identifier associated with draft
        propertyName - : Name of metadata property queried for deletion
        Returns:
        status of operation performed to delete property with name "propertyName"
        Throws:
        FormsPortalException