Package com.logicaldoc.form
Class FormTool
- java.lang.Object
-
- com.logicaldoc.form.FormTool
-
public class FormTool extends Object
Utility methods to handle forms from within Automation- Since:
- 8.7
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description FormTool()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(long formId)
Deletes a formvoid
fill(com.logicaldoc.core.document.Document document)
Fills the form of a document with the values and updates the file of the current versionForm
findById(long formId)
Retrieves a form by it's identifierForm
findById(String formId)
Retrieves a form by it's alternate identifiervoid
store(Form form)
Saves / updates a form into the databaseString
webformEditUrl(long docId)
Builds the webform url for editing the responses after submitString
webformUrl(Form form)
Builds the webform url of a form
-
-
-
Method Detail
-
webformUrl
public String webformUrl(Form form)
Builds the webform url of a form- Parameters:
form
- the form- Returns:
- the webform permalink
-
webformEditUrl
public String webformEditUrl(long docId)
Builds the webform url for editing the responses after submit- Parameters:
docId
- identifier of the document with the previous responses- Returns:
- the webform editing link
-
findById
public Form findById(long formId)
Retrieves a form by it's identifier- Parameters:
formId
- identifier of the form- Returns:
- the form object
-
findById
public Form findById(String formId)
Retrieves a form by it's alternate identifier- Parameters:
formId
- identifier of the form- Returns:
- the form object
-
store
public void store(Form form)
Saves / updates a form into the database- Parameters:
form
- the form to save
-
delete
public void delete(long formId) throws Exception
Deletes a form- Parameters:
formId
- identifier of the form- Throws:
Exception
- a generic error happened
-
-