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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Object
    creaErroreJson(int stato, String messaggio)
     
    void
    doOptions(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta)
     
    protected abstract void
    eventoLog(long milli, String operazione, String metodoRest)
     
    protected abstract Operazione<?,?>
    getOperazione(Map<String,Operazione<?,?>> esecutoriOperazione, Richiesta data)
     
    protected abstract TipoRestContenuto
     
    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 risposta

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpringRestServlet

      public SpringRestServlet()
  • Method Details

    • getOperazione

      protected abstract Operazione<?,?> getOperazione(Map<String,Operazione<?,?>> esecutoriOperazione, Richiesta data)
    • getTipoContenuto

      protected abstract TipoRestContenuto getTipoContenuto(Richiesta data)
    • eventoLog

      protected abstract void eventoLog(long milli, String operazione, String metodoRest)
    • init

      public void init(javax.servlet.ServletConfig c)
      Specified by:
      init in interface javax.servlet.Servlet
      Overrides:
      init in class javax.servlet.GenericServlet
    • doOptions

      public void doOptions(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta)
      Overrides:
      doOptions in class javax.servlet.http.HttpServlet
    • service

      public void service(javax.servlet.http.HttpServletRequest richiesta, javax.servlet.http.HttpServletResponse risposta)
      Overrides:
      service in class javax.servlet.http.HttpServlet
    • setIntestazioneRisposta

      protected void setIntestazioneRisposta(javax.servlet.http.HttpServletResponse risposta)
      Imposta le intestazioni di risposta
    • creaErroreJson

      protected Object creaErroreJson(int stato, String messaggio)
    • 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 prodotto
      risposta - risposta per impostare lo stato
      risultato - oggetto da convertire in xml
      Throws:
      IllegalArgumentException