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 ObjectcreaErroreJson(int stato, String messaggio) voiddoOptions(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) protected abstract voidprotected abstract Operazione<?,?> getOperazione(Map<String, Operazione<?, ?>> esecutoriOperazione, Richiesta data) protected abstract TipoRestContenutogetTipoContenuto(Richiesta data) voidinit(javax.servlet.ServletConfig c) static final voidscriviOggettoXML(OutputStream out, javax.servlet.http.HttpServletResponse risposta, Object risultato) voidservice(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) protected voidsetIntestazioneRisposta(javax.servlet.http.HttpServletResponse risposta) Imposta le intestazioni di rispostaMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doPost, doPut, doTrace, getLastModified, serviceMethods 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:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet
-
doOptions
public void doOptions(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) - Overrides:
doOptionsin classjavax.servlet.http.HttpServlet
-
service
public void service(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta) - Overrides:
servicein 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
-