Package tigase.auth

# Class BruteForceLockerBean.BruteForceLockerVHostExtension

java.lang.Object
tigase.vhosts.VHostItemExtension<T>
tigase.vhosts.AbstractVHostItemExtension<BruteForceLockerBean.BruteForceLockerVHostExtension>
tigase.auth.BruteForceLockerBean.BruteForceLockerVHostExtension

All Implemented Interfaces:
  `VHostItemExtensionBackwardCompatible<BruteForceLockerBean.BruteForceLockerVHostExtension>`, `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`

Enclosing class:
  BruteForceLockerBean

public static class BruteForceLockerBean.BruteForceLockerVHostExtension extends AbstractVHostItemExtension<BruteForceLockerBean.BruteForceLockerVHostExtension> implements VHostItemExtensionBackwardCompatible<BruteForceLockerBean.BruteForceLockerVHostExtension>

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BruteForceLockerVHostExtension()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addCommandFields(String prefix, Packet packet, boolean forDefault)`
  Method adds custom extension fields to the ad-hoc form which will be sent to the user for filling with data required to create or update the VHost details.
  `long`
  `getDisableAccountAfterFailedAttempts()`
  `String`
  `getId()`
  Unique identifier of the extension.
  `long`
  `getLockAccountAfterFailedAttempt()`
  `long`
  `getLockTime()`
  `BruteForceLockerBean.Mode`
  `getMode()`
  `long`
  `getPeriodTime()`
  `void`
  `initFromCommand(String prefix, Packet packet)`
  Method initializes instance of a class with values provided by the user using ad-hoc command.
  `void`
  `initFromData(Map<String,Object> data)`
  `void`
  `initFromElement(Element item)`
  Method initializes instances of a class with values from the element which contains configuration loaded from the database.
  `boolean`
  `isEnabled()`
  `BruteForceLockerBean.BruteForceLockerVHostExtension`
  `mergeWithDefaults(BruteForceLockerBean.BruteForceLockerVHostExtension defaults)`
  Abstract method required to be implemented for merging values stored in this instance with default settings stored in the default virtual host item (global or default settings of the installation).
  `String`
  `toDebugString()`
  Returns a string containing all information about the instance of the extension useful for debugging.
  `Element`
  `toElement()`
  Method serializes data stored by this instance to element which will be then stored in the database.

  ### Methods inherited from class tigase.vhosts.AbstractVHostItemExtension

  `addBooleanFieldWithDefaultToCommand`

  ### Methods inherited from class tigase.vhosts.VHostItemExtension

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### ID

    public static final String ID
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### BruteForceLockerVHostExtension

    public BruteForceLockerVHostExtension()

- ## Method Details

  - ### isEnabled

    public boolean isEnabled()

  - ### getLockAccountAfterFailedAttempt

    public long getLockAccountAfterFailedAttempt()

  - ### getDisableAccountAfterFailedAttempts

    public long getDisableAccountAfterFailedAttempts()

  - ### getPeriodTime

    public long getPeriodTime()

  - ### getLockTime

    public long getLockTime()

  - ### getMode

    public BruteForceLockerBean.Mode getMode()

  - ### getId

    public String getId()
    Description copied from interface: `VHostItemExtensionIfc`
    Unique identifier of the extension. It has to be a valid XML element name!
    Specified by:
      `getId` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`

  - ### initFromElement

    public void initFromElement(Element item)
    Description copied from interface: `VHostItemExtensionIfc`
    Method initializes instances of a class with values from the element which contains configuration loaded from the database. see VHostItemExtensionIfc::toElement()
    Specified by:
      `initFromElement` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`
    Parameters:
      `item` - - provided element with data

  - ### initFromCommand

    public void initFromCommand(String prefix, Packet packet) throws IllegalArgumentException
    Description copied from interface: `VHostItemExtensionIfc`
    Method initializes instance of a class with values provided by the user using ad-hoc command.
    Specified by:
      `initFromCommand` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`
    Parameters:
      `prefix` - - prefix for data for fields added by this extension
      `packet` - - stanza with submitted ad-hoc command form
    Throws:
      `IllegalArgumentException`

  - ### toDebugString

    public String toDebugString()
    Description copied from interface: `VHostItemExtensionIfc`
    Returns a string containing all information about the instance of the extension useful for debugging.
    Specified by:
      `toDebugString` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`

  - ### toElement

    public Element toElement()
    Description copied from interface: `VHostItemExtensionIfc`
    Method serializes data stored by this instance to element which will be then stored in the database. Element name should be equal to the extension id.
    Specified by:
      `toElement` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`

  - ### addCommandFields

    public void addCommandFields(String prefix, Packet packet, boolean forDefault)
    Description copied from interface: `VHostItemExtensionIfc`
    Method adds custom extension fields to the ad-hoc form which will be sent to the user for filling with data required to create or update the VHost details.
    Specified by:
      `addCommandFields` in interface `VHostItemExtensionIfc<BruteForceLockerBean.BruteForceLockerVHostExtension>`
    Parameters:
      `prefix` - - prefix which should be used by each added field
      `packet` - - packet which will be sent to the user
      `forDefault` - - if true, we are preparing form for "default" configuration used by default by all vhosts.

  - ### initFromData

    public void initFromData(Map<String,Object> data)
    Specified by:
      `initFromData` in interface `VHostItemExtensionBackwardCompatible<BruteForceLockerBean.BruteForceLockerVHostExtension>`

  - ### mergeWithDefaults

    public BruteForceLockerBean.BruteForceLockerVHostExtension mergeWithDefaults(BruteForceLockerBean.BruteForceLockerVHostExtension defaults)
    Description copied from class: `VHostItemExtension`
    Abstract method required to be implemented for merging values stored in this instance with default settings stored in the default virtual host item (global or default settings of the installation).
    Specified by:
      `mergeWithDefaults` in class `VHostItemExtension<BruteForceLockerBean.BruteForceLockerVHostExtension>`
    Parameters:
      `defaults` - - instance of the extension with default values
    Returns:
      instance of the extension containing merged values