com.isti.util.updatechecker
Class XMLUpdateCheckerServer

java.lang.Object
  extended by com.isti.util.updatechecker.BasicUpdateCheckerServer
      extended by com.isti.util.updatechecker.XMLUpdateCheckerServer

public class XMLUpdateCheckerServer
extends BasicUpdateCheckerServer

Class XMLUpdateCheckerServer defines an update checker server.


Field Summary
static java.lang.String ADMIN_EMAIL
          Tag name for AdminEmail element.
static java.lang.String DATE
          Tag name for Date attribute.
static java.lang.String DESCRIPTION
          Tag name for Description attribute.
static java.lang.String FEATURES
          Tag name for Features element.
protected static IstiXmlUtils istiXmlUtilsObj
           
static java.lang.String REASON
          Tag name for Reason element.
static java.lang.String UPDATE
          Tag name for Update element.
static java.lang.String UPDATE_ACTION
          Tag name for UpdateAction element.
static java.lang.String UPDATE_CHECKER_TAG
          Value for "UpdateChecker" tag.
static java.lang.String UPDATE_LOCATION
          Tag name for UpdateLocation element.
static java.lang.String VERSION
          Tag name for Version attribute.
 
Constructor Summary
XMLUpdateCheckerServer(org.jdom.Element rootElement)
          Constructs an update checker server.
XMLUpdateCheckerServer(java.lang.String updateLocationString)
          Constructs an update checker server.
XMLUpdateCheckerServer(java.lang.String updateLocationString, java.util.Properties urlRequestProps)
          Constructs an update checker server.
 
Method Summary
protected static java.lang.String createAdminEmailAddress(org.jdom.Element rootElement)
          Creates the admin email address.
protected static org.jdom.Element createRootElement(java.lang.String updateLocationString)
          Creates the root element.
protected static org.jdom.Element createRootElement(java.lang.String updateLocationString, java.util.Properties urlRequestProps)
          Creates the root element.
protected static UpdateAction[] createUpdateActions(org.jdom.Element updateElement)
          Creates update actions.
protected static UpdateInformation[] createUpdates(org.jdom.Element rootElement)
          Creates a list of updates for the specified version string.
protected static java.lang.String getChildText(org.jdom.Element e, java.lang.String name)
          Gets the text for the child with the specified name.
 boolean getErrorFlag()
          Returns true if an error was detected.
 java.lang.String getErrorMessage()
          Returns message string for last error (or 'No error' if none).
 
Methods inherited from class com.isti.util.updatechecker.BasicUpdateCheckerServer
getAdminEmailAddress, getUpdates, isUpdateAvailable, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPDATE_CHECKER_TAG

public static final java.lang.String UPDATE_CHECKER_TAG
Value for "UpdateChecker" tag.

See Also:
Constant Field Values

ADMIN_EMAIL

public static final java.lang.String ADMIN_EMAIL
Tag name for AdminEmail element.

See Also:
Constant Field Values

UPDATE

public static final java.lang.String UPDATE
Tag name for Update element.

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Tag name for Version attribute.

See Also:
Constant Field Values

DATE

public static final java.lang.String DATE
Tag name for Date attribute.

See Also:
Constant Field Values

FEATURES

public static final java.lang.String FEATURES
Tag name for Features element.

See Also:
Constant Field Values

REASON

public static final java.lang.String REASON
Tag name for Reason element.

See Also:
Constant Field Values

UPDATE_ACTION

public static final java.lang.String UPDATE_ACTION
Tag name for UpdateAction element.

See Also:
Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
Tag name for Description attribute.

See Also:
Constant Field Values

UPDATE_LOCATION

public static final java.lang.String UPDATE_LOCATION
Tag name for UpdateLocation element.

See Also:
Constant Field Values

istiXmlUtilsObj

protected static final IstiXmlUtils istiXmlUtilsObj
Constructor Detail

XMLUpdateCheckerServer

public XMLUpdateCheckerServer(java.lang.String updateLocationString)
Constructs an update checker server.

Parameters:
updateLocationString - the update location string.
See Also:
getErrorFlag(), getErrorMessage()

XMLUpdateCheckerServer

public XMLUpdateCheckerServer(java.lang.String updateLocationString,
                              java.util.Properties urlRequestProps)
Constructs an update checker server.

Parameters:
updateLocationString - the update location string.
urlRequestProps - the request properties to use for URL connections or null if none.
See Also:
getErrorFlag(), getErrorMessage()

XMLUpdateCheckerServer

public XMLUpdateCheckerServer(org.jdom.Element rootElement)
Constructs an update checker server.

Parameters:
rootElement - root element.
Method Detail

getErrorFlag

public boolean getErrorFlag()
Returns true if an error was detected. The error message may be fetched via the 'getErrorMessage()' method.

Returns:
true if an error was detected.

getErrorMessage

public java.lang.String getErrorMessage()
Returns message string for last error (or 'No error' if none).

Returns:
the error message.

createRootElement

protected static org.jdom.Element createRootElement(java.lang.String updateLocationString)
Creates the root element.

Parameters:
updateLocationString - the update location string.
Returns:
the root element.

createRootElement

protected static org.jdom.Element createRootElement(java.lang.String updateLocationString,
                                                    java.util.Properties urlRequestProps)
Creates the root element.

Parameters:
updateLocationString - the update location string.
urlRequestProps - the request properties to use for URL connections or null if none.
Returns:
the root element.

getChildText

protected static java.lang.String getChildText(org.jdom.Element e,
                                               java.lang.String name)
Gets the text for the child with the specified name.

Parameters:
e - the element.
name - the name of the child.
Returns:
the text or null if not found.

createAdminEmailAddress

protected static java.lang.String createAdminEmailAddress(org.jdom.Element rootElement)
Creates the admin email address.

Parameters:
rootElement - root element.
Returns:
the admin email address or null if unknown.

createUpdates

protected static UpdateInformation[] createUpdates(org.jdom.Element rootElement)
Creates a list of updates for the specified version string.

Parameters:
rootElement - root element.
Returns:
an array of updates.

createUpdateActions

protected static UpdateAction[] createUpdateActions(org.jdom.Element updateElement)
Creates update actions.

Parameters:
updateElement - the update element.
Returns:
an array of update actions.