org.silverpeas.connecteurJDBC.control
Class ConnecteurJDBCSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by org.silverpeas.connecteurJDBC.control.ConnecteurJDBCSessionController
All Implemented Interfaces:
com.stratelia.silverpeas.peasCore.ComponentSessionController

public class ConnecteurJDBCSessionController
extends com.stratelia.silverpeas.peasCore.AbstractComponentSessionController

Title: Connecteur JDBC Description: Ce composant a pour objet de permettre de recuperer rapidement et simplement des donnees du systeme d'information de l'entreprise.


Field Summary
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
ConnecteurJDBCSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
          Constructeur
 
Method Summary
 String checkConnection(String JDBCurl, String login, String password)
           
 String checkRequest(String request)
           
 void closeConnection()
           
 Collection<String> getAvailableDriversDisplayNames()
           
 Collection<String> getAvailableDriversNames()
           
 String getColumn()
          get the column of the SQL request
 int getColumnCount()
          get the number of the columns of the SQL request results
 String getColumnName(int i)
          get the name of the column number i
 String[] getColumnNames(String tableName)
          get the columns names corrsponding to a table name
 String getColumnReq()
          get the column selected to restrict the request results in the page connecteurJDBC.jsp
 String getColumnType(int i)
          get the type of the column number i
 String getColumnValue()
          get the value with wich a column is compared to restrict the sql request results
 String getCompare()
          get the symbole of comparison
 String getDescriptionForDriver(String driverName)
           
 Collection<String> getDriversDescriptions()
           
 String getFullRequest()
          get the full request
 String getJDBCdriverName()
           
 String getJDBCurl()
           
 Collection<String> getJDBCUrlsForDriver(String driverName)
           
 String getLastColumn()
           
 String getLastValidRequest()
          get the last valid request
 String getLogin()
           
 boolean getNext()
           
 String getPassword()
           
 int getRowLimit()
           
 String getSelected()
           
 Vector<String> getSelectedColumn()
           
 String getSortType()
          get the sort type asc or desc
 String getSQLreq()
           
 String getString(int i)
           
 String getTable()
          get the table of the SQL request
 String[] getTableNames()
          get the liste of the table names
 boolean isConnectionConfigured()
           
 void loadDrivers()
           
 void setColumn(String column)
          set the column of the SQL request
 void setColumnReq(String columnReq)
          set the column selected to restrict the request results
 void setColumnValue(String columnValue)
          set the value with wich a column is compared
 void setCompare(String compare)
          set the symbole of comparaison
 void setFullRequest(String fullreq)
          set the full request
 void setJDBCdriverName(String JDBCdriverName)
           
 void setJDBCurl(String JDBCurl)
           
 void setLastColumn(String lastColumns)
           
 void setLogin(String login)
           
 void setPassword(String password)
           
 void setRowLimit(int rowLimit)
           
 void setSelected(String selected)
           
 void setSelectedColumn(Vector<String> selectedColumn)
           
 void setSortType(String sort_Type)
          set the sort type (asc or desc) of the request
 void setSQLreq(String SQLreq)
           
 void setTable(String table)
          set the table of the SQL request
 void setValidRequest(String validreq)
          set the valid request
 void startConnection()
           
 void startConnection(String temp)
           
 void updateConnection(String JDBCdriverName, String JDBCurl, String login, String password, int rowLimit)
           
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnecteurJDBCSessionController

public ConnecteurJDBCSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
                                       com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Constructeur

Parameters:
mainSessionCtrl -
componentContext -
Throws:
ConnecteurJDBCRuntimeException
Method Detail

closeConnection

public void closeConnection()

startConnection

public void startConnection()

startConnection

public void startConnection(String temp)

setValidRequest

public void setValidRequest(String validreq)
set the valid request

Parameters:
validreq -

getLastValidRequest

public String getLastValidRequest()
get the last valid request

Returns:

setFullRequest

public void setFullRequest(String fullreq)
set the full request


getFullRequest

public String getFullRequest()
get the full request


setSortType

public void setSortType(String sort_Type)
set the sort type (asc or desc) of the request


getSortType

public String getSortType()
get the sort type asc or desc


getTableNames

public String[] getTableNames()
                       throws ConnecteurJDBCException
get the liste of the table names

Throws:
ConnecteurJDBCException

getColumnNames

public String[] getColumnNames(String tableName)
                        throws ConnecteurJDBCException
get the columns names corrsponding to a table name

Throws:
ConnecteurJDBCException

setTable

public void setTable(String table)
set the table of the SQL request


getTable

public String getTable()
get the table of the SQL request


setColumn

public void setColumn(String column)
set the column of the SQL request


getColumn

public String getColumn()
get the column of the SQL request


setSelectedColumn

public void setSelectedColumn(Vector<String> selectedColumn)

getSelectedColumn

public Vector<String> getSelectedColumn()

setSelected

public void setSelected(String selected)

getSelected

public String getSelected()

setLastColumn

public void setLastColumn(String lastColumns)

getLastColumn

public String getLastColumn()

getColumnReq

public String getColumnReq()
get the column selected to restrict the request results in the page connecteurJDBC.jsp


setColumnReq

public void setColumnReq(String columnReq)
set the column selected to restrict the request results


getCompare

public String getCompare()
get the symbole of comparison

Returns:

setCompare

public void setCompare(String compare)
set the symbole of comparaison


getColumnValue

public String getColumnValue()
get the value with wich a column is compared to restrict the sql request results


setColumnValue

public void setColumnValue(String columnValue)
set the value with wich a column is compared


getColumnCount

public int getColumnCount()
get the number of the columns of the SQL request results


getColumnName

public String getColumnName(int i)
get the name of the column number i


getColumnType

public String getColumnType(int i)
get the type of the column number i


getNext

public boolean getNext()

getString

public String getString(int i)

isConnectionConfigured

public boolean isConnectionConfigured()

setJDBCdriverName

public void setJDBCdriverName(String JDBCdriverName)
                       throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

setJDBCurl

public void setJDBCurl(String JDBCurl)
                throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

setSQLreq

public void setSQLreq(String SQLreq)
               throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

setLogin

public void setLogin(String login)
              throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

setPassword

public void setPassword(String password)
                 throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

setRowLimit

public void setRowLimit(int rowLimit)
                 throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

getJDBCdriverName

public String getJDBCdriverName()

getJDBCurl

public String getJDBCurl()

getSQLreq

public String getSQLreq()

getLogin

public String getLogin()

getPassword

public String getPassword()

getRowLimit

public int getRowLimit()

loadDrivers

public final void loadDrivers()

getDriversDescriptions

public Collection<String> getDriversDescriptions()

getAvailableDriversNames

public Collection<String> getAvailableDriversNames()

getAvailableDriversDisplayNames

public Collection<String> getAvailableDriversDisplayNames()

getJDBCUrlsForDriver

public Collection<String> getJDBCUrlsForDriver(String driverName)

getDescriptionForDriver

public String getDescriptionForDriver(String driverName)

updateConnection

public void updateConnection(String JDBCdriverName,
                             String JDBCurl,
                             String login,
                             String password,
                             int rowLimit)
                      throws ConnecteurJDBCException
Throws:
ConnecteurJDBCException

checkConnection

public String checkConnection(String JDBCurl,
                              String login,
                              String password)

checkRequest

public String checkRequest(String request)


Copyright © 2016 Silverpeas. All Rights Reserved.