anon.infoservice
Class MessageDBEntry
java.lang.Object
anon.infoservice.AbstractDatabaseEntry
anon.infoservice.AbstractDistributableDatabaseEntry
anon.infoservice.MessageDBEntry
- All Implemented Interfaces:
- IDistributable, IXMLEncodable
public class MessageDBEntry
- extends AbstractDistributableDatabaseEntry
- implements IDistributable
Used to send messages to JAP.
- Author:
- Rolf Wendolsky
Method Summary |
int |
getExternalIdentifier()
|
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 |
getPopupText(java.util.Locale a_locale)
|
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 |
getText(java.util.Locale a_locale)
|
private java.lang.String |
getText(java.util.Locale a_locale,
java.util.Hashtable a_textHash)
|
java.net.URL |
getURL(java.util.Locale a_locale)
|
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. |
boolean |
isDummy()
|
boolean |
isForFreeCascadesOnly()
|
boolean |
isPopupShown()
|
private boolean |
parseTextNodes(org.w3c.dom.NodeList a_textNodes,
java.util.Hashtable a_nodeTable)
|
void |
setExternalIdentifier(int a_identifier)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XML_ELEMENT_CONTAINER_NAME
public static final java.lang.String XML_ELEMENT_CONTAINER_NAME
- See Also:
- Constant Field Values
XML_ELEMENT_NAME
public static final java.lang.String XML_ELEMENT_NAME
- See Also:
- Constant Field Values
HTTP_REQUEST_STRING
public static final java.lang.String HTTP_REQUEST_STRING
- See Also:
- Constant Field Values
HTTP_SERIALS_REQUEST_STRING
public static final java.lang.String HTTP_SERIALS_REQUEST_STRING
- See Also:
- Constant Field Values
PROPERTY_NAME
public static final java.lang.String PROPERTY_NAME
- See Also:
- Constant Field Values
POST_FILE
public static final java.lang.String POST_FILE
- See Also:
- Constant Field Values
XML_TEXT
private static final java.lang.String XML_TEXT
- See Also:
- Constant Field Values
XML_URL
private static final java.lang.String XML_URL
- See Also:
- Constant Field Values
XML_ATTR_LANG
private static final java.lang.String XML_ATTR_LANG
- See Also:
- Constant Field Values
XML_ATTR_POPUP
private static final java.lang.String XML_ATTR_POPUP
- See Also:
- Constant Field Values
XML_ATTR_ENCODING
private static final java.lang.String XML_ATTR_ENCODING
- See Also:
- Constant Field Values
XML_ATTR_FREE
private static final java.lang.String XML_ATTR_FREE
- See Also:
- Constant Field Values
XML_ELEM_POPUP_TEXT
private static final java.lang.String XML_ELEM_POPUP_TEXT
- See Also:
- Constant Field Values
ENCODING_URL
private static final java.lang.String ENCODING_URL
- See Also:
- Constant Field Values
ENCODING_BASE64
private static final java.lang.String ENCODING_BASE64
- See Also:
- Constant Field Values
TIMEOUT
private static final long TIMEOUT
- See Also:
- Constant Field Values
m_externalIdentifier
private int m_externalIdentifier
m_serial
private long m_serial
m_lastUpdate
private long m_lastUpdate
m_bIsDummy
private boolean m_bIsDummy
m_bFree
private boolean m_bFree
m_bShowPopup
private boolean m_bShowPopup
m_id
private java.lang.String m_id
m_xmlDescription
private org.w3c.dom.Element m_xmlDescription
m_hashText
private java.util.Hashtable m_hashText
m_hashPopupText
private java.util.Hashtable m_hashPopupText
m_hashUrl
private java.util.Hashtable m_hashUrl
MessageDBEntry
public MessageDBEntry(org.w3c.dom.Element a_xmlElement)
throws XMLParseException,
java.security.SignatureException
- Throws:
XMLParseException
java.security.SignatureException
getURL
public java.net.URL getURL(java.util.Locale a_locale)
getText
public java.lang.String getText(java.util.Locale a_locale)
getPopupText
public java.lang.String getPopupText(java.util.Locale a_locale)
getExternalIdentifier
public int getExternalIdentifier()
setExternalIdentifier
public void setExternalIdentifier(int a_identifier)
isPopupShown
public boolean isPopupShown()
isForFreeCascadesOnly
public boolean isForFreeCascadesOnly()
isDummy
public boolean isDummy()
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.
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.
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.
- Specified by:
getPostFile
in interface IDistributable
- Returns:
- The filename, where the data is posted when this entry is forwarded.
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
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
getText
private java.lang.String getText(java.util.Locale a_locale,
java.util.Hashtable a_textHash)
parseTextNodes
private boolean parseTextNodes(org.w3c.dom.NodeList a_textNodes,
java.util.Hashtable a_nodeTable)