|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.silverpeas.mydb.control.MyDBSessionController
public class MyDBSessionController
MyDB session control.
Field Summary |
---|
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController |
---|
CHARACTER_ENCODING, context |
Constructor Summary | |
---|---|
MyDBSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl,
com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
Standard Session Controller Constructor |
Method Summary | |
---|---|
boolean |
checkConnection()
|
boolean |
checkTableName()
|
String |
createDbLine()
|
boolean |
createTable()
Executes the different queries to create the table corresponding to the current informations of the controller. |
String |
deleteDbData()
|
boolean |
dropTable()
Removes from the database the table corresponding to the current informations of the controller. |
DateFormatter |
getDateFormatter()
|
DbFilter |
getDbFilter()
|
DbTable |
getDbTable()
|
DriverManager |
getDriverManager()
|
com.silverpeas.form.Form |
getForm(boolean consultation,
boolean newRecord,
String beanName)
|
String |
getFormParameter(String key)
|
IndexList |
getIndexInfo(String tableName)
|
com.stratelia.silverpeas.selectionPeas.jdbc.JdbcConnectorSetting |
getJdbcConnectorSetting()
|
String |
getJdbcDriverName()
|
String |
getJdbcUrl()
|
String |
getLineCreationErrorMessage()
|
String |
getLineDeletionErrorMessage()
|
int |
getLineIndex()
|
String |
getLogin()
|
String |
getPassword()
|
com.silverpeas.form.DataRecord |
getRecord(boolean newRecord)
|
com.stratelia.silverpeas.util.ResourcesWrapper |
getResources()
|
int |
getRowLimit()
|
TableManager |
getTableManager()
|
String |
getTableName()
|
String[] |
getTableNames()
|
boolean |
hasTableManager()
|
void |
initDbFilter()
Initializes the database filter. |
void |
initFormParameters(Map<String,String[]> parameterMap)
Loads in the form's parameters the values contained into the map. |
void |
initJdbcConnectorSetting()
Initializes the JDBC connector setting. |
void |
initTableManager(int mode,
String originPage)
Initializes the table manager. |
void |
removeLineIndex()
|
void |
resetTableManager()
Reset the table manager. |
void |
setLineIndex(int lineIndex)
|
void |
setTableName(String tableName)
Update the table's name and the corresponding connection information. |
void |
updateConnection(String JDBCdriverName,
String JDBCurl,
String login,
String password,
int rowLimit)
Updates the database connection informations. |
String |
updateDbData()
|
void |
updateDbFilter(String column,
String compare,
String value)
Update the database filter. |
void |
updateTableName(String tableName)
Update the table's name. |
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 |
---|
public MyDBSessionController(com.stratelia.silverpeas.peasCore.MainSessionController mainSessionCtrl, com.stratelia.silverpeas.peasCore.ComponentContext componentContext)
mainSessionCtrl
- The user's profilecomponentContext
- The component's profileMethod Detail |
---|
public DriverManager getDriverManager()
public void setLineIndex(int lineIndex)
public int getLineIndex()
public void removeLineIndex()
public DbFilter getDbFilter()
public void initDbFilter()
public void updateDbFilter(String column, String compare, String value)
column
- The name of the column.compare
- The symbol which links the column and the value.value
- The value.public void updateTableName(String tableName) throws MyDBException
tableName
- The new name of the table.
MyDBException
public boolean checkTableName()
public void setTableName(String tableName) throws MyDBException
tableName
- The new table's name.
MyDBException
public TableManager getTableManager()
public void initTableManager(int mode, String originPage)
mode
- the table mode (creation or modification).originPage
- The origin page. Indeed, table mode can be accessed from the table selection
page or the table detail page. This information is also memorized to go back to the origin page
when table mode is left.public boolean hasTableManager()
public void resetTableManager()
public com.stratelia.silverpeas.util.ResourcesWrapper getResources()
public DateFormatter getDateFormatter()
public void updateConnection(String JDBCdriverName, String JDBCurl, String login, String password, int rowLimit) throws MyDBException
JDBCdriverName
- The name of the driver.JDBCurl
- The URL to access the database.login
- The login to access the database.password
- The password to access the database.rowLimit
- The maximum number of elements to display in a response to a database request.
MyDBException
public void initJdbcConnectorSetting()
public com.stratelia.silverpeas.selectionPeas.jdbc.JdbcConnectorSetting getJdbcConnectorSetting()
public String getJdbcDriverName()
public String getJdbcUrl()
public String getLogin()
public String getPassword()
public String getTableName()
public int getRowLimit()
public boolean checkConnection()
public String[] getTableNames()
public DbTable getDbTable() throws MyDBException
MyDBException
public IndexList getIndexInfo(String tableName) throws MyDBException
tableName
- The table's name.
MyDBException
public String getLineCreationErrorMessage()
public String createDbLine()
public String updateDbData()
public String getLineDeletionErrorMessage()
public String deleteDbData()
public com.silverpeas.form.Form getForm(boolean consultation, boolean newRecord, String beanName) throws MyDBException
consultation
- The flag indicating if data have to be displayed as labels or input fields.newRecord
- The flag which indicates if the form describes a new record or a record to
update.beanName
- Le bean's name.
MyDBException
public com.silverpeas.form.DataRecord getRecord(boolean newRecord) throws com.silverpeas.form.FormException
newRecord
- The flag which indicated if the form describes a new record or a record to
update.
com.silverpeas.form.FormException
public void initFormParameters(Map<String,String[]> parameterMap)
parameterMap
- The map which contains the record's describing data.public String getFormParameter(String key)
key
- The name of the searched parameter.
public boolean createTable()
public boolean dropTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |