anon.infoservice
Class JavaVersionDBEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.AbstractDistributableDatabaseEntry
          extended by anon.infoservice.JavaVersionDBEntry
All Implemented Interfaces:
IDistributable, IXMLEncodable

public class JavaVersionDBEntry
extends AbstractDistributableDatabaseEntry

Stores information about the latest java version of a specific vendor.

Author:
Rolf Wendolsky

Nested Class Summary
 
Nested classes/interfaces inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
AbstractDistributableDatabaseEntry.SerialDBEntry, AbstractDistributableDatabaseEntry.Serials
 
Field Summary
static java.lang.String CURRENT_JAVA_VENDOR
           
static java.lang.String CURRENT_JAVA_VERSION
           
static java.lang.String HTTP_REQUEST_STRING
           
static java.lang.String HTTP_SERIALS_REQUEST_STRING
           
private  boolean m_bForce
           
private  java.net.URL m_downloadURL
           
private  java.lang.String m_lastSupportedVersion
           
private  long m_lastUpdate
           
private  java.lang.String m_latestVersion
           
private  java.lang.String m_vendor
           
private  java.lang.String m_vendorLongName
           
private  java.lang.String m_versionName
           
private  org.w3c.dom.Element m_xmlDescription
          Stores the XML representation of this DBEntry.
private static java.lang.String OS_NAME
           
static java.lang.String PROPERTY_NAME
           
private static long TIMEOUT
           
static java.lang.String VENDOR_ID_BLACKDOWN_JAVA
           
static java.lang.String VENDOR_ID_SUN_JAVA
           
private static java.lang.String[] VENDOR_IDS
           
private static java.lang.String XML_ATTR_FORCE
           
private static java.lang.String XML_ATTR_OPERATING_SYSTEM
           
private static java.lang.String XML_ATTR_SUPPORT_FROM_VERSION
           
private static java.lang.String XML_ATTR_VENDOR
           
private static java.lang.String XML_ATTR_VERSION_NAME
           
private static java.lang.String XML_ELEM_DOWNLOAD_URL
           
private static java.lang.String XML_ELEM_LAST_UPDATE
           
private static java.lang.String XML_ELEM_VENDOR_LONG
           
private static java.lang.String XML_ELEM_VERSION
           
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_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
JavaVersionDBEntry(org.w3c.dom.Element a_xmlElement)
           
 
Method Summary
private static boolean checkVendor(java.lang.String a_vendorId)
           
 java.net.URL getDownloadURL()
          Returns the URL where this Java version is available.
 java.lang.String getId()
          Returns the vendor ID.
 java.lang.String getJREVersion()
          Returns the latest known version number of the JRE from this vendor.
 java.lang.String getJREVersionName()
          Returns the public human readable name for this JRE version.
 java.lang.String getLastSupportedJREVersion()
           
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
static JavaVersionDBEntry getNewJavaVersion()
           
 java.lang.String getPostFile()
          Returns the HTTP_REQUEST_STRING.
 java.lang.String getVendor()
          Returns the vendor ID.
 java.lang.String getVendorLongName()
          Returns a more detailed vendor name.
 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 isJavaNoMoreSupported()
           
private  boolean isJavaOK(boolean a_bCheckStillSupported)
           
 boolean isJavaTooOld()
           
 boolean isUpdateForced()
           
 
Methods inherited from class anon.infoservice.AbstractDistributableDatabaseEntry
getHttpRequestString, getHttpSerialsRequestString, getPostData, getPostEncoding, toXmlElement
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURRENT_JAVA_VENDOR

public static final java.lang.String CURRENT_JAVA_VENDOR

CURRENT_JAVA_VERSION

public static final java.lang.String CURRENT_JAVA_VERSION

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

VENDOR_ID_SUN_JAVA

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

VENDOR_ID_BLACKDOWN_JAVA

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

XML_ELEMENT_NAME

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

XML_ELEMENT_CONTAINER_NAME

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

OS_NAME

private static final java.lang.String OS_NAME

XML_ATTR_SUPPORT_FROM_VERSION

private static final java.lang.String XML_ATTR_SUPPORT_FROM_VERSION
See Also:
Constant Field Values

XML_ATTR_VENDOR

private static final java.lang.String XML_ATTR_VENDOR
See Also:
Constant Field Values

XML_ATTR_OPERATING_SYSTEM

private static final java.lang.String XML_ATTR_OPERATING_SYSTEM
See Also:
Constant Field Values

XML_ELEM_VERSION

private static final java.lang.String XML_ELEM_VERSION
See Also:
Constant Field Values

XML_ATTR_VERSION_NAME

private static final java.lang.String XML_ATTR_VERSION_NAME
See Also:
Constant Field Values

XML_ATTR_FORCE

private static final java.lang.String XML_ATTR_FORCE
See Also:
Constant Field Values

XML_ELEM_DOWNLOAD_URL

private static final java.lang.String XML_ELEM_DOWNLOAD_URL
See Also:
Constant Field Values

XML_ELEM_VENDOR_LONG

private static final java.lang.String XML_ELEM_VENDOR_LONG
See Also:
Constant Field Values

XML_ELEM_LAST_UPDATE

private static final java.lang.String XML_ELEM_LAST_UPDATE
See Also:
Constant Field Values

VENDOR_IDS

private static final java.lang.String[] VENDOR_IDS

TIMEOUT

private static final long TIMEOUT
See Also:
Constant Field Values

m_lastUpdate

private long m_lastUpdate

m_latestVersion

private java.lang.String m_latestVersion

m_lastSupportedVersion

private java.lang.String m_lastSupportedVersion

m_vendor

private java.lang.String m_vendor

m_downloadURL

private java.net.URL m_downloadURL

m_vendorLongName

private java.lang.String m_vendorLongName

m_versionName

private java.lang.String m_versionName

m_bForce

private boolean m_bForce

m_xmlDescription

private org.w3c.dom.Element m_xmlDescription
Stores the XML representation of this DBEntry.

Constructor Detail

JavaVersionDBEntry

public JavaVersionDBEntry(org.w3c.dom.Element a_xmlElement)
                   throws XMLParseException
Throws:
XMLParseException
Method Detail

isUpdateForced

public boolean isUpdateForced()

getNewJavaVersion

public static JavaVersionDBEntry getNewJavaVersion()

isJavaTooOld

public boolean isJavaTooOld()

isJavaNoMoreSupported

public boolean isJavaNoMoreSupported()

isJavaOK

private boolean isJavaOK(boolean a_bCheckStillSupported)

getLastSupportedJREVersion

public java.lang.String getLastSupportedJREVersion()

getDownloadURL

public java.net.URL getDownloadURL()
Returns the URL where this Java version is available.

Returns:
the URL where this Java version is available

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

getJREVersion

public java.lang.String getJREVersion()
Returns the latest known version number of the JRE from this vendor.

Returns:
String

getJREVersionName

public java.lang.String getJREVersionName()
Returns the public human readable name for this JRE version.

Returns:
the public human readable name for this JRE version

getVersionNumber

public 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).

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this 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

getVendor

public java.lang.String getVendor()
Returns the vendor ID.

Returns:
the vendor ID

getVendorLongName

public java.lang.String getVendorLongName()
Returns a more detailed vendor name.

Returns:
a more detailed vendor name

getId

public java.lang.String getId()
Returns the vendor ID.

Specified by:
getId in interface IDistributable
Specified by:
getId in class AbstractDatabaseEntry
Returns:
the vendor ID

getPostFile

public java.lang.String getPostFile()
Returns the HTTP_REQUEST_STRING.

Returns:
the HTTP_REQUEST_STRING

checkVendor

private static boolean checkVendor(java.lang.String a_vendorId)