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, service
protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doDelete(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doDelete
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected void doPut(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
doPut
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
protected final void setTemplateDataFromRequest(FormTemplate template, Map<String,String> pm) throws IOException
IOException
protected 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
- RuntimeException
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.