Service de données de brouillon
Pour personnaliser le stockage des données utilisateur pour les brouillons, vous devez implémenter toutes les méthodes de l’interface DraftDataService
. L’exemple de code suivant décrit les méthodes et les arguments.
/**
* DraftDataService service will get/delete/save user data (attachments and form data) filled with a draft instance of Form
*/
public interface DraftDataService {
/**
* To save/modify user data for this userDataID, it will be null if there is creation
* @param draftDataID: unique identifier associated with the form data
* @param formName: name of the form whose draft is being saved
* @param formData: user data associated with this draft
* @return userdataID corresponding to which user data has been stored and which can be used later to retrieve this user data
* @throws FormsPortalException
*/
public String saveData (String draftDataID, String formName, String formData) throws FormsPortalException;
/**
* Returns the user data stored against the ID passed as the argument
* @param userDataID: unique data id for user data associated with a draft
* @return user data associated with this data ID
* @throws FormsPortalException
*/
public byte[] getData (String userDataID) throws FormsPortalException;
/**
* To delete data associated with this draft
* @param userDataID: unique data id for data associated with a draft
* @return status of delete operation on data associated with this draft
* @throws FormsPortalException
*/
public boolean deleteData (String userDataID) throws FormsPortalException;
/**
* Saves the attachment for current form instance
* @param attachmentsBytes: byte array of the attachment to be saved
* @return unique id (attachmentID) for the attachment just saved (so that it could be retrieved later)
* @throws FormsPortalException
*/
public String saveAttachment (byte[] attachmentBytes) throws FormsPortalException;
/**
* To delete an attachment
* @param attachmentID: unique id for this attachment
* @return status of delete operation performed on attachment corresponding to this attachment ID
* @throws FormsPortalException
*/
public boolean deleteAttachment (String attachmentID) throws FormsPortalException;
/**
* To get attachment bytes
* @param attachmentID: unique id for this attachment
* @return data corresponding to this attachmentID
* @throws FormsPortalException
*/
public byte[] getAttachment (String attachmentID) throws FormsPortalException;
}
La valeur minimale pour la longueur du champ d’ID du brouillon est de 26 caractères. Adobe recommande de définir la longueur de l’ID du brouillon sur 26 caractères ou plus.