Package org.ff4j.web

Class FF4jServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.ff4j.web.FF4jServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
Direct Known Subclasses:
FF4jDispatcherServlet

public class FF4jServlet extends jakarta.servlet.http.HttpServlet
Servlet initialisation to put FF4J in HTTP Session.
Author:
Cedrick LUNVEN
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Chabe behaviour in the user interface.
    protected boolean
    Chabe behaviour in the user interface.
    protected org.ff4j.FF4j
    instance of ff4j.
    protected org.ff4j.web.FF4jProvider
    initializing ff4j provider.
    static final org.slf4j.Logger
    Logger for this class.
    protected static Map<String,AbstractController>
    Mapping PATH <=> Controller
    Simple Operation.
    Static resource controller.
    protected org.thymeleaf.TemplateEngine
    Template engine.

    Fields inherited from class jakarta.servlet.http.HttpServlet

    LEGACY_DO_HEAD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.ff4j.FF4j
    Getter accessor for attribute 'ff4j'.
    void
    init(jakarta.servlet.ServletConfig servletConfig)
    Servlet initialization, init FF4J from "ff4jProvider" attribute Name.
    void
    setAskConfirmationBeforeDeleting(boolean askConfirmationBeforeDeleting)
    Setter accessor for attribute 'askConfirmationBeforeDeleting'.
    void
    setAskConfirmationBeforeToggling(boolean askConfirmationBeforeToggling)
    Setter accessor for attribute 'askConfirmationBeforeToggling'.
    void
    setFf4j(org.ff4j.FF4j ff4j)
    Setter accessor for attribute 'ff4j'.

    Methods inherited from class jakarta.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service

    Methods inherited from class jakarta.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
  • Field Details

    • LOGGER

      public static final org.slf4j.Logger LOGGER
      Logger for this class.
    • ff4j

      protected org.ff4j.FF4j ff4j
      instance of ff4j.
    • ff4jProvider

      protected org.ff4j.web.FF4jProvider ff4jProvider
      initializing ff4j provider.
    • askConfirmationBeforeDeleting

      protected boolean askConfirmationBeforeDeleting
      Chabe behaviour in the user interface.
    • askConfirmationBeforeToggling

      protected boolean askConfirmationBeforeToggling
      Chabe behaviour in the user interface.
    • templateEngine

      protected org.thymeleaf.TemplateEngine templateEngine
      Template engine.
    • staticResourceController

      protected StaticResourceController staticResourceController
      Static resource controller.
    • operationsController

      protected OperationsController operationsController
      Simple Operation.
    • mapOfControllers

      protected static Map<String,AbstractController> mapOfControllers
      Mapping PATH <=> Controller
  • Constructor Details

    • FF4jServlet

      public FF4jServlet()
  • Method Details

    • init

      public void init(jakarta.servlet.ServletConfig servletConfig) throws jakarta.servlet.ServletException
      Servlet initialization, init FF4J from "ff4jProvider" attribute Name.
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class jakarta.servlet.http.HttpServlet
      Parameters:
      servletConfig - current ServletConfig context
      Throws:
      jakarta.servlet.ServletException - error during servlet initialization
    • getFf4j

      public org.ff4j.FF4j getFf4j()
      Getter accessor for attribute 'ff4j'.
      Returns:
      current value of 'ff4j'
    • setFf4j

      public void setFf4j(org.ff4j.FF4j ff4j)
      Setter accessor for attribute 'ff4j'.
      Parameters:
      ff4j - new value for 'ff4j '
    • setAskConfirmationBeforeDeleting

      public void setAskConfirmationBeforeDeleting(boolean askConfirmationBeforeDeleting)
      Setter accessor for attribute 'askConfirmationBeforeDeleting'.
      Parameters:
      askConfirmationBeforeDeleting - new value for 'askConfirmationBeforeDeleting '
    • setAskConfirmationBeforeToggling

      public void setAskConfirmationBeforeToggling(boolean askConfirmationBeforeToggling)
      Setter accessor for attribute 'askConfirmationBeforeToggling'.
      Parameters:
      askConfirmationBeforeToggling - new value for 'askConfirmationBeforeToggling '