[cvs] expresso commit by rimovm: Fixed some bugs where some
controller
JCorporate Ltd
jcorp at jcorporate.com
Wed Jun 29 23:33:12 UTC 2005
Log Message:
-----------
Fixed some bugs where some controller classes only had ExpressoRequest and not the corresponding ExpressoResponse in their state handlers.
Updated Database Props for MySQL MaxDB version 7.6
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller:
ControllerRequest.java
ExpressoRequest.java
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller:
CacheControl.java
Configuration.java
ControllerSecurityMatrix.java
SimpleRegistration.java
expresso/expresso-web/expresso/doc/db:
sapdbprops.html
Revision Data
-------------
Index: ControllerRequest.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ControllerRequest.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ControllerRequest.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ControllerRequest.java -u -r1.40 -r1.41
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ControllerRequest.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ControllerRequest.java
@@ -566,6 +566,21 @@
}
/* getParameter(String) */
+ /**
+ * In HTTP situations, in particular, it is possible to submit more than
+ * one value for a given parameter. Arrays of checkboxes are the most
+ * often used version of that, although certainly not the only case.
+ * If you have a view that can do this, then you can use this function
+ * instead of Servlet.getParameterValues
+ * @param paramCode String
+ * @return Array of strings. May be a zero length array if there are not
+ * any values for that parameter.
+ */
+ public String[] getParameterValues(final String paramCode) {
+ return new String[0];
+ }
+
+
/**
* Does a specified parameter refer to an uploaded file?
Index: ExpressoRequest.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ExpressoRequest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ExpressoRequest.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ExpressoRequest.java -u -r1.1 -r1.2
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ExpressoRequest.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/ExpressoRequest.java
@@ -8,6 +8,7 @@
import com.jcorporate.expresso.core.security.User;
import java.io.Serializable;
import com.jcorporate.expresso.core.dbobj.RequestContext;
+import java.util.List;
/**
* Iterface for request objects running inside an Expresso controller.
@@ -112,6 +113,19 @@
* @return java.lang.String
*/
String getParameter(String paramCode);
+
+
+ /**
+ * In HTTP situations, in particular, it is possible to submit more than
+ * one value for a given parameter. Arrays of checkboxes are the most
+ * often used version of that, although certainly not the only case.
+ * If you have a view that can do this, then you can use this function
+ * instead of Servlet.getParameterValues
+ * @param paramCode String
+ * @return Array of strings. May be a zero length array if there are not
+ * any values for that parameter.
+ */
+ String[] getParameterValues(String paramCode);
/**
Index: Configuration.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/Configuration.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/Configuration.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/Configuration.java -u -r1.9 -r1.10
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/Configuration.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/Configuration.java
@@ -66,7 +66,7 @@
import com.jcorporate.expresso.core.controller.ControllerException;
import com.jcorporate.expresso.core.controller.ControllerRequest;
-import com.jcorporate.expresso.core.controller.ControllerResponse;
+import com.jcorporate.expresso.core.controller.ExpressoResponse;
import com.jcorporate.expresso.core.controller.Input;
import com.jcorporate.expresso.core.controller.SecureIfSetController;
import com.jcorporate.expresso.core.controller.State;
@@ -150,7 +150,7 @@
* @param request the controller request object
* @param response the controller response object
*/
- public void runShowConfigurationFileState(final ExpressoRequest request, final ControllerResponse response) {
+ public void runShowConfigurationFileState(final ExpressoRequest request, final ExpressoResponse response) {
}
@@ -161,7 +161,7 @@
* @param request The <code>ControllerRequest</code> object that is
* @param response the controller response object
*/
- public void showContainerStatusState(final ExpressoRequest request, final ControllerResponse response) {
+ public void showContainerStatusState(final ExpressoRequest request, final ExpressoResponse response) {
}
@@ -170,7 +170,7 @@
* @param request the controller request object
* @param response the controller response object
*/
- public void runSwitchRuntimeState(final ExpressoRequest request, final ControllerResponse response) {
+ public void runSwitchRuntimeState(final ExpressoRequest request, final ExpressoResponse response) {
}
@@ -179,7 +179,7 @@
* @param request the controller request object
* @param response the controller response object
*/
- public void runShowContainerStatusState(final ExpressoRequest request, final ControllerResponse response) {
+ public void runShowContainerStatusState(final ExpressoRequest request, final ExpressoResponse response) {
}
@@ -187,7 +187,7 @@
* @param request the controller request object
* @param response the controller response object
*/
- public void runShowComponentState(final ExpressoRequest request, final ControllerResponse response) {
+ public void runShowComponentState(final ExpressoRequest request, final ExpressoResponse response) {
}
@@ -196,7 +196,7 @@
* @param request the controller request object
* @param response the controller response object
*/
- public void runSummaryState(final ExpressoRequest request, final ControllerResponse response) {
+ public void runSummaryState(final ExpressoRequest request, final ExpressoResponse response) {
response.setTitle("Expresso Runtime Configuration");
}
@@ -207,7 +207,7 @@
* @throws ControllerException upon error
*/
public void runPromptCreateRuntime(final ExpressoRequest request
- , final ControllerResponse response) throws ControllerException {
+ , final ExpressoResponse response) throws ControllerException {
response.setTitle("Create New Runtime");
Input i = new Input("runtimeName", "Runtime Name(Leave Blank For Default)");
Transition t = new Transition(STATE_PROCESS_CREATE_RUNTIME, this);
@@ -224,7 +224,7 @@
* @throws ControllerException upon error
*/
public void runProcessCreateRuntime(final ExpressoRequest request
- , final ControllerResponse response) throws ControllerException {
+ , final ExpressoResponse response) throws ControllerException {
RootContainer rc = new RootContainer();
rc.setContainerImplementation(new DefaultContainerImpl());
rc.setExpressoServicesConfig(new ExpressoServicesConfig());
Index: CacheControl.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/CacheControl.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/CacheControl.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/CacheControl.java -u -r1.20 -r1.21
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/CacheControl.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/CacheControl.java
@@ -71,7 +71,7 @@
import com.jcorporate.expresso.core.cache.Cacheable;
import com.jcorporate.expresso.core.controller.ControllerException;
import com.jcorporate.expresso.core.controller.ControllerRequest;
-import com.jcorporate.expresso.core.controller.ControllerResponse;
+import com.jcorporate.expresso.core.controller.ExpressoResponse;
import com.jcorporate.expresso.core.controller.DBController;
import com.jcorporate.expresso.core.controller.Input;
import com.jcorporate.expresso.core.controller.Output;
@@ -136,7 +136,7 @@
* @param key The key for the cache or 'all' if you want to retrieve
* all elements in the cache
*/
- private void addAllItems(Output o, String db, String cacheName, String key)
+ private void addAllItems(final Output o, final String db, final String cacheName, final String key)
throws CacheException {
long curTime = System.currentTimeMillis();
CacheSystem cs = CacheManager.getCacheSystem(db);
@@ -181,7 +181,7 @@
* @param request The ControllerRequest Object
* @param response the ControllerResposne
*/
- private void runClearState(ExpressoRequest request, ControllerResponse response)
+ private void runClearState(final ExpressoRequest request, final ExpressoResponse response)
throws ControllerException {
try {
DBConnectionPool.reInitialize();
@@ -261,10 +261,10 @@
/**
* Show the current state of the cache
*
- * @param response the ControllerResponse Object
+ * @param response the ExpressoResponse Object
* @param request The ControllerRequest object
*/
- private void runDisplayState(final ExpressoRequest request, final ControllerResponse response)
+ private void runDisplayState(final ExpressoRequest request, final ExpressoResponse response)
throws ControllerException {
if (!request.getParameter("key").equalsIgnoreCase("all")) {
if (request.getParameter("dbContext").equalsIgnoreCase("all")) {
@@ -349,10 +349,10 @@
/**
* Prompt for the command to perform
*
- * @param response The ControllerResponse object
+ * @param response The ExpressoResponse object
* @param request The ControllerRequest object
*/
- private void runPromptState(final ExpressoRequest request, final ControllerResponse response)
+ private void runPromptState(final ExpressoRequest request, final ExpressoResponse response)
throws ControllerException {
Input db = new Input();
db.setLabel("Database/Context (or 'all')");
Index: SimpleRegistration.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/SimpleRegistration.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/SimpleRegistration.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/SimpleRegistration.java -u -r1.44 -r1.45
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/SimpleRegistration.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/SimpleRegistration.java
@@ -71,7 +71,6 @@
import com.jcorporate.expresso.core.controller.Controller;
import com.jcorporate.expresso.core.controller.ControllerException;
import com.jcorporate.expresso.core.controller.ControllerRequest;
-import com.jcorporate.expresso.core.controller.ControllerResponse;
import com.jcorporate.expresso.core.controller.ErrorCollection;
import com.jcorporate.expresso.core.controller.Input;
import com.jcorporate.expresso.core.controller.NonHandleableException;
Index: ControllerSecurityMatrix.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ControllerSecurityMatrix.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ControllerSecurityMatrix.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ControllerSecurityMatrix.java -u -r1.24 -r1.25
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ControllerSecurityMatrix.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/controller/ControllerSecurityMatrix.java
@@ -79,7 +79,7 @@
import com.jcorporate.expresso.core.controller.Controller;
import com.jcorporate.expresso.core.controller.ControllerException;
import com.jcorporate.expresso.core.controller.ControllerRequest;
-import com.jcorporate.expresso.core.controller.ControllerResponse;
+import com.jcorporate.expresso.core.controller.ExpressoResponse;
import com.jcorporate.expresso.core.controller.DBController;
import com.jcorporate.expresso.core.controller.Input;
import com.jcorporate.expresso.core.controller.NonHandleableException;
@@ -155,11 +155,11 @@
* state.
*
* @param request The <code>ControllerRequest</code> object
- * @param response The <code>ControllerResponse</code> object
+ * @param response The <code>ExpressoResponse</code> object
* @throws ControllerException upon error
*/
private void addStartAgainButton(final ExpressoRequest request,
- ControllerResponse response) throws ControllerException {
+ ExpressoResponse response) throws ControllerException {
Transition again = new Transition("Start Again",
getClass().getName());
@@ -186,12 +186,12 @@
* Build the matrix for user to select the allowed controllers
* for this user and this schema
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
* @throws ControllerException upon error
*/
private void getSelControllerMatrix(final ExpressoRequest params,
- ControllerResponse myResponse)
+ ExpressoResponse myResponse)
throws ControllerException {
String myName = (thisClass + "getDBObjMatrix()");
Schema mySchema = getSchema(params.getParameter("SchemaClass"));
@@ -305,11 +305,11 @@
* Build the matrix for user to select the allowed states
* for this user and this controller
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
* @throws NonHandleableException upon fatal error
*/
- private void getSelStatesMatrix(final ControllerResponse myResponse,
+ private void getSelStatesMatrix(final ExpressoResponse myResponse,
final ExpressoRequest params)
throws ControllerException,
NonHandleableException {
@@ -397,10 +397,10 @@
/**
* Prompt for a schema and usergroup
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
*/
- private void runPromptState(final ExpressoRequest params, ControllerResponse myResponse)
+ private void runPromptState(final ExpressoRequest params, ExpressoResponse myResponse)
throws ControllerException {
{
Input chooseGroup = new Input();
@@ -491,11 +491,11 @@
/**
* Select a Controller to administer states for.
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
*/
private void runSelconState(final ExpressoRequest params,
- ControllerResponse myResponse)
+ ExpressoResponse myResponse)
throws ControllerException {
String myName = (thisClass + "selControllerState()");
Schema mySchema = getSchema(params.getParameter("SchemaClass"));
@@ -555,12 +555,12 @@
* Set allowed states of a particular controller for
* one group and controller combination
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
* @throws NonHandleableException upon fatal error
*/
private void runSelstatesState(final ExpressoRequest params,
- ControllerResponse myResponse)
+ ExpressoResponse myResponse)
throws ControllerException, NonHandleableException {
String myName = (thisClass + "selStatesState()");
Controller oneController = ConfigManager.getControllerFactory().getController(params.getParameter(
@@ -595,11 +595,11 @@
/**
* Set allowed Controller for a schema and group
*
- * @param myResponse the ControllerResponse object
+ * @param myResponse the ExpressoResponse object
* @param params the ControllerRequest object
*/
private void runSetconState(final ExpressoRequest params,
- ControllerResponse myResponse)
+ ExpressoResponse myResponse)
throws ControllerException,
NonHandleableException {
String myName = (thisClass + "setControllerState()");
@@ -648,11 +648,11 @@
* Update allowed states for a particular controller
* and group
*
- * @param response the ControllerResponse object
+ * @param response the ExpressoResponse object
* @param request the ControllerRequest object
*/
private void runUpdconState(final ExpressoRequest request,
- ControllerResponse response)
+ ExpressoResponse response)
throws ControllerException {
String myName = (thisClass + "updControllerState()");
Schema mySchema = getSchema(request.getParameter("SchemaClass"));
@@ -751,12 +751,12 @@
/**
* Update the allowed states
*
- * @param response the ControllerResponse object
+ * @param response the ExpressoResponse object
* @param request the ControllerRequest object
* @throws NonHandleableException upon fatal error
*/
private void runUpdstatesState(final ExpressoRequest request,
- ControllerResponse response)
+ ExpressoResponse response)
throws ControllerException, NonHandleableException {
String myName = (thisClass + "updStatesState()");
Controller con = ConfigManager.getControllerFactory().getController(request.getParameter("ControllerClass"));
Index: sapdbprops.html
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/expresso/doc/db/sapdbprops.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lexpresso-web/expresso/doc/db/sapdbprops.html -Lexpresso-web/expresso/doc/db/sapdbprops.html -u -r1.1 -r1.2
--- expresso-web/expresso/doc/db/sapdbprops.html
+++ expresso-web/expresso/doc/db/sapdbprops.html
@@ -5,10 +5,54 @@
</head>
<body bgcolor="#FFFFFF" text="#000000">
-<h2>Example expresso-config for SapDB</h2>
+<h2>Example expresso-config for MySQL MaxDB/ SapDB</h2>
+<p>MaxDB is a powerful Enterprise-class database, originally created by SAP for running their R/3 programs. Since version 7.5, it has been rebranded MaxDB and marketed by MySQL AB. However, the original SAP database team still works on the product.</p>
+<p>The following snippets are not the complete expresso-config file for a given database context. Rather, they represent the snippets that go in the 'jdbc' and 'type mapping' sections. All the rest of the context information may be kept standard or adjusted for your own needs. </p>
+<h2>Database Versions </h2>
+<p><a href="#Maxb76">MaxDB Version 7.6</a></p>
+<p><a href="#Sapdb">SapDB 7.X Series and MaxDB Up To Version 7.5</a></p>
+<p> </p>
+<h3><a name="Maxb76"></a>MySQL MaxDB Version 7.6</h3>
+<p>The following configuration was defined using the driver version 7.6.00.00.360 with MaxDB Version
+7.6.00.10. Different Versions may have slight type mapping differences. You can get more information about MySQL MaxDB at <a href="http://www.mysql.com/products/maxdb" target="_blank">http://www.mysql.com/products/maxdb</a> </p>
+<p>It seems the database driver has some issues reporting the type mappings properly compared to previously, so further configuration data is required. </p>
+<pre>
+ <jdbc driver="com.sap.dbtech.jdbc.DriverSapDB" url="jdbc:sapdb://[Database Server Location such as localhost]/[DBName]" connectFormat="3"
+ login="[Login Name]" password="[DBA Password]" cache="y" createTableIndicies="true"
+ skipText="true" escapeHandler="com.jcorporate.expresso.core.db.DoubleQuoteEscapeHandler"/>
+ <type-mapping>
+ <java-type>NUMERIC</java-type>
+ <db-type>FIXED</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>BIGINT</java-type>
+ <db-type>INTEGER</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>TINYINT</java-type>
+ <db-type>SMALLINT</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>FLOAT</java-type>
+ <db-type>FIXED</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>BINARY</java-type>
+ <db-type>LONG BYTE</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>CHAR</java-type>
+ <db-type>CHAR</db-type>
+ </type-mapping>
+ <type-mapping>
+ <java-type>BIT</java-type>
+ <db-type>BOOLEAN</db-type>
+ </type-mapping>
+ </pre>
+<h3><a name="Sapdb"></a>SapDB and MaxDB Up To Version 7.5 </h3>
<p>This configuration works with the latest SapDB version. Please note that you
- will need to download the 'patched' JDBC driver for SapDB to work with Expresso.
- You can get them from <a href="http://www.sapdb.org/" target="_NEW">http://www.sapdb.org/</a></p>
+ will need to download the 'patched' JDBC driver for SapDB to work with Expresso.
+ You can get them from <a href="http://www.sapdb.org/" target="_blank">http://www.sapdb.org/</a></p>
<blockquote>
<pre> <jdbc driver="com.sap.dbtech.jdbc.DriverSapDB"
url="jdbc:sapdb://<databaseServer>/<databaseName>"
@@ -21,6 +65,6 @@
escapeHandler="com.jcorporate.expresso.core.db.DoubleQuoteEscapeHandler"/>
<br> <type-mapping><br> <java-type>NUMERIC</java-type><br> <db-type>FIXED</db-type><br> </type-mapping><br> <type-mapping><br> <java-type>BIGINT</java-type><br> <db-type>INTEGER</db-type><br> </type-mapping><br> <type-mapping><br> <java-type>TINYINT</java-type><br> <db-type>SMALLINT</db-type><br> </type-mapping><br> <type-mapping><br> <java-type>FLOAT</java-type><br> <db-type>FIXED</db-type><br> </type-mapping><br> <type-mapping><br> <java-type>BINARY</java-type><br> <db-type>LONG BYTE</db-type><br> </type-mapping><br><br></pre>
</blockquote>
-<P><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"> Last Modified: 1 Sep, 2002</FONT></P>
+<P><FONT color="#666666" size="1" face="Arial, Helvetica, Verdana"> Last Modified: 28 Sep, 2005</FONT></P>
</body>
</html>
More information about the cvs
mailing list