Package tigase.vhosts.filter
Enum Class DomainFilterPolicy
- All Implemented Interfaces:
Serializable
,Comparable<DomainFilterPolicy>
,Constable
Enumeration of all possible filtering modes
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionuser can communicate with anyoneuser can communicate with anyone except of the users within listed domainsuser can not communicate with anyone, account virtually disabledCustom rules defining communication policies in CSV (using semicolon) in the format ofrule_number;(allow|deny);[type_of_value];[value]
wheretype_of_value::(jid)
user can communicate with users of the domains within listen domainsuser can communicate with other local users (i.e.user can communicate with other users of the same domain -
Method Summary
Modifier and TypeMethodDescriptionboolean
static DomainFilterPolicy
Helper method returning proper defaults in case parsed value doesn't correspond to any of the available modes.static DomainFilterPolicy
Returns the enum constant of this class with the specified name.static DomainFilterPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.static String[]
Helper method to generate string array with mode values
-
Enum Constant Details
-
ALL
user can communicate with anyone -
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 -
LIST
user can communicate with users of the domains within listen domains -
BLACKLIST
user can communicate with anyone except of the users within listed domains -
CUSTOM
Custom rules defining communication policies in CSV (using semicolon) in the format ofrule_number;(allow|deny);[type_of_value];[value]
wheretype_of_value::(jid)
1|allow|self; 2|allow|jid|admin@test2.com; 3|allow|jid|pubsub@test.com; 4|deny|all;
-
BLOCK
user can not communicate with anyone, account virtually disabled
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
valuePoliciesWithDomainListStr
-
valueof
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
Helper method to generate string array with mode values- Returns:
- String array with mode values
-
isDomainListRequired
public boolean isDomainListRequired()
-