anon.terms.template
Class TermsAndConditionsTemplate
java.lang.Object
anon.infoservice.AbstractDatabaseEntry
anon.infoservice.AbstractDistributableDatabaseEntry
anon.infoservice.AbstractDistributableCertifiedDatabaseEntry
anon.terms.template.TermsAndConditionsTemplate
- All Implemented Interfaces:
- ICertifiedDatabaseEntry, IDistributable, IXMLEncodable
public class TermsAndConditionsTemplate
- extends AbstractDistributableCertifiedDatabaseEntry
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
XML_ATTR_DATE
private static final java.lang.String XML_ATTR_DATE
- See Also:
- Constant Field Values
XML_ATTR_LOCALE
private static final java.lang.String XML_ATTR_LOCALE
- See Also:
- Constant Field Values
XML_ATTR_NAME
private static final java.lang.String XML_ATTR_NAME
- See Also:
- Constant Field Values
XML_ATTR_TYPE
private static final java.lang.String XML_ATTR_TYPE
- See Also:
- Constant Field Values
REQUIRED_ATTRIBUTES
private static final java.lang.String[] REQUIRED_ATTRIBUTES
XML_ELEMENT_OPERATOR_COUNTRY
private static final java.lang.String XML_ELEMENT_OPERATOR_COUNTRY
- See Also:
- Constant Field Values
XML_ELEMENT_SIGNATURE
private static final java.lang.String XML_ELEMENT_SIGNATURE
- See Also:
- Constant Field Values
XML_ELEMENT_DATE
private static final java.lang.String XML_ELEMENT_DATE
- See Also:
- Constant Field Values
INFOSERVICE_PATH
public static final java.lang.String INFOSERVICE_PATH
- See Also:
- Constant Field Values
INFOSERVICE_CONTAINER_PATH
public static final java.lang.String INFOSERVICE_CONTAINER_PATH
- See Also:
- Constant Field Values
INFOSERVICE_SERIALS_PATH
public static final java.lang.String INFOSERVICE_SERIALS_PATH
- See Also:
- Constant Field Values
REPLACEMENT_ELEMENT_NAMES
public static final java.lang.String[] REPLACEMENT_ELEMENT_NAMES
XSLT_PATH
private static final java.lang.String XSLT_PATH
- See Also:
- Constant Field Values
TERMS_AND_CONDITIONS_TYPE_COMMON_LAW
public static java.lang.String TERMS_AND_CONDITIONS_TYPE_COMMON_LAW
TERMS_AND_CONDITIONS_TYPE_GERMAN_LAW
public static java.lang.String TERMS_AND_CONDITIONS_TYPE_GERMAN_LAW
TERMS_AND_CONDITIONS_TYPE_GENERAL_LAW
public static java.lang.String TERMS_AND_CONDITIONS_TYPE_GENERAL_LAW
XML_ELEMENT_CONTAINER_NAME
public static java.lang.String XML_ELEMENT_CONTAINER_NAME
XML_ELEMENT_NAME
public static java.lang.String XML_ELEMENT_NAME
m_strId
private java.lang.String m_strId
m_locale
private java.lang.String m_locale
m_type
private java.lang.String m_type
m_date
private java.lang.String m_date
signedDocument
private org.w3c.dom.Document signedDocument
m_signature
private XMLSignature m_signature
m_certPath
private MultiCertPath m_certPath
name
private java.lang.String name
preamble
private Preamble preamble
sections
private TCComposite sections
TermsAndConditionsTemplate
public TermsAndConditionsTemplate(org.w3c.dom.Element element,
long aLong)
throws XMLParseException
- Throws:
XMLParseException
TermsAndConditionsTemplate
public TermsAndConditionsTemplate(org.w3c.dom.Node rootNode)
throws XMLParseException
- Throws:
XMLParseException
TermsAndConditionsTemplate
public TermsAndConditionsTemplate(java.io.File a_file)
throws XMLParseException,
java.io.IOException
- Throws:
XMLParseException
java.io.IOException
createTCDocument
public org.w3c.dom.Document createTCDocument(TermsAndConditionsTranslation tcTranslation)
transform
public java.lang.String transform(TermsAndConditionsTranslation translation)
transform
public void transform(java.io.Writer writer,
TermsAndConditionsTranslation translation)
throws java.io.IOException,
javax.xml.transform.TransformerException
- Throws:
java.io.IOException
javax.xml.transform.TransformerException
getType
public java.lang.String getType()
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.
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.
getLanguage
public java.lang.String getLanguage()
getDate
public java.lang.String getDate()
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.
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()
getSections
public TCComposite getSections()
store
public static void store(org.w3c.dom.Element root)
getAllStoredRefIDs
public static java.util.Enumeration getAllStoredRefIDs()
loadFromDirectory
public static void loadFromDirectory(java.io.File a_dir)
getById
public static TermsAndConditionsTemplate getById(java.lang.String a_id,
boolean a_bUpdateFromInfoService)
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 XMLSignature getSignature()
- Specified by:
getSignature
in interface ICertifiedDatabaseEntry
- Specified by:
getSignature
in class AbstractDistributableCertifiedDatabaseEntry
getCertPath
public MultiCertPath getCertPath()
getDocument
public org.w3c.dom.Document getDocument()
getSignedDocument
public org.w3c.dom.Document getSignedDocument()
setSignedDocument
public void setSignedDocument(org.w3c.dom.Document signedDocument)
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