Package com.adobe.fd.fp.api.service
Interface DraftService
-
@ProviderType public interface DraftService
Interface exposing the Draft SPI's in Forms Portal
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
deleteDraft(java.lang.String draftId)
java.util.List<DraftModel>
getAllDraft(Query query)
Method returns the list of all draft presentDraftModel
getDraft(java.lang.String draftId)
Method returns the draft against the provided draftIdDraftModel
getDraft(java.lang.String draftId, Query query)
Method returns the draft against the provided draftId and queryjava.lang.String
saveDraft(DraftModel draftModel)
Saves theDraftModel
into the storagejava.lang.String
saveDraft(DraftModel draftModel, DraftOptions draftOptions)
Saves theDraftModel
into the storageboolean
updateDraft(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:
DraftModel
as 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
-Query
to define cut points, filtering etc- Returns:
DraftModel
as 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
-Query
to define cut points, filtering etc- Returns:
- list of
DraftModel
- Throws:
FormsPortalException
-
saveDraft
java.lang.String saveDraft(DraftModel draftModel) throws FormsPortalException
Saves theDraftModel
into the storage- Parameters:
draftModel
-DraftModel
to 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 theDraftModel
into the storage- Parameters:
draftModel
-DraftModel
to be persisteddraftOptions
-DraftOptions
extra 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 FormsPortalException
Updates 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
-DraftModel
the 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
-
-