com.gsoft.titration.client
Class TitrationDataManager

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--com.gsoft.titration.client.TitrationDataManager
Direct Known Subclasses:
TitrationUI

public class TitrationDataManager
extends JFrame


Field Summary
 private ConnectionManagerconMgr
           
 private Connectionconn
           
 private HashtableconnList
           
 private EncryptionUtilityencUtil
           
 private PreparedStatementpstate
           
 private HashtablestmtSQL
           
 protected TagReadertReader
           

Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled, accessibleContext

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
TitrationDataManager()
           

Method Summary
 booleanaddNewUser(String un, String pw, String dn)
           
 voidaddNotes(String date, String comment, int userid, int projectid)
           
 voidcreatePreparedStatement(String name, String sql)
           
 LoginItemdoLogin(String uname, String pword)
           
 ArrayListfetchNotes(int projectid)
           
 Object[]fetchProjectLists(int userid)
           
 PreparedStatementfetchStoredProcedure(String name)
           
 ArrayListfetchUserList()
           
 private StringformatDate(String date)
           
 intgetNextNum(String table)
           
 ArrayListgetProjectList(int userid)
           
 private voidinitStatements()
           
 booleanprojectNameOnfile(String pname)
           
 private voidrefreshStatements()
           
 voidresetPassword(int userid, String pword)
           
 voidsaveNewProject(ProjectItem pi, int userID)
           
 voidupdateExistingProject(ProjectItem pi)
           
 voidupdatePriority(Object[] items)
           
 voidupdateUserProjects(int userid, Iterator list)
           
 private voidvalidateConnection()
           
 intvalidateUpdateUserPassword(int userid, String old, String newpw)
           

Methods inherited from class javax.swing.JFrame
frameInit, createRootPane, processKeyEvent, processWindowEvent, setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, isRootPaneCheckingEnabled, setRootPaneCheckingEnabled, addImpl, remove, setLayout, getRootPane, setRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, paramString, getAccessibleContext

Methods inherited from class java.awt.Frame
finalize, addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames

Methods inherited from class java.awt.Window
pack, show, hide, dispose, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, processEvent, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, validateTree, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, processContainerEvent, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, addKeyListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, enableEvents, disableEvents, coalesceEvents, processComponentEvent, processFocusEvent, processMouseEvent, processMouseMotionEvent, processInputMethodEvent, processHierarchyEvent, processHierarchyBoundsEvent, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait

Field Detail

conMgr

private ConnectionManager conMgr

conn

private Connection conn

connList

private Hashtable connList

encUtil

private EncryptionUtility encUtil

pstate

private PreparedStatement pstate

stmtSQL

private Hashtable stmtSQL

tReader

protected TagReader tReader
Constructor Detail

TitrationDataManager

public TitrationDataManager()
Method Detail

addNewUser

public boolean addNewUser(String un, String pw, String dn)
throws java.lang.Exception

addNotes

public void addNotes(String date, String comment, int userid, int projectid)
throws java.lang.Exception

createPreparedStatement

public void createPreparedStatement(String name, String sql)
throws java.lang.Exception

doLogin

public LoginItem doLogin(String uname, String pword)
throws java.lang.Exception

fetchNotes

public ArrayList fetchNotes(int projectid)
throws java.lang.Exception

fetchProjectLists

public Object[] fetchProjectLists(int userid)
throws java.lang.Exception

fetchStoredProcedure

public PreparedStatement fetchStoredProcedure(String name)
throws java.lang.Exception

fetchUserList

public ArrayList fetchUserList()
throws java.lang.Exception

formatDate

private String formatDate(String date)

getNextNum

public int getNextNum(String table)
throws java.lang.Exception

getProjectList

public ArrayList getProjectList(int userid)
throws java.lang.Exception

initStatements

private void initStatements()
throws java.lang.Exception

projectNameOnfile

public boolean projectNameOnfile(String pname)
throws java.lang.Exception

refreshStatements

private void refreshStatements()
throws java.lang.Exception

resetPassword

public void resetPassword(int userid, String pword)
throws java.lang.Exception

saveNewProject

public void saveNewProject(ProjectItem pi, int userID)
throws java.lang.Exception

updateExistingProject

public void updateExistingProject(ProjectItem pi)
throws java.lang.Exception

updatePriority

public void updatePriority(Object[] items)
throws java.lang.Exception

updateUserProjects

public void updateUserProjects(int userid, Iterator list)
throws java.lang.Exception

validateConnection

private void validateConnection()
throws java.lang.Exception

validateUpdateUserPassword

public int validateUpdateUserPassword(int userid, String old, String newpw)
throws java.lang.Exception