Package com.adobe.fd.fp.api.service
Interface DraftService
-
@ProviderType public interface DraftServiceInterface exposing the Draft SPI's in Forms Portal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandeleteDraft(java.lang.String draftId)java.util.List<DraftModel>getAllDraft(Query query)Method returns the list of all draft presentDraftModelgetDraft(java.lang.String draftId)Method returns the draft against the provided draftIdDraftModelgetDraft(java.lang.String draftId, Query query)Method returns the draft against the provided draftId and queryjava.lang.StringsaveDraft(DraftModel draftModel)Saves theDraftModelinto the storagejava.lang.StringsaveDraft(DraftModel draftModel, DraftOptions draftOptions)Saves theDraftModelinto the storagebooleanupdateDraft(java.lang.String draftId, DraftModel draftModel)Updates the draft against the provided draftId.
-
-
-
Method Detail
-
getDraft
DraftModel getDraft(java.lang.String draftId) throws FormsPortalException
Method returns the draft against the provided draftId- Parameters:
draftId- draftId against with draft needs to be fetched- Returns:
DraftModelas per the provided draftId- Throws:
FormsPortalException
-
getDraft
DraftModel getDraft(java.lang.String draftId, Query query) throws FormsPortalException
Method returns the draft against the provided draftId and query- Parameters:
draftId- draftId against with draft needs to be fetchedquery-Queryto define cut points, filtering etc- Returns:
DraftModelas per the provided draftId and query filter- Throws:
FormsPortalException
-
getAllDraft
java.util.List<DraftModel> getAllDraft(Query query) throws FormsPortalException
Method returns the list of all draft present- Parameters:
query-Queryto define cut points, filtering etc- Returns:
- list of
DraftModel - Throws:
FormsPortalException
-
saveDraft
java.lang.String saveDraft(DraftModel draftModel) throws FormsPortalException
Saves theDraftModelinto the storage- Parameters:
draftModel-DraftModelto be persisted- Returns:
- uniqueID generated corresponding to the model. Can be re-used while fetching the same
- Throws:
FormsPortalException
-
saveDraft
java.lang.String saveDraft(DraftModel draftModel, DraftOptions draftOptions) throws FormsPortalException
Saves theDraftModelinto the storage- Parameters:
draftModel-DraftModelto be persisteddraftOptions-DraftOptionsextra parameters required for draft save operation- Returns:
- uniqueID generated corresponding to the model. Can be re-used while fetching the same
- Throws:
FormsPortalException
-
updateDraft
boolean updateDraft(java.lang.String draftId, DraftModel draftModel) throws FormsPortalExceptionUpdates the draft against the provided draftId. Whole draftModel will be overridden by the one passed during method call- Parameters:
draftId- draftId whose model needs to be updateddraftModel-DraftModelthe new draft model- Returns:
- True if update was successful, else false
- Throws:
FormsPortalException
-
deleteDraft
boolean deleteDraft(java.lang.String draftId) throws FormsPortalException- Parameters:
draftId- draftId of the draft that needs to be deleted- Returns:
- True if update was successful, else false
- Throws:
FormsPortalException
-
-