Class SimpleCaptchaImpl

java.lang.Object
com.liferay.captcha.simplecaptcha.SimpleCaptchaImpl
All Implemented Interfaces:
com.liferay.portal.kernel.captcha.Captcha
Direct Known Subclasses:
ReCaptchaImpl

public class SimpleCaptchaImpl extends Object implements com.liferay.portal.kernel.captcha.Captcha
  • Field Details

    • captchaProvider

      protected CaptchaProvider captchaProvider
    • portal

      protected com.liferay.portal.kernel.util.Portal portal
    • release

      protected com.liferay.portal.kernel.model.Release release
    • servletContext

      protected jakarta.servlet.ServletContext servletContext
  • Constructor Details

    • SimpleCaptchaImpl

      public SimpleCaptchaImpl()
  • Method Details

    • check

      public void check(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException
      Specified by:
      check in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      com.liferay.portal.kernel.captcha.CaptchaException
    • check

      public void check(jakarta.portlet.PortletRequest portletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException
      Specified by:
      check in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      com.liferay.portal.kernel.captcha.CaptchaException
    • enforceCaptcha

      public void enforceCaptcha(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      enforceCaptcha in interface com.liferay.portal.kernel.captcha.Captcha
    • enforceCaptcha

      public void enforceCaptcha(jakarta.portlet.PortletRequest portletRequest)
      Specified by:
      enforceCaptcha in interface com.liferay.portal.kernel.captcha.Captcha
    • getName

      public String getName()
      Specified by:
      getName in interface com.liferay.portal.kernel.captcha.Captcha
    • isEnabled

      public boolean isEnabled(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      isEnabled in interface com.liferay.portal.kernel.captcha.Captcha
    • isEnabled

      public boolean isEnabled(jakarta.portlet.PortletRequest portletRequest)
      Specified by:
      isEnabled in interface com.liferay.portal.kernel.captcha.Captcha
    • render

      public void render(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) throws IOException
      Specified by:
      render in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      IOException
    • serveImage

      public void serveImage(jakarta.servlet.http.HttpServletRequest httpServletRequest, jakarta.servlet.http.HttpServletResponse httpServletResponse) throws IOException
      Specified by:
      serveImage in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      IOException
    • serveImage

      public String serveImage(OutputStream outputStream) throws IOException
      Specified by:
      serveImage in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      IOException
    • serveImage

      public void serveImage(jakarta.portlet.ResourceRequest resourceRequest, jakarta.portlet.ResourceResponse resourceResponse) throws IOException
      Specified by:
      serveImage in interface com.liferay.portal.kernel.captcha.Captcha
      Throws:
      IOException
    • getBackgroundProducer

      protected nl.captcha.backgrounds.BackgroundProducer getBackgroundProducer(CaptchaConfiguration captchaConfiguration)
    • getGimpyRenderer

      protected nl.captcha.gimpy.GimpyRenderer getGimpyRenderer(CaptchaConfiguration captchaConfiguration)
    • getHeight

      protected int getHeight(CaptchaConfiguration captchaConfiguration)
    • getNoiseProducer

      protected nl.captcha.noise.NoiseProducer getNoiseProducer(CaptchaConfiguration captchaConfiguration)
    • getSimpleCaptcha

      protected nl.captcha.Captcha getSimpleCaptcha()
    • getTaglibPath

      protected String getTaglibPath()
    • getTextProducer

      protected nl.captcha.text.producer.TextProducer getTextProducer(CaptchaConfiguration captchaConfiguration)
    • getWidth

      protected int getWidth(CaptchaConfiguration captchaConfiguration)
    • getWordRenderer

      protected nl.captcha.text.renderer.WordRenderer getWordRenderer(CaptchaConfiguration captchaConfiguration)
    • incrementCounter

      protected void incrementCounter(jakarta.servlet.http.HttpServletRequest httpServletRequest)
    • incrementCounter

      protected Integer incrementCounter(Integer count)
    • incrementCounter

      protected void incrementCounter(jakarta.portlet.PortletRequest portletRequest)
    • validateChallenge

      protected boolean validateChallenge(jakarta.servlet.http.HttpServletRequest httpServletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException
      Throws:
      com.liferay.portal.kernel.captcha.CaptchaException
    • validateChallenge

      protected boolean validateChallenge(jakarta.portlet.PortletRequest portletRequest) throws com.liferay.portal.kernel.captcha.CaptchaException
      Throws:
      com.liferay.portal.kernel.captcha.CaptchaException