anon.infoservice
Class TermsAndConditions

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.AbstractDistributableDatabaseEntry
          extended by anon.infoservice.AbstractDistributableCertifiedDatabaseEntry
              extended by anon.infoservice.TermsAndConditions
All Implemented Interfaces:
ICertifiedDatabaseEntry, IDistributable, anon.util.IXMLEncodable

public class TermsAndConditions
extends AbstractDistributableCertifiedDatabaseEntry


Nested Class Summary
 
Nested classes/interfaces inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
AbstractDistributableDatabaseEntry.SerialDBEntry, AbstractDistributableDatabaseEntry.Serials
 
Field Summary
static java.lang.String HTTP_REQUEST_STRING
           
static java.lang.String HTTP_SERIALS_REQUEST_STRING
           
 java.util.Date m_date
           
 long m_lastUpdate
           
 java.lang.String m_locale
           
 java.lang.String m_referenceId
           
 long m_serial
           
 java.lang.String m_ski
           
 java.lang.String m_strId
           
static java.lang.String POST_FILE
           
static int TERMS_AND_CONDITIONS_TTL
           
static java.lang.String XML_ATTR_DATE
           
static java.lang.String XML_ATTR_TIME_ACCEPTED
           
static java.lang.String XML_ELEMENT_CONTAINER_NAME
           
static java.lang.String XML_ELEMENT_NAME
           
 
Fields inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
XML_ATTR_LAST_UPDATE, XML_ATTR_SERIAL, XML_ATTR_VALID, XML_ATTR_VERIFIED
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_LAST_UPDATE
 
Fields inherited from interface anon.infoservice.IDistributable
FIELD_HTTP_REQUEST_STRING, FIELD_HTTP_SERIALS_REQUEST_STRING
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_VERSION
 
Constructor Summary
TermsAndConditions(org.w3c.dom.Document a_doc, boolean a_bJAPContext)
           
TermsAndConditions(org.w3c.dom.Element a_elem)
           
 
Method Summary
 boolean checkId()
          Checks if the ID is valid.
 boolean equals(java.lang.Object a_object)
           
static TermsAndConditions getById(java.lang.String a_id, java.util.Locale a_locale)
           
 anon.crypto.MultiCertPath getCertPath()
           
 java.util.Date getDate()
           
 org.w3c.dom.Document getDocument()
           
 java.lang.String getId()
          Returns a unique ID for a database entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 java.lang.String getLocale()
           
 java.lang.String getPostFile()
          Returns the filename (InfoService command) to which the data of this entry is posted at the other infoservice.
 java.lang.String getReferenceId()
           
 anon.crypto.XMLSignature getSignature()
           
 java.lang.String getSKI()
           
 long getVersionNumber()
          Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).
 org.w3c.dom.Element getXmlStructure()
          Returns the XML structure for this db entry.
 int hashCode()
           
 boolean isValid()
           
 boolean isVerified()
          Returns if this entry has been verified with a certificate chain.
 
Methods inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
getHttpRequestString, getHttpSerialsRequestString, getPostData, getPostEncoding, toXmlElement
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
getCreationTime, getExpireTime, isNewerThan, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TERMS_AND_CONDITIONS_TTL

public static int TERMS_AND_CONDITIONS_TTL

XML_ATTR_TIME_ACCEPTED

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

XML_ATTR_DATE

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

XML_ELEMENT_CONTAINER_NAME

public static java.lang.String XML_ELEMENT_CONTAINER_NAME

XML_ELEMENT_NAME

public static java.lang.String XML_ELEMENT_NAME

HTTP_REQUEST_STRING

public static java.lang.String HTTP_REQUEST_STRING

HTTP_SERIALS_REQUEST_STRING

public static java.lang.String HTTP_SERIALS_REQUEST_STRING

POST_FILE

public static java.lang.String POST_FILE

m_strId

public java.lang.String m_strId

m_ski

public java.lang.String m_ski

m_referenceId

public java.lang.String m_referenceId

m_locale

public java.lang.String m_locale

m_date

public java.util.Date m_date

m_lastUpdate

public long m_lastUpdate

m_serial

public long m_serial
Constructor Detail

TermsAndConditions

public TermsAndConditions(org.w3c.dom.Element a_elem)
                   throws anon.util.XMLParseException
Throws:
anon.util.XMLParseException

TermsAndConditions

public TermsAndConditions(org.w3c.dom.Document a_doc,
                          boolean a_bJAPContext)
                   throws anon.util.XMLParseException
Throws:
anon.util.XMLParseException
Method Detail

checkId

public boolean checkId()
Description copied from class: AbstractDistributableCertifiedDatabaseEntry
Checks if the ID is valid.

Specified by:
checkId in interface ICertifiedDatabaseEntry
Overrides:
checkId in class AbstractDistributableCertifiedDatabaseEntry
Returns:
boolean

getId

public java.lang.String getId()
Description copied from class: AbstractDatabaseEntry
Returns a unique ID for a database entry.

Specified by:
getId in interface IDistributable
Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.

getReferenceId

public java.lang.String getReferenceId()

getSKI

public java.lang.String getSKI()

getLocale

public java.lang.String getLocale()

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance. Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getVersionNumber

public long getVersionNumber()
Description copied from class: AbstractDatabaseEntry
Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry). Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry.

getDate

public java.util.Date getDate()

getXmlStructure

public org.w3c.dom.Element getXmlStructure()
Description copied from class: AbstractDistributableDatabaseEntry
Returns the XML structure for this db entry.

Specified by:
getXmlStructure in class AbstractDistributableDatabaseEntry
Returns:
The XML node of this db entry

getPostFile

public java.lang.String getPostFile()
Description copied from interface: IDistributable
Returns the filename (InfoService command) to which the data of this entry is posted at the other infoservice.

Returns:
The filename, where the data is posted when this entry is forwarded.

getDocument

public org.w3c.dom.Document getDocument()

isVerified

public boolean isVerified()
Description copied from class: AbstractDistributableCertifiedDatabaseEntry
Returns if this entry has been verified with a certificate chain.

Specified by:
isVerified in interface ICertifiedDatabaseEntry
Specified by:
isVerified in class AbstractDistributableCertifiedDatabaseEntry
Returns:
if this entry has been verified with a certificate chain

isValid

public boolean isValid()

getById

public static TermsAndConditions getById(java.lang.String a_id,
                                         java.util.Locale a_locale)

equals

public boolean equals(java.lang.Object a_object)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getSignature

public anon.crypto.XMLSignature getSignature()
Specified by:
getSignature in interface ICertifiedDatabaseEntry
Specified by:
getSignature in class AbstractDistributableCertifiedDatabaseEntry

getCertPath

public anon.crypto.MultiCertPath getCertPath()