anon.infoservice
Class AbstractDistributableDatabaseEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.AbstractDistributableDatabaseEntry
All Implemented Interfaces:
IDistributable, IXMLEncodable
Direct Known Subclasses:
AbstractDistributableCertifiedDatabaseEntry, JAPMinVersion, JAPVersionInfo, JavaVersionDBEntry, MessageDBEntry

public abstract class AbstractDistributableDatabaseEntry
extends AbstractDatabaseEntry
implements IDistributable, IXMLEncodable

This class implements common methods that may be used by distributabe database entries.

Author:
Rolf Wendolsky

Nested Class Summary
static class AbstractDistributableDatabaseEntry.SerialDBEntry
           
static class AbstractDistributableDatabaseEntry.Serials
           
 
Field Summary
static java.lang.String XML_ATTR_LAST_UPDATE
           
static java.lang.String XML_ATTR_SERIAL
           
static java.lang.String XML_ATTR_VALID
           
static java.lang.String 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_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
AbstractDistributableDatabaseEntry(long a_expireTime)
           
 
Method Summary
static java.lang.String getHttpRequestString(java.lang.Class a_xmlEncodableClass)
           
static java.lang.String getHttpSerialsRequestString(java.lang.Class a_xmlEncodableClass)
           
 byte[] getPostData()
          This returns the data, which are posted to other InfoServices.
 int getPostEncoding()
          Returns the content encoding of the post data.
abstract  org.w3c.dom.Element getXmlStructure()
          Returns the XML structure for this db entry.
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Creates an XML node for this db entry.
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
deletePersistence, getCreationTime, getExpireTime, getId, getLastUpdate, getVersionNumber, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface anon.infoservice.IDistributable
getId, getPostFile
 

Field Detail

XML_ATTR_SERIAL

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

XML_ATTR_VERIFIED

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

XML_ATTR_VALID

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

XML_ATTR_LAST_UPDATE

public static final java.lang.String XML_ATTR_LAST_UPDATE
See Also:
Constant Field Values
Constructor Detail

AbstractDistributableDatabaseEntry

public AbstractDistributableDatabaseEntry(long a_expireTime)
Method Detail

getHttpRequestString

public static java.lang.String getHttpRequestString(java.lang.Class a_xmlEncodableClass)

getHttpSerialsRequestString

public static java.lang.String getHttpSerialsRequestString(java.lang.Class a_xmlEncodableClass)

getXmlStructure

public abstract org.w3c.dom.Element getXmlStructure()
Returns the XML structure for this db entry.

Returns:
The XML node of this db entry

getPostData

public byte[] getPostData()
This returns the data, which are posted to other InfoServices. It's the whole XML structure of this DBEntry by default but may be overwritten

Specified by:
getPostData in interface IDistributable
Returns:
The data, which are posted to other InfoServices when this entry is forwarded.

getPostEncoding

public int getPostEncoding()
Returns the content encoding of the post data.

Specified by:
getPostEncoding in interface IDistributable
Returns:
the content encoding of the post data

toXmlElement

public final org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Creates an XML node for this db entry.

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - The XML document, which is the environment for the created XML node.
Returns:
The db entry XML node or null if an error occured