cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation SQLTransformer.java
Date Thu, 06 Sep 2001 19:56:22 GMT
bloritsch    01/09/06 12:56:22

  Modified:    src/org/apache/cocoon/acting AbstractDatabaseAction.java
                        ScriptAction.java
               src/org/apache/cocoon/reading DatabaseReader.java
               src/org/apache/cocoon/transformation SQLTransformer.java
  Removed:     src/org/apache/cocoon Roles.java
  Log:
  Remove requirement for Roles interface
  
  Revision  Changes    Path
  1.11      +21 -22    xml-cocoon2/src/org/apache/cocoon/acting/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/AbstractDatabaseAction.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AbstractDatabaseAction.java	2001/08/20 13:55:09	1.10
  +++ AbstractDatabaseAction.java	2001/09/06 19:56:22	1.11
  @@ -158,7 +158,7 @@
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
    * @author <a href="mailto:balld@apache.org">Donald Ball</a>
  - * @version CVS $Revision: 1.10 $ $Date: 2001/08/20 13:55:09 $
  + * @version CVS $Revision: 1.11 $ $Date: 2001/09/06 19:56:22 $
    */
   public abstract class AbstractDatabaseAction extends AbstractComplementaryConfigurableAction
implements Configurable, Disposable {
       protected Map files = new HashMap();
  @@ -167,7 +167,7 @@
   
       static {
           /** Initialize the map of type names to jdbc column types.
  -            Note that INTEGER, BLOB, and VARCHAR column types map to more than 
  +            Note that INTEGER, BLOB, and VARCHAR column types map to more than
               one type name. **/
           Map constants = new HashMap();
           constants.put("ascii", new Integer(Types.CLOB));
  @@ -201,8 +201,7 @@
        * Compose the Actions so that we can select our databases.
        */
       public void compose(ComponentManager manager) throws ComponentException {
  -        //this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE);
  -        this.dbselector = (ComponentSelector) manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
  +        this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE +
"Selector");
   
           super.compose(manager);
       }
  @@ -317,7 +316,7 @@
       /**
        * Set the Statement column so that the results are mapped correctly. The
        * value of the column is retrieved from the request object. If the
  -     * named parameter exists in the request object's parameters, that value 
  +     * named parameter exists in the request object's parameters, that value
        * is used. Otherwise if the named parameter exists in the request object's
        * attributes, that value is used. Otherwise the request object is
        * retrieved using Request.get(attribute), which is documented to be the
  @@ -537,8 +536,8 @@
                       file = (File) request.get(imageAttr);
                       synchronized (this.files) {
                           Parameters parameters = (Parameters) this.files.get(file);
  -			String imageMimeType = parameters.getParameter("image-mime-type",
  -								       (String) settings.get("image-mime-type",""));
  +            String imageMimeType = parameters.getParameter("image-mime-type",
  +                                       (String) settings.get("image-mime-type",""));
                           statement.setString(position, imageMimeType);
                           /** Store the image mime type in the request attributes.
                               Why do we do this? **/
  @@ -590,14 +589,14 @@
                       file = (File) request.get(imageAttr);
                       synchronized (this.files) {
                           Parameters parameters = (Parameters) this.files.get(file);
  -			statement.setInt(position, parameters.getParameterAsInteger("image-width", 
  -				         Integer.parseInt((String)settings.get("image-width","-1"))));
  +            statement.setInt(position, parameters.getParameterAsInteger("image-width",
  +                         Integer.parseInt((String)settings.get("image-width","-1"))));
                           /** Store the image width in the request attributes.
                               Why do we do this? **/
                           setRequestAttribute(request,
  -					    param,
  -					    parameters.getParameter("image-width",
  -								    (String) settings.get("image-width","")));
  +                        param,
  +                        parameters.getParameter("image-width",
  +                                    (String) settings.get("image-width","")));
                       }
                       break;
                   } else if ("image-height".equals(typeName)) {
  @@ -606,12 +605,12 @@
                       file = (File) request.get(imageAttr);
                       synchronized (this.files) {
                           Parameters parameters = (Parameters) this.files.get(file);
  -                        statement.setInt(position, parameters.getParameterAsInteger("image-height",

  -				         Integer.parseInt((String)settings.get("image-height","-1"))));
  +                        statement.setInt(position, parameters.getParameterAsInteger("image-height",
  +                         Integer.parseInt((String)settings.get("image-height","-1"))));
                           setRequestAttribute(request,
  -					    param,
  -					    parameters.getParameter("image-height",
  -								    (String) settings.get("image-height","")));
  +                        param,
  +                        parameters.getParameter("image-height",
  +                                    (String) settings.get("image-height","")));
                       }
                       break;
                   } else if ("image-size".equals(typeName)) {
  @@ -620,12 +619,12 @@
                       file = (File) request.get(imageAttr);
                       synchronized (this.files) {
                           Parameters parameters = (Parameters) this.files.get(file);
  -                        statement.setInt(position, parameters.getParameterAsInteger("image-size",

  -				         Integer.parseInt((String)settings.get("image-height","-1"))));
  +                        statement.setInt(position, parameters.getParameterAsInteger("image-size",
  +                         Integer.parseInt((String)settings.get("image-height","-1"))));
                           setRequestAttribute(request,
  -					    param,
  -					    parameters.getParameter("image-size",
  -								    (String) settings.get("image-size","")));
  +                        param,
  +                        parameters.getParameter("image-size",
  +                                    (String) settings.get("image-size","")));
                       }
                       break;
                   } else if ("row-index".equals(typeName)) {
  
  
  
  1.4       +1 -2      xml-cocoon2/src/org/apache/cocoon/acting/ScriptAction.java
  
  Index: ScriptAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/acting/ScriptAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ScriptAction.java	2001/08/22 12:03:32	1.3
  +++ ScriptAction.java	2001/09/06 19:56:22	1.4
  @@ -17,7 +17,6 @@
   import org.apache.avalon.framework.thread.ThreadSafe;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  -import org.apache.cocoon.Roles;
   import org.apache.cocoon.environment.Redirector;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.Source;
  @@ -34,7 +33,7 @@
    * A simple action that executes any script that can be run by the BSF
    */
   
  -public class ScriptAction extends ComposerAction implements Roles, ThreadSafe {
  +public class ScriptAction extends ComposerAction implements ThreadSafe {
   
   
       public Map act( Redirector redirector, SourceResolver resolver, Map objectModel, String
source, Parameters par ) throws Exception
  
  
  
  1.7       +1 -2      xml-cocoon2/src/org/apache/cocoon/reading/DatabaseReader.java
  
  Index: DatabaseReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/reading/DatabaseReader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DatabaseReader.java	2001/08/20 13:55:16	1.6
  +++ DatabaseReader.java	2001/09/06 19:56:22	1.7
  @@ -69,8 +69,7 @@
        */
       public void compose(ComponentManager manager) throws ComponentException {
           this.manager = manager;
  -        //this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE
+ "Selector");
  -        this.dbselector = (ComponentSelector) manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
  +        this.dbselector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE +
"Selector");
       }
   
       /**
  
  
  
  1.18      +2 -3      xml-cocoon2/src/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SQLTransformer.java	2001/08/20 17:18:38	1.17
  +++ SQLTransformer.java	2001/09/06 19:56:22	1.18
  @@ -51,7 +51,7 @@
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Revision: 1.17 $ $Date: 2001/08/20 17:18:38 $ $Author: dims $
  + * @version CVS $Revision: 1.18 $ $Date: 2001/09/06 19:56:22 $ $Author: bloritsch $
    */
   
   public class SQLTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable, Configurable {
  @@ -131,8 +131,7 @@
       public void compose(ComponentManager manager) {
           try {
               this.manager = manager;
  -            //this.dbSelector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE
+ "Selector");
  -            this.dbSelector = (ComponentSelector) manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
  +            this.dbSelector = (ComponentSelector) manager.lookup(DataSourceComponent.ROLE
+ "Selector");
           } catch (ComponentException cme) {
               getLogger().warn("Could not get the DataSource Selector", cme);
           }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message