com.finalist.jaggenerator.modules
Class Datasource

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended bycom.finalist.jaggenerator.modules.Datasource
All Implemented Interfaces:
java.lang.Cloneable, JagBean, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class Datasource
extends javax.swing.tree.DefaultMutableTreeNode
implements JagBean

The 'JagBean' for handling datasource configuration.

Author:
Michael O'Connor - Finalist IT Group
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
 javax.swing.JComboBox jdbcURLCombo
           
 javax.swing.JTextField jndiText
           
 javax.swing.JComboBox mappingCombo
           
 javax.swing.JPanel panel
           
 javax.swing.JTextField passwordText
           
 javax.swing.JTextField userNameText
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
Datasource()
          Creates new form BeanForm
Datasource(org.w3c.dom.Element el)
           
 
Method Summary
 Database getDatabase()
          Gets the database currently selected for the application.
 TemplateString getJdbcUrl()
           
 TemplateString getJndiName()
           
 javax.swing.JPanel getPanel()
           
 TemplateString getPassword()
           
 java.lang.String getRefName()
           
 TemplateString getTypeMapping()
          Convenience method: gets the database's appserver type mapping as a TemplateString.
 TemplateString getUserName()
           
 void getXML(org.w3c.dom.Element el)
           
 void setJdbcUrl(java.lang.String jdbcUrlText)
           
 void setJndi(java.lang.String jndiText)
           
 void setMapping(java.lang.String text)
           
 void setPassword(java.lang.String passwordText)
           
 void setSupportedDatabases(Database[] dbs)
          Resets the dropdown list of supported databases.
 void setUserName(java.lang.String userNameText)
           
 java.lang.String toString()
           
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

jdbcURLCombo

public javax.swing.JComboBox jdbcURLCombo

jndiText

public javax.swing.JTextField jndiText

mappingCombo

public javax.swing.JComboBox mappingCombo

panel

public javax.swing.JPanel panel

passwordText

public javax.swing.JTextField passwordText

userNameText

public javax.swing.JTextField userNameText
Constructor Detail

Datasource

public Datasource()
Creates new form BeanForm


Datasource

public Datasource(org.w3c.dom.Element el)
Method Detail

toString

public java.lang.String toString()

getPanel

public javax.swing.JPanel getPanel()
Specified by:
getPanel in interface JagBean

getXML

public void getXML(org.w3c.dom.Element el)
            throws javax.xml.parsers.ParserConfigurationException
Specified by:
getXML in interface JagBean
Throws:
javax.xml.parsers.ParserConfigurationException

getJndiName

public TemplateString getJndiName()

setMapping

public void setMapping(java.lang.String text)

setJdbcUrl

public void setJdbcUrl(java.lang.String jdbcUrlText)

setJndi

public void setJndi(java.lang.String jndiText)

setPassword

public void setPassword(java.lang.String passwordText)

setUserName

public void setUserName(java.lang.String userNameText)

getDatabase

public Database getDatabase()
Gets the database currently selected for the application.

Returns:
the Database bean.

getTypeMapping

public TemplateString getTypeMapping()
Convenience method: gets the database's appserver type mapping as a TemplateString.

Returns:

getJdbcUrl

public TemplateString getJdbcUrl()

getUserName

public TemplateString getUserName()

getPassword

public TemplateString getPassword()

getRefName

public java.lang.String getRefName()
Specified by:
getRefName in interface JagBean

setSupportedDatabases

public void setSupportedDatabases(Database[] dbs)
Resets the dropdown list of supported databases.

Parameters:
dbs -


Copyright © 2003-2005 SourceForge. All Rights Reserved.