Package de.businesscode.bcdui.web.wrs
Class WrsServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- de.businesscode.bcdui.web.wrs.WrsServlet
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class WrsServlet extends javax.servlet.http.HttpServlet
Servlet for calling Wrs services GET: It turns a WrsRequest into SQL and returns a Wrs document with wrs:R rows POST: It turns a Wrs into updates of the database based on wrs:M wrs:D rows- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
maxRowsDefault
-
Constructor Summary
Constructors Constructor Description WrsServlet()
WrsServlet
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IDataWriter
createDataWriter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IRequestOptions options)
create data writerprotected void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static java.util.Map<java.lang.String,java.lang.Long>
getLastModifiedResourceMap()
void
init(javax.servlet.ServletConfig config)
protected void
tagUpdate(java.lang.String resourceUri)
tags a resource (which is set by pathInfo) with current millis, which is considered as a lastModified tag on that resourcestatic boolean
wasResourceModified(java.lang.String resourceUri, java.lang.Long lastReadStamp)
convenience methodstatic boolean
wasResourceModified(java.lang.String resourceUri, java.util.Date lastReadDate)
convenience method to check if given resource has been modified-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
getLastModifiedResourceMap
public static java.util.Map<java.lang.String,java.lang.Long> getLastModifiedResourceMap()
- Returns:
- the IMMUTABLE map containing lastModified resources with their timestamps
-
wasResourceModified
public static boolean wasResourceModified(java.lang.String resourceUri, java.util.Date lastReadDate)
convenience method to check if given resource has been modified- Parameters:
resourceUri
- Resource to be checkedlastReadDate
- if this parameter is NULL the method returns TRUE as is assumes the resource has never been read- Returns:
- true if the given resource has been modified
-
wasResourceModified
public static boolean wasResourceModified(java.lang.String resourceUri, java.lang.Long lastReadStamp)
convenience method- Parameters:
resourceUri
- Resource to be checkedlastReadStamp
- if this parameter is NULL the method returns TRUE as is assumes the resource has never been read- Returns:
- true if the given resource has been modified
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
- See Also:
GenericServlet.init(javax.servlet.ServletConfig)
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
doGet
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-
createDataWriter
protected IDataWriter createDataWriter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, IRequestOptions options)
create data writer- Parameters:
request
-response
-options
-- Returns:
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
javax.servlet.ServletException
java.io.IOException
- See Also:
HttpServlet.doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-
tagUpdate
protected void tagUpdate(java.lang.String resourceUri)
tags a resource (which is set by pathInfo) with current millis, which is considered as a lastModified tag on that resource- Parameters:
resourceUri
-
-
-