Package it.ovunque.rest.servlet
Class SpringRestServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
it.ovunque.rest.servlet.SpringRestServlet
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
- Direct Known Subclasses:
BackendServlet
public abstract class SpringRestServlet
extends javax.servlet.http.HttpServlet
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
creaErroreJson
(int stato, String messaggio) void
doOptions
(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) protected abstract void
protected abstract Operazione<?,
?> getOperazione
(Map<String, Operazione<?, ?>> esecutoriOperazione, Richiesta data) protected abstract TipoRestContenuto
getTipoContenuto
(Richiesta data) void
init
(javax.servlet.ServletConfig c) static final void
scriviOggettoXML
(OutputStream out, javax.servlet.http.HttpServletResponse risposta, Object risultato) void
service
(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) protected void
setIntestazioneRisposta
(javax.servlet.http.HttpServletResponse risposta) Imposta le intestazioni di rispostaMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
SpringRestServlet
public SpringRestServlet()
-
-
Method Details
-
getOperazione
protected abstract Operazione<?,?> getOperazione(Map<String, Operazione<?, ?>> esecutoriOperazione, Richiesta data) -
getTipoContenuto
-
eventoLog
-
init
public void init(javax.servlet.ServletConfig c) - Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classjavax.servlet.GenericServlet
-
doOptions
public void doOptions(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) - Overrides:
doOptions
in classjavax.servlet.http.HttpServlet
-
service
public void service(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) - Overrides:
service
in classjavax.servlet.http.HttpServlet
-
setIntestazioneRisposta
protected void setIntestazioneRisposta(javax.servlet.http.HttpServletResponse risposta) Imposta le intestazioni di risposta -
creaErroreJson
-
scriviOggettoXML
public static final void scriviOggettoXML(OutputStream out, javax.servlet.http.HttpServletResponse risposta, Object risultato) throws IllegalArgumentException - Parameters:
out
- outputstream della risposta su cui stampare l'xml prodottorisposta
- risposta per impostare lo statorisultato
- oggetto da convertire in xml- Throws:
IllegalArgumentException
-