Menu

ServletForms

Stephen Bromley

ServletForms

Web servlet used to handle all user specific actions.

Constructors

Methods

doPost:
Return type: Void

receives the post action from a jsp. Looks for a parameter in the request object called type. Depending on this value will call another method.

Expected type Values: createForm, getAllForms, updateForm, generatePDF

createForm:
Expected arguments: String theFormHtml, String userId, String theFormName
Return type: Boolean

Creates a form in the database with the provided name and linked to the given user. Calls [DatabaseCalls] createForm

getAllForms:
Expected arguments: String theUserId
Return type: Map(Integer, Form)

returns a map object of key integer form id value form of all the given users forms. Calls [DatabaseCalls] getAllForms.

updateForm:
Expected arguments: String theFormName, String theFormHtml, int theFormId, String theUserId
Return type: Boolean

Updates the given form with the provided data. Calls [DatabaseCalls] updateForm.

generatePDF:
Expected arguments: OutputStream out, String userID, int formID
Return type: Void

Attempt to generate pdf. Depricated. Calls [DatabaseCalls] generatePDF.


Related

Wiki: DatabaseCalls
Wiki: Home