tigase.vhosts.filter

## Enum DomainFilterPolicy

- java.lang.Object
- - java.lang.Enum<DomainFilterPolicy>
  - - tigase.vhosts.filter.DomainFilterPolicy

- All Implemented Interfaces:
    Serializable, Comparable<DomainFilterPolicy>

      public enum DomainFilterPolicy
      extends Enum<DomainFilterPolicy>

  Enumeration of all possible filtering modes

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALL` user can communicate with anyone
    `BLACKLIST` user can communicate with anyone except of the users within listed domains
    `BLOCK` user can not communicate with anyone, account virtually disabled
    `CUSTOM` Custom rules defining communication policies in CSV (using semicolon) in the format of `rule_number;(allow|deny);[type_of_value];[value]` where `type_of_value::(jid)` 1|allow|self; 2|allow|jid|admin@test2.com; 3|allow|jid|pubsub@test.com; 4|deny|all;
    `LIST` user can communicate with users of the domains within listen domains
    `LOCAL` user can communicate with other local users (i.e. of the domains hosted on the same Tigase instance)
    `OWN` user can communicate with other users of the same domain

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isDomainListRequired()`
    `static DomainFilterPolicy` | `valueof(String domainFilteringPolicy)` Helper method returning proper defaults in case parsed value doesn't correspond to any of the available modes.
    `static DomainFilterPolicy` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static HashSet<String>` | `valuePoliciesWithDomainListStr()`
    `static DomainFilterPolicy[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.
    `static String[]` | `valuesStr()` Helper method to generate string array with mode values

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ALL

          public static final DomainFilterPolicy ALL

      user can communicate with anyone

    - #### LOCAL

          public static final DomainFilterPolicy LOCAL

      user can communicate with other local users (i.e. of the domains hosted on the same Tigase instance)

    - #### OWN

          public static final DomainFilterPolicy OWN

      user can communicate with other users of the same domain

    - #### LIST

          public static final DomainFilterPolicy LIST

      user can communicate with users of the domains within listen domains

    - #### BLACKLIST

          public static final DomainFilterPolicy BLACKLIST

      user can communicate with anyone except of the users within listed domains

    - #### CUSTOM

          public static final DomainFilterPolicy CUSTOM

      Custom rules defining communication policies in CSV (using semicolon) in the format of `rule_number;(allow|deny);[type_of_value];[value]` where `type_of_value::(jid)`

           1|allow|self;
           2|allow|jid|admin@test2.com;
           3|allow|jid|pubsub@test.com;
           4|deny|all;

    - #### BLOCK

          public static final DomainFilterPolicy BLOCK

      user can not communicate with anyone, account virtually disabled

  - ### Method Detail

    - #### values

          public static DomainFilterPolicy[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DomainFilterPolicy c : DomainFilterPolicy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static DomainFilterPolicy valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### valueof

          public static DomainFilterPolicy valueof(String domainFilteringPolicy)

      Helper method returning proper defaults in case parsed value doesn't correspond to any of the available modes.
      Parameters:
        `domainFilteringPolicy` - policy name as string
      Returns:
        enum value of corresponding mode, ALL if value doesn't match any mode or null for null parameter.

    - #### valuesStr

          public static String[] valuesStr()

      Helper method to generate string array with mode values
      Returns:
        String array with mode values

    - #### valuePoliciesWithDomainListStr

          public static HashSet<String> valuePoliciesWithDomainListStr()

    - #### isDomainListRequired

          public boolean isDomainListRequired()

Copyright © 2017 "Tigase, Inc.". All rights reserved.