anon.client
Class TrustModel.TrustAttribute

java.lang.Object
  extended by anon.client.TrustModel.TrustAttribute
All Implemented Interfaces:
IXMLEncodable
Direct Known Subclasses:
Controller.ForcePremiumIfAccountAvailableAttribute, TrustModel.AnonLevelAttribute, TrustModel.ContextAttribute, TrustModel.DataRetentionAttribute, TrustModel.DelayAttribute, TrustModel.InternationalAttribute, TrustModel.NumberOfMixesAttribute, TrustModel.OperatorBlacklistAttribute, TrustModel.PremiumAttribute, TrustModel.SocksAttribute, TrustModel.SpeedAttribute, TrustModel.UserDefinedAttribute
Enclosing class:
TrustModel

public abstract static class TrustModel.TrustAttribute
extends java.lang.Object
implements IXMLEncodable


Field Summary
static int CATEGORY_DEFAULT
           
private  boolean m_bIgnoreNoDataAvailable
           
private  int m_category
           
private  java.lang.Object m_conditionValue
           
private  int m_trustCondition
           
static java.lang.String XML_ATTR_CONDITION_VALUE
           
static java.lang.String XML_ATTR_IGNORE_NO_DATA
           
static java.lang.String XML_ATTR_NAME
           
static java.lang.String XML_ATTR_TRUST_CONDITION
           
static java.lang.String XML_ELEMENT_NAME
           
static java.lang.String XML_VALUE_CONTAINER_ELEMENT_NAME
           
static java.lang.String XML_VALUE_ELEMENT_NAME
           
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
protected TrustModel.TrustAttribute(int a_trustCondition, java.lang.Object a_conditionValue, boolean a_bIgnoreNoDataAvailable)
           
 
Method Summary
abstract  void checkTrust(MixCascade a_cascade)
           
static TrustModel.TrustAttribute fromXmlElement(org.w3c.dom.Element a_e)
           
 int getCategory()
           
 java.lang.Object getConditionValue()
           
static int getDefaultValue()
           
static TrustModel.TrustAttribute getInstance(java.lang.Class a_attr, int a_trustCondition, java.lang.Object a_conditionValue, boolean a_bIgnoreNoDataAvailable)
           
 int getTrustCondition()
           
 boolean isNoDataIgnored()
           
 boolean isTrusted(MixCascade a_cascade)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Return an element that can be appended to the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_DEFAULT

public static final int CATEGORY_DEFAULT
See Also:
Constant Field Values

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
See Also:
Constant Field Values

XML_VALUE_ELEMENT_NAME

public static final java.lang.String XML_VALUE_ELEMENT_NAME
See Also:
Constant Field Values

XML_VALUE_CONTAINER_ELEMENT_NAME

public static final java.lang.String XML_VALUE_CONTAINER_ELEMENT_NAME
See Also:
Constant Field Values

XML_ATTR_NAME

public static final java.lang.String XML_ATTR_NAME
See Also:
Constant Field Values

XML_ATTR_TRUST_CONDITION

public static final java.lang.String XML_ATTR_TRUST_CONDITION
See Also:
Constant Field Values

XML_ATTR_CONDITION_VALUE

public static final java.lang.String XML_ATTR_CONDITION_VALUE
See Also:
Constant Field Values

XML_ATTR_IGNORE_NO_DATA

public static final java.lang.String XML_ATTR_IGNORE_NO_DATA
See Also:
Constant Field Values

m_category

private int m_category

m_bIgnoreNoDataAvailable

private boolean m_bIgnoreNoDataAvailable

m_trustCondition

private int m_trustCondition

m_conditionValue

private java.lang.Object m_conditionValue
Constructor Detail

TrustModel.TrustAttribute

protected TrustModel.TrustAttribute(int a_trustCondition,
                                    java.lang.Object a_conditionValue,
                                    boolean a_bIgnoreNoDataAvailable)
Method Detail

getDefaultValue

public static int getDefaultValue()

isNoDataIgnored

public boolean isNoDataIgnored()

getCategory

public final int getCategory()

getTrustCondition

public int getTrustCondition()

getConditionValue

public java.lang.Object getConditionValue()

isTrusted

public boolean isTrusted(MixCascade a_cascade)

checkTrust

public abstract void checkTrust(MixCascade a_cascade)
                         throws TrustException,
                                java.security.SignatureException
Throws:
TrustException
java.security.SignatureException

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Description copied from interface: IXMLEncodable
Return an element that can be appended to the document. This Method must not change the document in any way!

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - a document
Returns:
the interface as xml element

fromXmlElement

public static TrustModel.TrustAttribute fromXmlElement(org.w3c.dom.Element a_e)
                                                throws XMLParseException
Throws:
XMLParseException

getInstance

public static TrustModel.TrustAttribute getInstance(java.lang.Class a_attr,
                                                    int a_trustCondition,
                                                    java.lang.Object a_conditionValue,
                                                    boolean a_bIgnoreNoDataAvailable)