Public Member Functions | |
| MixConfiguration () throws XMLParseException | |
| MixConfiguration (Reader r) throws XMLParseException, IOException | |
| boolean | setMixConfiguration (Reader r) throws XMLParseException, IOException |
| Document | getDocument () |
| void | addChangeListener (ChangeListener a_changeListener) |
| void | removeChangeListener (ChangeListener a_changeListener) |
| void | save (Writer a_writer) throws IOException |
| boolean | isSavedToFile () |
| void | setSavedToFile () |
| File | saveToFile () throws IOException |
| String[] | getValues (String a_xmlPath) |
| String[] | getValues (String a_xmlPath, String a_attribute, String a_attributeValue) |
| boolean | isMixOnCDEnabled () |
| boolean | isAutoConfigurationAllowed () |
| boolean | isFallbackEnabled () |
| boolean | isAccountingNodePresent () |
| void | addAccounting () |
| int | getMixType () |
| String | getValue (String a_xmlPath) |
| void | setValue (String a_xmlPath, String a_value) |
| void | setValue (String a_xmlPath, String a_value, Attr a_attribute, boolean urlEncode) |
| void | setValue (String a_xmlPath, boolean a_value) |
| void | setValue (String a_xmlPath, int a_value) |
| void | setValue (String a_xmlPath, byte[] a_value) |
| void | setValue (String a_xmlPath, CascadePanel.MixListTableModel a_mixListModel) |
| void | setValues (String a_xmlPath, String[] a_values) |
| void | setValues (String a_xmlPath, String[] a_values, String a_attribute, String[] a_attrValues) |
| void | setValue (String a_xmlPath, InfoServiceTableModel a_infoServiceModel) |
| void | setValue (String a_xmlPath, IncomingConnectionTableModel a_inConnModel) |
| void | setValue (String a_xmlPath, OutgoingConnectionTableModel a_outConnModel) |
| void | setValue (String a_xmlPath, ProxyTableModel a_proxyTableModel) |
| void | setValue (String a_xmlPath, XMLPriceCertificate a_cert) |
| void | setValue (String a_xmlPath, Element a_elem) |
| void | setAttribute (String a_xmlPath, String a_attribute, boolean a_Boolean) |
| void | setAttribute (String a_xmlPath, String a_attribute, String a_value) |
| boolean | hasAttribute (String a_xmlPath, String a_attribute) |
| String | getAttributeValue (String a_xmlPath, String a_attribute) |
| boolean | hasAttributes (String a_xmlPath) |
| void | removeNode (String a_xmlPath) |
| void | removeAttribute (String a_xmlPath, String a_attribute) |
| boolean | performReloadCheck () |
Static Public Member Functions | |
| static String | getMixTypeAsString (int a_mixType) |
Static Public Attributes | |
| static final int | MIXTYPE_FIRST = 1 |
| static final int | MIXTYPE_MIDDLE = 2 |
| static final int | MIXTYPE_LAST = 4 |
| static final int | LOG_NONE = 0 |
| static final int | LOG_CONSOLE = 1 |
| static final int | LOG_SYSLOG = 2 |
| static final int | LOG_DIRECTORY = 3 |
| static final String | XML_PATH_INFO_SERVICE = "InfoService" |
Protected Member Functions | |
| void | fireStateChanged (String a_name, Object a_value) |
Private Member Functions | |
| void | setDefaults () |
| void | initCheck () |
| int | getMixTypeAsInt (String a_s) |
| Node | getAttributeNode (Node n, String a_namedItem) |
| Node | getNode (String a_xmlPath, boolean create) |
Static Private Member Functions | |
| static Document | open (InputSource r) throws XMLParseException, IOException |
Private Attributes | |
| Document | m_configuration = null |
| boolean | m_bSavedToFile = true |
| Vector< ChangeListener > | m_changeListeners = new Vector<ChangeListener>() |
Static Private Attributes | |
| static final String | MIXTYPE_NAME [] = {"FirstMix", "MiddleMix", "LastMix"} |
| static final String | VERSION = "0.61" |
| static final String | XML_ATTRIBUTE_VERSION = "version" |
| mixconfig.MixConfiguration.MixConfiguration | ( | ) | throws XMLParseException |
Constructs a new instance of MixConfiguration. The configuration contains only the root element and empty elements on the second level. The leaf elements are created as soon as the corresponding attributes are set.
| XMLParseException | If parsing the configuration string causes an error |
References mixconfig.MixConfiguration.m_configuration, mixconfig.MixConfiguration.setDefaults(), mixconfig.MixConfiguration.setSavedToFile(), and mixconfig.MixConfiguration.VERSION.
| mixconfig.MixConfiguration.MixConfiguration | ( | Reader | r | ) | throws XMLParseException, IOException |
Constructs a new instance of MixConfiguration. The configuration is read from the specified java.io.Reader
| r | A Reader providing the configuration |
| XMLParseException | If an error occurs while parsing the input from the reader | |
| IOException | If an error occurs while reading the configuration |
References mixconfig.MixConfiguration.setMixConfiguration(), and mixconfig.MixConfiguration.setSavedToFile().
| boolean mixconfig.MixConfiguration.setMixConfiguration | ( | Reader | r | ) | throws XMLParseException, IOException |
Set's a new MixConfiguration. Without creating a new Instance The configuration is read from the specified java.io.Reader
| r | A Reader providing the configuration |
| XMLParseException | If an error occurs while parsing the input from the reader | |
| IOException | If an error occurs while reading the configuration |
References mixconfig.MixConfiguration.initCheck(), mixconfig.MixConfiguration.m_configuration, mixconfig.MixConfiguration.open(), and mixconfig.MixConfiguration.setSavedToFile().
Referenced by mixconfig.Menu.actionPerformed(), and mixconfig.MixConfiguration.MixConfiguration().
| static String mixconfig.MixConfiguration.getMixTypeAsString | ( | int | a_mixType | ) | [static] |
| Document mixconfig.MixConfiguration.getDocument | ( | ) |
Returns the DOM Document object underlying this configuration.
References mixconfig.MixConfiguration.m_configuration.
Referenced by mixconfig.MixConfig.createMixOnCDConfiguration(), mixconfig.panels.DataRetentionPanel.DataRetentionPanel(), mixconfig.panels.TermsAndConditionsPanel.getInfoServices(), mixconfig.panels.TermsAndConditionsPanel.getPreviewTranslation(), mixconfig.panels.DataRetentionPanel.importDataRetentionKey(), mixconfig.panels.TermsAndConditionsPanel.initTemplates(), mixconfig.panels.TermsAndConditionsPanel.initTermsAndConditionsSettings(), mixconfig.panels.MixConfigPanel.load(), mixconfig.panels.CascadePanel.load(), mixconfig.panels.TermsAndConditionsPanel.save(), mixconfig.panels.LogCrimePanel.save(), and mixconfig.MixConfiguration.setAttribute().
| void mixconfig.MixConfiguration.addChangeListener | ( | ChangeListener | a_changeListener | ) |
Adds a ChangeListener to this object's listeners list
| a_changeListener | A new ChangeListener to receive events every time an attribute changes |
References mixconfig.MixConfiguration.m_changeListeners, and mixconfig.MixConfiguration.removeChangeListener().
| void mixconfig.MixConfiguration.removeChangeListener | ( | ChangeListener | a_changeListener | ) |
Removes a ChangeListener to this object's listeners list
| a_changeListener | A ChangeListener in this objects listeners list |
References mixconfig.MixConfiguration.m_changeListeners.
Referenced by mixconfig.MixConfiguration.addChangeListener().
| void mixconfig.MixConfiguration.save | ( | Writer | a_writer | ) | throws IOException |
Write the configuration to the specified java.io.Writer. Normally this is a FileWriter to which an XML file is to be written.
| a_writer | A java.io.Writer to which to write the XML |
| IOException | If an error occurs while writing |
References mixconfig.MixConfiguration.m_bSavedToFile, and mixconfig.MixConfiguration.m_configuration.
Referenced by mixconfig.Menu.actionPerformed(), and mixconfig.MixConfiguration.saveToFile().
| boolean mixconfig.MixConfiguration.isSavedToFile | ( | ) |
Return if the configuration has been saved to a file.
References mixconfig.MixConfiguration.m_bSavedToFile.
Referenced by mixconfig.Menu.actionPerformed().
| void mixconfig.MixConfiguration.setSavedToFile | ( | ) |
Tells the configuration object that it has been save to a file.
References mixconfig.MixConfiguration.m_bSavedToFile.
Referenced by mixconfig.Menu.actionPerformed(), mixconfig.MixConfig.main(), mixconfig.MixConfiguration.MixConfiguration(), mixconfig.Menu.reset(), and mixconfig.MixConfiguration.setMixConfiguration().
| File mixconfig.MixConfiguration.saveToFile | ( | ) | throws IOException |
Shows a file dialog and saves the configuration
| IOException | If an I/O error occurs while saving the configuration |
References mixconfig.MixConfiguration.save().
| String [] mixconfig.MixConfiguration.getValues | ( | String | a_xmlPath | ) |
Returns the values for all elements or attributes in the specified path.
| a_xmlPath | a path to an element or an attribute inside an element |
Referenced by mixconfig.panels.MixOnCDPanel.load(), and mixconfig.panels.MixOnCDPanel.loadPasswords().
| String [] mixconfig.MixConfiguration.getValues | ( | String | a_xmlPath, | |
| String | a_attribute, | |||
| String | a_attributeValue | |||
| ) |
Returns the node values of elements with the specified attribute.
| a_xmlPath | String | |
| a_attribute | an attribute | |
| a_attributeValue | the attribute's wanted value |
References mixconfig.MixConfiguration.getNode().
| boolean mixconfig.MixConfiguration.isMixOnCDEnabled | ( | ) |
Returns if the MixOnCD configuration is used.
References mixconfig.MixConfiguration.getValue().
Referenced by mixconfig.panels.GeneralPanel.actionPerformed(), mixconfig.panels.NextMixProxyPanel.componentShown(), mixconfig.panels.AdvancedPanel.focusGained(), mixconfig.panels.GeneralPanel.initListenerInterfacesTable(), mixconfig.panels.AdvancedPanel.itemStateChanged(), and mixconfig.panels.MixOnCDPanel.save().
| boolean mixconfig.MixConfiguration.isAutoConfigurationAllowed | ( | ) |
Return true, if the mix may be configured by an info service
References mixconfig.MixConfiguration.getValue().
Referenced by mixconfig.panels.NextMixProxyPanel.check(), mixconfig.panels.PreviousMixPanel.enableComponents(), mixconfig.panels.NextMixProxyPanel.enableComponents(), and mixconfig.panels.GeneralPanel.load().
| boolean mixconfig.MixConfiguration.isFallbackEnabled | ( | ) |
| boolean mixconfig.MixConfiguration.isAccountingNodePresent | ( | ) |
Check if there is a tag <Accounting> in the XML TODO: Remove since it is not referenced?
References mixconfig.MixConfiguration.m_configuration.
Referenced by mixconfig.MixConfiguration.initCheck(), and mixconfig.panels.PaymentPanel.stateChanged().
| void mixconfig.MixConfiguration.addAccounting | ( | ) |
Add the node 'Accounting' and set default values
References mixconfig.MixConfiguration.setValue().
Referenced by mixconfig.MixConfiguration.setDefaults(), and mixconfig.panels.PaymentPanel.stateChanged().
| int mixconfig.MixConfiguration.getMixType | ( | ) |
Return the MixType as an Integer
References mixconfig.MixConfiguration.getValue(), mixconfig.MixConfiguration.MIXTYPE_FIRST, and mixconfig.MixConfiguration.MIXTYPE_LAST.
Referenced by mixconfig.panels.GeneralPanel.check(), mixconfig.panels.NextMixProxyPanel.componentShown(), mixconfig.panels.NextMixProxyPanel.createTableModel(), mixconfig.panels.PreviousMixPanel.enableComponents(), mixconfig.panels.NextMixProxyPanel.enableComponents(), mixconfig.panels.GeneralPanel.enableComponents(), mixconfig.panels.AdvancedPanel.enableComponents(), mixconfig.panels.GeneralPanel.load(), and mixconfig.panels.CascadePanel.stateChanged().
| String mixconfig.MixConfiguration.getValue | ( | String | a_xmlPath | ) |
Returns the value of the attribute with the specified name. The name must be of the form "RootElement/ChildElement/ChildElement/... etc.", similar to the XPath syntax, but XPath functions and relative paths are not allowed.
String, or null if an element with this path does not exist. | a_xmlPath | The path to the DOM element |
References mixconfig.MixConfiguration.getMixTypeAsInt(), and mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.panels.OwnCertificatesPanel.actionPerformed(), mixconfig.panels.CascadePanel.check(), mixconfig.panels.OwnCertificatesPanel.checkCertificateField(), mixconfig.panels.MixOnCDPanel.checkDHCPEnabled(), mixconfig.tools.EmailComposer.composeEmail(), mixconfig.panels.CascadePanel.enableComponents(), mixconfig.panels.OwnCertificatesPanel.OperatorCertCreationValidator.getExtensions(), mixconfig.panels.OwnCertificatesPanel.OwnCertCreationValidator.getExtensions(), mixconfig.MixConfiguration.getMixType(), mixconfig.panels.TermsAndConditionsPanel.getServiceOperator(), mixconfig.MixConfiguration.isAutoConfigurationAllowed(), mixconfig.MixConfiguration.isFallbackEnabled(), mixconfig.MixConfiguration.isMixOnCDEnabled(), mixconfig.panels.OwnCertificatesPanel.OperatorCertCreationValidator.isValid(), mixconfig.panels.OwnCertificatesPanel.OwnCertCreationValidator.isValid(), mixconfig.panels.OwnCertificatesPanel.load(), mixconfig.panels.MixConfigPanel.load(), mixconfig.panels.CascadePanel.load(), mixconfig.panels.AdvancedPanel.load(), mixconfig.panels.CascadePanel.recvMixList(), mixconfig.panels.MixConfigPanel.save(), mixconfig.panels.GeneralPanel.stateChanged(), mixconfig.panels.CascadePanel.stateChanged(), and mixconfig.panels.CascadePanel.MixListTableModel.toXmlElement().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| String | a_value | |||
| ) |
Set a String node value
| a_xmlPath | The path to the DOM element | |
| a_value | The new value for the attribute as a String |
Referenced by mixconfig.MixConfiguration.addAccounting(), mixconfig.MixConfig.createMixOnCDConfiguration(), mixconfig.panels.DataRetentionPanel.DataRetentionPanel(), mixconfig.panels.DataRetentionPanel.importDataRetentionKey(), mixconfig.panels.AdvancedPanel.itemStateChanged(), mixconfig.panels.MixConfigPanel.load(), mixconfig.panels.OwnCertificatesPanel.save(), mixconfig.panels.MixConfigPanel.save(), mixconfig.panels.GeneralPanel.save(), mixconfig.MixConfiguration.setDefaults(), mixconfig.panels.AdvancedPanel.setDirectoryLoggingValues(), mixconfig.MixConfiguration.setValue(), and mixconfig.panels.AdvancedPanel.stateChanged().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| String | a_value, | |||
| Attr | a_attribute, | |||
| boolean | urlEncode | |||
| ) |
Sets the value of the attribute with the specified name. The name must be of the form "RootElement/ChildElement/ChildElement/... etc.", similar to the XPath syntax, but XPath functions and relative paths are not allowed.
| a_xmlPath | The path to the DOM element | |
| a_value | The new node value for the element as a String | |
| a_attribute | Optional DOM attribute to be added to the DOM element | |
| urlEncode | Determines if the stored value is to be URL encoded (true or false) |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), and mixconfig.MixConfiguration.m_configuration.
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| boolean | a_value | |||
| ) |
Set a Boolean node value
| a_xmlPath | The path to the DOM element | |
| a_value | The new (boolean) value for the node (to be converted to a String). |
References mixconfig.MixConfiguration.setValue().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| int | a_value | |||
| ) |
Set an Integer node value
| a_xmlPath | The path to the DOM element | |
| a_value | The new (int) value for the node (to be converted to a String). |
References mixconfig.MixConfiguration.getMixTypeAsString(), and mixconfig.MixConfiguration.setValue().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| byte[] | a_value | |||
| ) |
Sets the value of the attribute with the specified name. The name must be of the form "RootElement/ChildElement/ChildElement/... etc.", similar to the XPath syntax, but XPath functions and relative paths are not allowed.
| a_xmlPath | The path to the DOM element | |
| a_value | The new value for the attribute. The byte[] will be Base64-encoded before being saved. |
References mixconfig.MixConfiguration.m_configuration, and mixconfig.MixConfiguration.setValue().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| CascadePanel.MixListTableModel | a_mixListModel | |||
| ) |
Converts the specified table model to a DOM tree and integrates it below the existing element with the specified name.
| a_mixListModel | An instance of mixconfig.CascadePanel.MixListTableModel | |
| a_xmlPath | The path to the DOM parent element of the connection element to be set |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), and mixconfig.MixConfiguration.m_configuration.
| void mixconfig.MixConfiguration.setValues | ( | String | a_xmlPath, | |
| String[] | a_values | |||
| ) |
In the case that there is more than one value for a specified path, this method creates as many nodes with the same name as values.
| a_xmlPath | String | |
| a_values | String[] |
Referenced by mixconfig.panels.MixOnCDPanel.save(), and mixconfig.panels.MixOnCDPanel.savePasswords().
| void mixconfig.MixConfiguration.setValues | ( | String | a_xmlPath, | |
| String[] | a_values, | |||
| String | a_attribute, | |||
| String[] | a_attrValues | |||
| ) |
In the case that there is more than one value for a specified path, this method creates as many nodes with the same name as values. For each value it is possible to add one optional attribute.
| a_xmlPath | String | |
| a_values | String[] | |
| a_attribute | String | |
| a_attrValues | String[] |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), and mixconfig.MixConfiguration.m_configuration.
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| InfoServiceTableModel | a_infoServiceModel | |||
| ) |
TODO: Refactor this one with the next one?
| a_xmlPath | ||
| a_infoServiceModel |
References mixconfig.infoservice.InfoServiceTableModel.createAsElement(), mixconfig.MixConfiguration.fireStateChanged(), mixconfig.infoservice.InfoServiceTableModel.getData(), mixconfig.infoservice.InfoServiceData.getListenerInterfaces(), mixconfig.MixConfiguration.getNode(), mixconfig.infoservice.InfoServiceTableModel.getRowCount(), and mixconfig.MixConfiguration.m_configuration.
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| IncomingConnectionTableModel | a_inConnModel | |||
| ) |
Converts the specified table model to a DOM tree and integrates it below the existing element with the specified name.
| a_xmlPath | The path to the DOM parent element of the connection element to be set | |
| a_inConnModel | An incoming connection table model |
References mixconfig.network.IncomingConnectionTableModel.createAsElement(), mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), and mixconfig.MixConfiguration.m_configuration.
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| OutgoingConnectionTableModel | a_outConnModel | |||
| ) |
Converts the specified table model to a DOM tree and integrates it below the existing element with the specified name.
| a_xmlPath | The path to the DOM parent element of the connection element to be set | |
| a_outConnModel | An outgoing connection table model |
References mixconfig.network.OutgoingConnectionTableModel.createMixAsElement(), mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), mixconfig.MixConfiguration.m_configuration, and mixconfig.MixConfiguration.removeNode().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| ProxyTableModel | a_proxyTableModel | |||
| ) |
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| XMLPriceCertificate | a_cert | |||
| ) |
Save a price certificate to the configuration
| a_xmlPath | ||
| a_cert |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), mixconfig.MixConfiguration.m_configuration, and mixconfig.MixConfiguration.removeNode().
| void mixconfig.MixConfiguration.setValue | ( | String | a_xmlPath, | |
| Element | a_elem | |||
| ) |
Save a XML Element to the configuration
| a_xmlPath | ||
| a_cert |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getNode(), and mixconfig.MixConfiguration.removeNode().
| void mixconfig.MixConfiguration.setAttribute | ( | String | a_xmlPath, | |
| String | a_attribute, | |||
| boolean | a_Boolean | |||
| ) |
Set a Boolean attribute that needs to be capitalized for whatever reason
| a_xmlPath | ||
| a_attribute | ||
| a_Boolean |
Referenced by mixconfig.panels.MixOnCDPanel.checkDHCPEnabled(), mixconfig.MixConfiguration.initCheck(), mixconfig.panels.OwnCertificatesPanel.save(), mixconfig.panels.MixOnCDPanel.save(), mixconfig.panels.GeneralPanel.save(), mixconfig.MixConfiguration.setDefaults(), mixconfig.panels.AdvancedPanel.setDirectoryLoggingValues(), and mixconfig.panels.PaymentPanel.stateChanged().
| void mixconfig.MixConfiguration.setAttribute | ( | String | a_xmlPath, | |
| String | a_attribute, | |||
| String | a_value | |||
| ) |
Set an attribute to an element specified by an XML path, create the element if not existent
| a_xmlPath | Path to a DOM node | |
| a_attribute | Attribute name | |
| a_value | Attribute value |
References mixconfig.MixConfiguration.fireStateChanged(), mixconfig.MixConfiguration.getDocument(), and mixconfig.MixConfiguration.getNode().
| boolean mixconfig.MixConfiguration.hasAttribute | ( | String | a_xmlPath, | |
| String | a_attribute | |||
| ) |
Check the existence of a specific attribute at a certain xmlPath
| a_xmlPath | ||
| a_attribute |
References mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.MixConfiguration.initCheck().
| String mixconfig.MixConfiguration.getAttributeValue | ( | String | a_xmlPath, | |
| String | a_attribute | |||
| ) |
Return the value of a certain attribute or null if the attribute does not exist
| a_xmlPath | ||
| a_attribute |
References mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.panels.PaymentPanel.isPaymentEnabled(), mixconfig.panels.GeneralPanel.load(), and mixconfig.panels.GeneralPanel.save().
| boolean mixconfig.MixConfiguration.hasAttributes | ( | String | a_xmlPath | ) |
References mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.panels.MixConfigPanel.save().
| void mixconfig.MixConfiguration.removeNode | ( | String | a_xmlPath | ) |
Remove the node with the specified name from the configuration
| a_xmlPath | The path to the DOM element |
References mixconfig.MixConfiguration.fireStateChanged(), and mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.panels.DataRetentionPanel.DataRetentionPanel(), mixconfig.panels.AdvancedPanel.focusLost(), mixconfig.panels.MixOnCDPanel.itemStateChanged(), mixconfig.panels.AdvancedPanel.itemStateChanged(), mixconfig.panels.MixOnCDPanel.save(), mixconfig.panels.MixConfigPanel.save(), mixconfig.panels.GeneralPanel.save(), mixconfig.panels.AdvancedPanel.setDirectoryLoggingValues(), and mixconfig.MixConfiguration.setValue().
| void mixconfig.MixConfiguration.removeAttribute | ( | String | a_xmlPath, | |
| String | a_attribute | |||
| ) |
Remove an attribute from a DOM element if existent
| a_xmlPath | ||
| a_attribute |
References mixconfig.MixConfiguration.fireStateChanged(), and mixconfig.MixConfiguration.getNode().
Referenced by mixconfig.panels.GeneralPanel.save(), mixconfig.panels.AdvancedPanel.setDirectoryLoggingValues(), and mixconfig.panels.PaymentPanel.stateChanged().
| void mixconfig.MixConfiguration.fireStateChanged | ( | String | a_name, | |
| Object | a_value | |||
| ) | [protected] |
Sends a ConfigurationEvent with the specified attribute name and value to all ChangeListeners. This method is called whenever the value of a node or attribute changes.
| a_name | The name of the changed attribute | |
| a_value | The new value |
References mixconfig.MixConfiguration.getMixTypeAsInt(), mixconfig.MixConfiguration.m_bSavedToFile, and mixconfig.MixConfiguration.m_changeListeners.
Referenced by mixconfig.MixConfiguration.removeAttribute(), mixconfig.MixConfiguration.removeNode(), mixconfig.MixConfiguration.setAttribute(), mixconfig.MixConfiguration.setValue(), and mixconfig.MixConfiguration.setValues().
| void mixconfig.MixConfiguration.setDefaults | ( | ) | [private] |
Set an initial default configuration TODO: Rather split this to the single panels?
References mixconfig.MixConfiguration.addAccounting(), mixconfig.infoservice.InfoServiceTableModel.addData(), mixconfig.MixConfiguration.setAttribute(), mixconfig.MixConfiguration.setValue(), and mixconfig.MixConfiguration.XML_PATH_INFO_SERVICE.
Referenced by mixconfig.MixConfiguration.MixConfiguration().
| void mixconfig.MixConfiguration.initCheck | ( | ) | [private] |
Check for the existence of certain elements, attributes and set values accordingly. Call this method when loading a configuration e.g. from file.
References mixconfig.MixConfiguration.hasAttribute(), mixconfig.MixConfiguration.isAccountingNodePresent(), and mixconfig.MixConfiguration.setAttribute().
Referenced by mixconfig.MixConfiguration.setMixConfiguration().
| boolean mixconfig.MixConfiguration.performReloadCheck | ( | ) |
FIXME: Rather make this a private method?
Perform a check by writing out the document to a string and reloading it again. To be called before the XML document is saved.
References mixconfig.MixConfiguration.m_configuration.
Referenced by mixconfig.Menu.actionPerformed().
| int mixconfig.MixConfiguration.getMixTypeAsInt | ( | String | a_s | ) | [private] |
Returns the MIXTYPE_xxx constant corresponding to the specified Mix type name.
| a_s | A String representing a Mix type (first, middle or last) |
References mixconfig.MixConfiguration.MIXTYPE_NAME.
Referenced by mixconfig.MixConfiguration.fireStateChanged(), and mixconfig.MixConfiguration.getValue().
| Node mixconfig.MixConfiguration.getAttributeNode | ( | Node | n, | |
| String | a_namedItem | |||
| ) | [private] |
Return a node's attribute given by name
| n | ||
| a_namedItem |
Referenced by mixconfig.MixConfiguration.getNode().
| Node mixconfig.MixConfiguration.getNode | ( | String | a_xmlPath, | |
| boolean | create | |||
| ) | [private] |
Gets the DOM node with the specified name. The name must be of the form "RootElement/ChildElement/ChildElement/... etc.", similar to the XPath syntax, but XPath functions and relative paths are not allowed.
| a_xmlPath | The path to the DOM element | |
| create | if true, the node is created if it does not exist |
null there is no such node and create was set to false References mixconfig.MixConfiguration.getAttributeNode(), and mixconfig.MixConfiguration.m_configuration.
Referenced by mixconfig.MixConfiguration.getAttributeValue(), mixconfig.MixConfiguration.getValue(), mixconfig.MixConfiguration.getValues(), mixconfig.MixConfiguration.hasAttribute(), mixconfig.MixConfiguration.hasAttributes(), mixconfig.MixConfiguration.removeAttribute(), mixconfig.MixConfiguration.removeNode(), mixconfig.MixConfiguration.setAttribute(), mixconfig.MixConfiguration.setValue(), and mixconfig.MixConfiguration.setValues().
| static Document mixconfig.MixConfiguration.open | ( | InputSource | r | ) | throws XMLParseException, IOException [static, private] |
Open the specified input source (normally a Reader corresponding to an XML file) and read the DOM tree from it.
| r | the input source |
| XMLParseException | If an error occurs while parsing the input | |
| IOException | If an error occurs while reading the configuration |
References mixconfig.MixConfiguration.VERSION, and mixconfig.MixConfiguration.XML_ATTRIBUTE_VERSION.
Referenced by mixconfig.MixConfiguration.setMixConfiguration().
final int mixconfig.MixConfiguration.MIXTYPE_FIRST = 1 [static] |
Indicates that the Mix is the first in a cascade
Referenced by mixconfig.panels.PaymentPanel.enableComponents(), mixconfig.MixConfiguration.getMixType(), mixconfig.MixConfiguration.getMixTypeAsString(), mixconfig.panels.GeneralPanel.isFirstDynamicMix(), and mixconfig.panels.PreviousMixPanel.setConfiguration().
final int mixconfig.MixConfiguration.MIXTYPE_MIDDLE = 2 [static] |
Indicates that the Mix is within a cascade
Referenced by mixconfig.MixConfiguration.getMixTypeAsString().
final int mixconfig.MixConfiguration.MIXTYPE_LAST = 4 [static] |
Indicates that the Mix is the last in a cascade
Referenced by mixconfig.panels.NextMixProxyPanel.actionPerformed(), mixconfig.panels.CascadePanel.check(), mixconfig.panels.GeneralPanel.enableComponents(), mixconfig.MixConfiguration.getMixType(), mixconfig.MixConfiguration.getMixTypeAsString(), mixconfig.panels.NextMixProxyPanel.NextMixProxyPanel(), mixconfig.panels.NextMixProxyPanel.setConfiguration(), mixconfig.panels.CascadePanel.setConfiguration(), and mixconfig.panels.NextMixProxyPanel.stateChanged().
final int mixconfig.MixConfiguration.LOG_NONE = 0 [static] |
Indicates that no logging should take place
final int mixconfig.MixConfiguration.LOG_CONSOLE = 1 [static] |
Indicates that logging output should be printed to the console
final int mixconfig.MixConfiguration.LOG_SYSLOG = 2 [static] |
Indicates that logging output should be sent to the system log service
final int mixconfig.MixConfiguration.LOG_DIRECTORY = 3 [static] |
Indicates that logging output should be saved to a directory
final String mixconfig.MixConfiguration.XML_PATH_INFO_SERVICE = "InfoService" [static] |
Referenced by mixconfig.MixConfiguration.setDefaults().
final String mixconfig.MixConfiguration.MIXTYPE_NAME[] = {"FirstMix", "MiddleMix", "LastMix"} [static, private] |
An array containing the Mix types as String values. The indices correspond to the MIXTYPE_xxx constants
Referenced by mixconfig.MixConfiguration.getMixTypeAsInt(), and mixconfig.MixConfiguration.getMixTypeAsString().
final String mixconfig.MixConfiguration.VERSION = "0.61" [static, private] |
The configuration file information version number.
Referenced by mixconfig.MixConfiguration.MixConfiguration(), and mixconfig.MixConfiguration.open().
final String mixconfig.MixConfiguration.XML_ATTRIBUTE_VERSION = "version" [static, private] |
Referenced by mixconfig.MixConfiguration.open().
Document mixconfig.MixConfiguration.m_configuration = null [private] |
The configuration as a DOM document
Referenced by mixconfig.MixConfiguration.getDocument(), mixconfig.MixConfiguration.getNode(), mixconfig.MixConfiguration.isAccountingNodePresent(), mixconfig.MixConfiguration.MixConfiguration(), mixconfig.MixConfiguration.performReloadCheck(), mixconfig.MixConfiguration.save(), mixconfig.MixConfiguration.setMixConfiguration(), mixconfig.MixConfiguration.setValue(), and mixconfig.MixConfiguration.setValues().
boolean mixconfig.MixConfiguration.m_bSavedToFile = true [private] |
Vector<ChangeListener> mixconfig.MixConfiguration.m_changeListeners = new Vector<ChangeListener>() [private] |
A list of ChangeListeners receiving events from this object whenever the value of an attribute changes
Referenced by mixconfig.MixConfiguration.addChangeListener(), mixconfig.MixConfiguration.fireStateChanged(), and mixconfig.MixConfiguration.removeChangeListener().
1.5.6