de.dass_it.vanhelsing.gui
Class ConfigurationBean

java.lang.Object
  extended by de.dass_it.vanhelsing.gui.BeanUtil
      extended by de.dass_it.vanhelsing.gui.TreeNavigation
          extended by de.dass_it.vanhelsing.gui.ConfigurationBean

public class ConfigurationBean
extends de.dass_it.vanhelsing.gui.TreeNavigation

List all Bacula configuration components by name.


Field Summary
private  java.lang.String selectedId
           
private  java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> selectedObject
           
private  javax.swing.tree.DefaultTreeModel tree
           
 
Constructor Summary
ConfigurationBean()
           
 
Method Summary
 void deleteResourceButtonListener(javax.faces.event.ActionEvent ae)
           
private  javax.swing.tree.DefaultMutableTreeNode[] getChildNodes(javax.swing.tree.DefaultTreeModel tree2, java.lang.String key)
          return an array of nodes of a given resource type
 int getSelectedId()
          getter method for the resId attribute of the selectedObject i.e. the selected leaf node of the data tree
 java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> getSelectedObject()
          gettter method for the selectedObject attribute
 javax.swing.tree.DefaultTreeModel getTree()
          getter method for the tree attribute
private  void init()
          init() builds the data tree of the configuration view.
 void newResourceButtonListener(javax.faces.event.ActionEvent ae)
           
 java.lang.String newResourceListener(javax.faces.event.ActionEvent ae)
          **EXPERIMENTAL** returns type of the selected resource.
 void reloadResourceButtonListener(javax.faces.event.ActionEvent ae)
          repeat the entire construction process of the data tree
 void saveButtonListener(javax.faces.event.ActionEvent ae)
          **EXPERIMENTAL** writes the selected resource to the data tree of the web service.
 void setSelectedObject(java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> selectedObject)
          setter method for the selectedObject attribute
 void setTree(javax.swing.tree.DefaultTreeModel tree)
          Setter method for the tree attribute
 void userObjectItemNodeSelected(javax.faces.event.ActionEvent ae)
          transfers the selected (by attribute resId) dataobject (resource) into an ArrayList of ViewItems Each ViewItem contain the key value pair and the rendering type.
 void userObjectItemOptionSelected(javax.faces.event.ValueChangeEvent vce)
           
 
Methods inherited from class de.dass_it.vanhelsing.gui.TreeNavigation
addNode, addNode, addNode, createTree, getNode, getNodeObject
 
Methods inherited from class de.dass_it.vanhelsing.gui.BeanUtil
getAccessType, getDataType, getFieldProperty, getProperties, getProperty, getRenderer, getRequestParameter, getRequired, setErrorMessage, setInfoMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tree

private javax.swing.tree.DefaultTreeModel tree

selectedObject

private java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> selectedObject

selectedId

private java.lang.String selectedId
Constructor Detail

ConfigurationBean

public ConfigurationBean()
Method Detail

init

private void init()
init() builds the data tree of the configuration view. The heading nodes are read from the properties file. the web service will be queried for each heading node(e.g. client).


userObjectItemNodeSelected

public void userObjectItemNodeSelected(javax.faces.event.ActionEvent ae)
transfers the selected (by attribute resId) dataobject (resource) into an ArrayList of ViewItems Each ViewItem contain the key value pair and the rendering type. If the attribute ist rendered as a selectOneMenu, the values for the selectOneMenu will be read from the data tree.

Parameters:
ae - ActionEvent which contains relevant information about the component tree. the variable is not used.

getChildNodes

private javax.swing.tree.DefaultMutableTreeNode[] getChildNodes(javax.swing.tree.DefaultTreeModel tree2,
                                                                java.lang.String key)
return an array of nodes of a given resource type

Parameters:
tree2 - copy of the data tree
key - name of the requested resource type
Returns:
dmtn array of nodes of a given resource type

newResourceButtonListener

public void newResourceButtonListener(javax.faces.event.ActionEvent ae)
Parameters:
ae -

newResourceListener

public java.lang.String newResourceListener(javax.faces.event.ActionEvent ae)
**EXPERIMENTAL** returns type of the selected resource. The method is used for an evaluation about dynamic navigation.

Parameters:
ae - ActionEvent contains relevant information about the jsf component tree.
Returns:
viewName name of the resource type of the selected data tree node

userObjectItemOptionSelected

public void userObjectItemOptionSelected(javax.faces.event.ValueChangeEvent vce)

reloadResourceButtonListener

public void reloadResourceButtonListener(javax.faces.event.ActionEvent ae)
repeat the entire construction process of the data tree

Parameters:
ae -

deleteResourceButtonListener

public void deleteResourceButtonListener(javax.faces.event.ActionEvent ae)

saveButtonListener

public void saveButtonListener(javax.faces.event.ActionEvent ae)
**EXPERIMENTAL** writes the selected resource to the data tree of the web service.

Parameters:
ae - ActionEvent contains relevant information

setTree

public void setTree(javax.swing.tree.DefaultTreeModel tree)
Setter method for the tree attribute

Parameters:
tree - tree contains the DefaultTreeModel for the data tree

getTree

public javax.swing.tree.DefaultTreeModel getTree()
getter method for the tree attribute

Returns:
tree tree contains the DefaultTreeModel for the data tree

getSelectedObject

public java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> getSelectedObject()
gettter method for the selectedObject attribute

Returns:
selectedObject selectedObject contains the data object of the selected leaf node.

setSelectedObject

public void setSelectedObject(java.util.ArrayList<de.dass_it.vanhelsing.gui.ViewItem> selectedObject)
setter method for the selectedObject attribute

Parameters:
selectedObject - selectedObject contains the data object of the selected leaf node

getSelectedId

public int getSelectedId()
getter method for the resId attribute of the selectedObject i.e. the selected leaf node of the data tree

Returns:
id resId attribute of the selected object