Class CAPTCHAResult

java.lang.Object
org.deltava.beans.system.CAPTCHAResult
All Implemented Interfaces:
Serializable, Cacheable

public class CAPTCHAResult extends Object implements Cacheable
A bean to store Google reCAPTCHA validation responses.
Since:
9.0
Version:
11.6
Author:
Luke
See Also:
  • Constructor Details

    • CAPTCHAResult

      public CAPTCHAResult(boolean isSuccess, String hostName)
      Creates the bean.
      Parameters:
      isSuccess - TRUE if successful, otherwise FALSE
      hostName - the remote host name
  • Method Details

    • getIsSuccess

      public boolean getIsSuccess()
      Returns if the challenge was successful.
      Returns:
      TRUE if successful, otherwise FALSE
    • getHostName

      public String getHostName()
      Returns the site host name.
      Returns:
      the host name
    • getChallengeTime

      public Instant getChallengeTime()
      Returns the CAPTCHA challenge time.
      Returns:
      the date/time
    • getMessages

      public Collection<String> getMessages()
      Returns any error/status messages.
      Returns:
      a Collection of messages
    • setChallengeTime

      public void setChallengeTime(Instant dt)
      Updates the date/time of the challenge.
      Parameters:
      dt - the date/time
    • addMessage

      public void addMessage(String msg)
      Adds an error message.
      Parameters:
      msg - a message
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object