public class PrivacyItem extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PrivacyItem.Type
Type defines if the rule is based on JIDs, roster groups or presence subscription types.
|
Modifier and Type | Field and Description |
---|---|
static String |
SUBSCRIPTION_BOTH
Value for subscription type rules.
|
static String |
SUBSCRIPTION_FROM |
static String |
SUBSCRIPTION_NONE |
static String |
SUBSCRIPTION_TO |
Constructor and Description |
---|
PrivacyItem(boolean allow,
int order)
Creates a new fall-through privacy item.
|
PrivacyItem(PrivacyItem.Type type,
String value,
boolean allow,
int order)
Creates a new privacy item.
|
Modifier and Type | Method and Description |
---|---|
int |
getOrder()
Returns the order where the receiver is processed.
|
PrivacyItem.Type |
getType()
Returns the type hold the kind of communication it will allow or block.
|
String |
getValue()
Returns the element identifier to apply the action.
|
boolean |
isAllow()
Returns the action associated with the item, it MUST be filled and will allow or deny
the communication.
|
boolean |
isFilterEverything()
Returns whether the receiver allows or denies every kind of communication.
|
boolean |
isFilterIQ()
Returns whether the receiver allow or deny incoming IQ stanzas or not.
|
boolean |
isFilterMessage()
Returns whether the receiver allows or denies incoming messages or not.
|
boolean |
isFilterPresenceIn()
Returns whether the receiver allows or denies incoming presence or not.
|
boolean |
isFilterPresenceOut()
Returns whether the receiver allows or denies incoming presence or not.
|
void |
setFilterIQ(boolean filterIQ)
Sets whether the receiver allows or denies incoming IQ stanzas or not.
|
void |
setFilterMessage(boolean filterMessage)
Sets wheather the receiver allows or denies incoming messages or not.
|
void |
setFilterPresenceIn(boolean filterPresenceIn)
Sets whether the receiver allows or denies incoming presence or not.
|
void |
setFilterPresenceOut(boolean filterPresenceOut)
Sets whether the receiver allows or denies outgoing presence or not.
|
String |
toXML()
Answer an xml representation of the receiver according to the RFC 3921.
|
public static final String SUBSCRIPTION_BOTH
public static final String SUBSCRIPTION_TO
public static final String SUBSCRIPTION_FROM
public static final String SUBSCRIPTION_NONE
public PrivacyItem(boolean allow, int order)
allow
- true if this is an allow itemorder
- the order of this privacy itempublic PrivacyItem(PrivacyItem.Type type, String value, boolean allow, int order)
type
- the type.value
- the value of the privacy itemallow
- true if this is an allow itemorder
- the order of this privacy itempublic boolean isAllow()
public boolean isFilterIQ()
public void setFilterIQ(boolean filterIQ)
filterIQ
- indicates if the receiver allows or denies incoming IQ stanzas.public boolean isFilterMessage()
public void setFilterMessage(boolean filterMessage)
filterMessage
- indicates if the receiver allows or denies incoming messages or not.public boolean isFilterPresenceIn()
public void setFilterPresenceIn(boolean filterPresenceIn)
filterPresenceIn
- indicates if the receiver allows or denies filtering incoming presence.public boolean isFilterPresenceOut()
public void setFilterPresenceOut(boolean filterPresenceOut)
filterPresenceOut
- indicates if the receiver allows or denies filtering outgoing presencepublic int getOrder()
public PrivacyItem.Type getType()
public String getValue()
public boolean isFilterEverything()