Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip.xcap.model.commonpolicy
Class CommonPolicyParser

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.xcap.model.commonpolicy.CommonPolicyParser

public final class CommonPolicyParser
extends Object

Utility class that helps to converts common-policy xml to the object model and object model to the common-policy xml.

Author:
Grigorii Balutsel

Field Summary
static String ACTIONS_ELEMENT
          The actions element name.
static String CONDITIONS_ELEMENT
          The conditions element name.
static String EXCEPT_DOMAIN_ATTR
          The except domain element name.
static String EXCEPT_ELEMENT
          The except element name.
static String EXCEPT_ID_ATTR
          The except id element name.
static String IDENTITY_ELEMENT
          The identify element name.
static String MANY_DOMAIN_ATTR
          The many domain element name.
static String MANY_ELEMENT
          The many element name.
static String NAMESPACE
          The namespace of the common-policy.
static String ONE_ELEMENT
          The one element name.
static String ONE_ID_ATTR
          The one-id element name.
static String RULE_ELEMENT
          The rule element name.
static String RULE_ID_ATTR
          The rule id attribute element name.
static String RULESET_ELEMENT
          The ruleset element name.
static String SPHERE_ELEMENT
          The sphere element name.
static String SPHERE_VALUE_ATTR
          The sphere value element name.
static String TRANSFORMATIONS_ELEMENT
          The transformations element name.
static String VALIDITY_ELEMENT
          The validity element name.
static String VALIDITY_FROM_ELEMENT
          The validity-from element name.
static String VALIDITY_UNTIL_ELEMENT
          The validity-until element name.
 
Method Summary
static RulesetType fromXml(String xml)
          Creates ruleset object from the element.
static String toXml(RulesetType ruleset)
          Creates XML from the ruleset element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static String NAMESPACE
The namespace of the common-policy.


RULESET_ELEMENT

public static String RULESET_ELEMENT
The ruleset element name.


RULE_ELEMENT

public static String RULE_ELEMENT
The rule element name.


RULE_ID_ATTR

public static String RULE_ID_ATTR
The rule id attribute element name.


CONDITIONS_ELEMENT

public static String CONDITIONS_ELEMENT
The conditions element name.


ACTIONS_ELEMENT

public static String ACTIONS_ELEMENT
The actions element name.


TRANSFORMATIONS_ELEMENT

public static String TRANSFORMATIONS_ELEMENT
The transformations element name.


IDENTITY_ELEMENT

public static String IDENTITY_ELEMENT
The identify element name.


SPHERE_ELEMENT

public static String SPHERE_ELEMENT
The sphere element name.


SPHERE_VALUE_ATTR

public static String SPHERE_VALUE_ATTR
The sphere value element name.


VALIDITY_ELEMENT

public static String VALIDITY_ELEMENT
The validity element name.


VALIDITY_FROM_ELEMENT

public static String VALIDITY_FROM_ELEMENT
The validity-from element name.


VALIDITY_UNTIL_ELEMENT

public static String VALIDITY_UNTIL_ELEMENT
The validity-until element name.


ONE_ELEMENT

public static String ONE_ELEMENT
The one element name.


ONE_ID_ATTR

public static String ONE_ID_ATTR
The one-id element name.


MANY_ELEMENT

public static String MANY_ELEMENT
The many element name.


MANY_DOMAIN_ATTR

public static String MANY_DOMAIN_ATTR
The many domain element name.


EXCEPT_ELEMENT

public static String EXCEPT_ELEMENT
The except element name.


EXCEPT_ID_ATTR

public static String EXCEPT_ID_ATTR
The except id element name.


EXCEPT_DOMAIN_ATTR

public static String EXCEPT_DOMAIN_ATTR
The except domain element name.

Method Detail

fromXml

public static RulesetType fromXml(String xml)
                           throws ParsingException
Creates ruleset object from the element.

Parameters:
xml - the XML to analyze.
Returns:
the ruleset object.
Throws:
ParsingException - if there is some error during parsing.

toXml

public static String toXml(RulesetType ruleset)
                    throws ParsingException
Creates XML from the ruleset element.

Parameters:
ruleset - the ruleset to analyze.
Returns:
the ruleset xml.
Throws:
ParsingException - if there is some error during parsing.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.