Package org.vx68k.webapp.manifest
Class WebAppManifestServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.vx68k.webapp.manifest.WebAppManifestServlet
-
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
- Direct Known Subclasses:
EditorManifestServlet
public class WebAppManifestServlet extends javax.servlet.http.HttpServletWeb app manifest servlet.This implementation takes the following initialization parameters:
nameshort_nameiconsandicons.*
- Since:
- 1.0
- Author:
- Kaz Nishimura
- See Also:
- Web App Manifest, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringICONSName of the initialization parameter for the icons of the application.static StringNAMEName of the initialization parameter for the name of the application.static StringSHORT_NAMEName of the initialization parameter for the short name of the application.
-
Constructor Summary
Constructors Constructor Description WebAppManifestServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ImageResource[]createIcons(javax.servlet.ServletConfig config)Creates a new array of icons from aServletConfigobject.protected static WebAppManifestcreateManifest(javax.servlet.ServletConfig config)Creates a new manifest from aServletConfigobject.voiddestroy()protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Serves the manifest as the response body.protected longgetLastModified(javax.servlet.http.HttpServletRequest request)WebAppManifestgetManifest()Creates and returns a copy of the manifest.voidinit(javax.servlet.ServletConfig config)voidsetManifest(WebAppManifest newManifest)Sets the manifest.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, service, service
-
-
-
-
Field Detail
-
NAME
public static final String NAME
Name of the initialization parameter for the name of the application.- See Also:
- Constant Field Values
-
SHORT_NAME
public static final String SHORT_NAME
Name of the initialization parameter for the short name of the application.- See Also:
- Constant Field Values
-
ICONS
public static final String ICONS
Name of the initialization parameter for the icons of the application.- See Also:
- Constant Field Values
-
-
Method Detail
-
getManifest
public final WebAppManifest getManifest()
Creates and returns a copy of the manifest.- Returns:
- a copy of the manifest
-
setManifest
public final void setManifest(WebAppManifest newManifest)
Sets the manifest.- Parameters:
newManifest- a new manifest
-
createManifest
protected static WebAppManifest createManifest(javax.servlet.ServletConfig config)
Creates a new manifest from aServletConfigobject.- Parameters:
config- aServletConfigobject- Returns:
- a new manifest
-
createIcons
protected static ImageResource[] createIcons(javax.servlet.ServletConfig config)
Creates a new array of icons from aServletConfigobject.- Parameters:
config- aServletConfigobject- Returns:
- a new array of icons
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOExceptionServes the manifest as the response body.- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
IOException- if an I/O exception has occurred
-
getLastModified
protected long getLastModified(javax.servlet.http.HttpServletRequest request)
- Overrides:
getLastModifiedin classjavax.servlet.http.HttpServlet
-
-