public abstract class AbstractFD2TemplateServlet
extends javax.servlet.http.HttpServlet
| Modifier and Type | Field and Description | 
|---|---|
protected static org.slf4j.Logger | 
LOG  | 
| Constructor and Description | 
|---|
AbstractFD2TemplateServlet()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract FormTemplate | 
createFormTemplate(FD2Session session,
                  Map<String,String> pm)
Creates a new templates from the request and persists it. 
 | 
protected abstract boolean | 
deleteFormTemplate(FD2Session session,
                  long id)
Deletes the template with the given ID. 
 | 
protected void | 
doDelete(javax.servlet.http.HttpServletRequest req,
        javax.servlet.http.HttpServletResponse resp)  | 
protected void | 
doGet(javax.servlet.http.HttpServletRequest req,
     javax.servlet.http.HttpServletResponse resp)  | 
protected void | 
doPost(javax.servlet.http.HttpServletRequest req,
      javax.servlet.http.HttpServletResponse resp)  | 
protected void | 
doPut(javax.servlet.http.HttpServletRequest req,
     javax.servlet.http.HttpServletResponse resp)  | 
protected abstract FormTemplateFile | 
getFormTemplateFile(FD2Session session,
                   Long id)  | 
protected abstract boolean | 
getTagsAndTemplates(FD2Session session,
                   Long id,
                   List<FormTemplateTag> tags,
                   List<FormTemplate> templates)
Returns all available tags and adds the  
FormTemplate with the given ID to the list. | 
protected static List<String> | 
parseTags(Map<String,String> pm)  | 
protected void | 
setTemplateDataFromRequest(FormTemplate template,
                          Map<String,String> pm)  | 
protected abstract FormTemplate | 
updateFormTemplate(FD2Session session,
                  long id,
                  Map<String,String> pm)
Updates the template with the given ID. 
 | 
doHead, doOptions, doTrace, getLastModified, service, serviceprotected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse resp)
               throws javax.servlet.ServletException,
                      IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doDelete(javax.servlet.http.HttpServletRequest req,
                        javax.servlet.http.HttpServletResponse resp)
                 throws javax.servlet.ServletException,
                        IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse resp)
              throws javax.servlet.ServletException,
                     IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionprotected final void setTemplateDataFromRequest(FormTemplate template, Map<String,String> pm) throws IOException
IOExceptionprotected abstract FormTemplate createFormTemplate(FD2Session session, Map<String,String> pm)
session - pm - protected abstract boolean getTagsAndTemplates(FD2Session session, Long id, List<FormTemplateTag> tags, List<FormTemplate> templates)
FormTemplate with the given ID to the list.session - id - tags - templates - protected abstract FormTemplateFile getFormTemplateFile(FD2Session session, Long id)
protected abstract FormTemplate updateFormTemplate(FD2Session session, long id, Map<String,String> pm)
setTemplateDataFromRequest(FormTemplate, Map). To parse the tags from the request, use
 parseTags(Map).session - id - pm - protected abstract boolean deleteFormTemplate(FD2Session session, long id) throws RuntimeException
session - id - RuntimeExceptionCopyright © 2020 XIMA MEDIA GmbH. All rights reserved.