Package tigase.server

## Class BasicComponent.ServerInfoVHostItemExtension

- java.lang.Object
- - tigase.vhosts.VHostItemExtension<T>
  - - tigase.vhosts.AbstractVHostItemExtension<BasicComponent.ServerInfoVHostItemExtension>
    - - tigase.server.BasicComponent.ServerInfoVHostItemExtension

- All Implemented Interfaces:
    `VHostItemExtensionIfc<BasicComponent.ServerInfoVHostItemExtension>`
  Enclosing class:
    BasicComponent

      public static class BasicComponent.ServerInfoVHostItemExtension
      extends AbstractVHostItemExtension<BasicComponent.ServerInfoVHostItemExtension>

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `BasicComponent.ServerInfoVHostItemExtension.ServerInfoVHostItemExtensionProvider` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `ID` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServerInfoVHostItemExtension()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addCommandFields​(java.lang.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.
    `java.util.List<java.lang.String>` | `getAbuseAddresses()` |
    `java.util.List<java.lang.String>` | `getAdminAddresses()` |
    `java.util.List<java.lang.String>` | `getFeedbackAddresses()` |
    `java.lang.String` | `getId()` | Unique identifier of the extension.
    `java.util.List<java.lang.String>` | `getSalesAddresses()` |
    `java.util.List<java.lang.String>` | `getSecurityAddresses()` |
    `java.util.List<java.lang.String>` | `getSupportAddresses()` |
    `void` | `initFromCommand​(java.lang.String prefix, Packet packet)` | Method initializes instance of a class with values provided by the user using ad-hoc command.
    `void` | `initFromElement​(Element item)` | Method initializes instances of a class with values from the element which contains configuration loaded from the database.
    `BasicComponent.ServerInfoVHostItemExtension` | `mergeWithDefaults​(BasicComponent.ServerInfoVHostItemExtension 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).
    `java.lang.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 Detail

    - #### ID

          public static final java.lang.String ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ServerInfoVHostItemExtension

          public ServerInfoVHostItemExtension()

  - ### Method Detail

    - #### getAbuseAddresses

          public java.util.List<java.lang.String> getAbuseAddresses()

    - #### getAdminAddresses

          public java.util.List<java.lang.String> getAdminAddresses()

    - #### getFeedbackAddresses

          public java.util.List<java.lang.String> getFeedbackAddresses()

    - #### getSalesAddresses

          public java.util.List<java.lang.String> getSalesAddresses()

    - #### getSecurityAddresses

          public java.util.List<java.lang.String> getSecurityAddresses()

    - #### getSupportAddresses

          public java.util.List<java.lang.String> getSupportAddresses()

    - #### getId

          public java.lang.String getId()

      Description copied from interface: `VHostItemExtensionIfc`
      Unique identifier of the extension. It has to be a valid XML element name!

    - #### 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()
      Parameters:
        `item` - - provided element with data

    - #### initFromCommand

          public void initFromCommand​(java.lang.String prefix,
                                      Packet packet)
                               throws java.lang.IllegalArgumentException

      Description copied from interface: `VHostItemExtensionIfc`
      Method initializes instance of a class with values provided by the user using ad-hoc command.
      Parameters:
        `prefix` - - prefix for data for fields added by this extension
        `packet` - - stanza with submitted ad-hoc command form
      Throws:
        `java.lang.IllegalArgumentException`

    - #### toDebugString

          public java.lang.String toDebugString()

      Description copied from interface: `VHostItemExtensionIfc`
      Returns a string containing all information about the instance of the extension useful for debugging.

    - #### 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.

    - #### addCommandFields

          public void addCommandFields​(java.lang.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.
      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.

    - #### mergeWithDefaults

          public BasicComponent.ServerInfoVHostItemExtension mergeWithDefaults​(BasicComponent.ServerInfoVHostItemExtension 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<BasicComponent.ServerInfoVHostItemExtension>`
      Parameters:
        `defaults` - - instance of the extension with default values
      Returns:
        instance of the extension containing merged values