com.orderlysoftware.orderlycalls.base
Class Settings

java.lang.Object
  extended by com.orderlysoftware.orderlycalls.base.Settings
Direct Known Subclasses:
AGISettings, AGISettings.BindSettings, ManagerSettings, ManagerSettings.ManagerEventListenerSettings, OrderlyQExampleSettings

public class Settings
extends java.lang.Object

This class holds initialisation data for the Serviceobjects created by OrderlyCalls.

If you're intending to create your own Serviceclasses, you should consider creating an accompanying Settings subclass to hold initialisation parameters.

These subclasses should have getter/setter pairs for each XML attribute, which should be stored as a property.

If the tag for your services requires child tags, consider creating further Settings subclasses as inner classes (see AGISettings for an example).

Author:
Matt King, M.A. Oxon. m@orderlysoftware.com

Constructor Summary
Settings()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare two Settings objects.
 java.lang.String getName()
          Gets the name of this Settings instance.
 org.w3c.dom.Element getXMLSettings()
          Gets the XML Element that created this instance.
 void setName(java.lang.String name)
          Sets the name of this Settings instance.
 boolean setXMLSettings(org.w3c.dom.Element xmlSettings)
          Override this method to do your own processing of settings.
 java.lang.String toString()
          Gets a representation of this object suitable for logging.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Settings

public Settings()
Method Detail

getName

public java.lang.String getName()
Gets the name of this Settings instance.

Returns:
Returns the name of this Service (name="myName" in XML).

setName

public void setName(java.lang.String name)
Sets the name of this Settings instance.

Parameters:
name - The name to set.

getXMLSettings

public org.w3c.dom.Element getXMLSettings()
Gets the XML Element that created this instance.

Returns:
Returns the settings from the XML config file for this tag.

setXMLSettings

public boolean setXMLSettings(org.w3c.dom.Element xmlSettings)
Override this method to do your own processing of settings.

Make sure you call super.setXMLSettings(xmlSettings) to capture name, if present.

Parameters:
xmlSettings -
Returns:
true on success/validation, false otherwise.

equals

public boolean equals(java.lang.Object o)
Compare two Settings objects.

Returns true only if the objects are both Settings objects of the same subclass, and have the same name field.

Subclasses may wish to extend this method to check other member fields.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Gets a representation of this object suitable for logging.

Subclasses should override this method to show all properties.

Overrides:
toString in class java.lang.Object