You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/07/18 01:01:09 UTC

cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/xmlrpc/util FileTransfer.java

jvanzyl     01/07/17 16:01:09

  Modified:    src/java/org/apache/turbine/services BaseServiceBroker.java
                        ServiceBroker.java
               src/java/org/apache/turbine/services/db/pool
                        ConnectionPool.java DBConnection.java
               src/java/org/apache/turbine/services/db/util IDBroker.java
               src/java/org/apache/turbine/services/intake IntakeTool.java
               src/java/org/apache/turbine/services/intake/model
                        BooleanField.java ComboKeyField.java Field.java
               src/java/org/apache/turbine/services/intake/validator
                        DefaultValidator.java FileValidator.java
                        IntegerValidator.java NumberKeyValidator.java
                        NumberValidator.java
               src/java/org/apache/turbine/services/pull/util
                        UIManager.java
               src/java/org/apache/turbine/services/security/impl/db
                        DBSecurityService.java DBUserManager.java
               src/java/org/apache/turbine/services/security/impl/db/entity
                        TurbineUser.java
               src/java/org/apache/turbine/services/xmlrpc/util
                        FileTransfer.java
  Log:
  - using a separate Log.java file in the services to help decouple
    until we have a better way to pass on parent application information/objects
    to components. will probably borrow ideas from avalon but use log4j
    for logging.
  
  Revision  Changes    Path
  1.44      +13 -3     jakarta-turbine/src/java/org/apache/turbine/services/BaseServiceBroker.java
  
  Index: BaseServiceBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/BaseServiceBroker.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- BaseServiceBroker.java	2001/07/14 19:36:28	1.43
  +++ BaseServiceBroker.java	2001/07/17 23:00:59	1.44
  @@ -62,10 +62,8 @@
   import java.util.List;
   import java.util.Properties;
   import java.util.Stack;
  -
   import org.apache.turbine.util.StringUtils;
   import org.apache.turbine.services.ServiceException;
  -
   import org.apache.log4j.Category;
   
   //!! this has to go away. we want to use a Configuration
  @@ -96,7 +94,7 @@
    * @author <a href="mailto:krzewski@e-point.pl">Rafal Krzewski</a>
    * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
  - * @version $Id: BaseServiceBroker.java,v 1.43 2001/07/14 19:36:28 jvanzyl Exp $
  + * @version $Id: BaseServiceBroker.java,v 1.44 2001/07/17 23:00:59 jvanzyl Exp $
    */
   public abstract class BaseServiceBroker implements ServiceBroker
   {
  @@ -155,6 +153,8 @@
        */
       protected Category category;
   
  +    protected Hashtable categoryTable;
  +
       /**
        * Application root path as set by the
        * parent application.
  @@ -224,6 +224,16 @@
       public Category getCategory(String name)
       {
           return Category.getInstance(name);
  +    }        
  +
  +    public void setCategoryTable(Hashtable categoryTable)
  +    {
  +        this.categoryTable = categoryTable;
  +    }
  +    
  +    public Hashtable getCategoryTable()
  +    {
  +        return categoryTable;
       }        
   
       /**
  
  
  
  1.15      +4 -2      jakarta-turbine/src/java/org/apache/turbine/services/ServiceBroker.java
  
  Index: ServiceBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/ServiceBroker.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ServiceBroker.java	2001/07/12 23:42:49	1.14
  +++ ServiceBroker.java	2001/07/17 23:00:59	1.15
  @@ -54,8 +54,8 @@
    * <http://www.apache.org/>.
    */
   
  -import java.util.Properties;
   import java.util.List;
  +import java.util.Hashtable;
   import org.apache.log4j.Category;
   import org.apache.velocity.runtime.configuration.Configuration;
   
  @@ -80,7 +80,7 @@
    * @author <a href="mailto:krzewski@e-point.pl">Rafal Krzewski</a>
    * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
  - * @version $Id: ServiceBroker.java,v 1.14 2001/07/12 23:42:49 jvanzyl Exp $
  + * @version $Id: ServiceBroker.java,v 1.15 2001/07/17 23:00:59 jvanzyl Exp $
    */
   public interface ServiceBroker
   {
  @@ -215,4 +215,6 @@
        * @return Category named category
        */
       public Category getCategory(String name);
  +
  +    public void setCategoryTable(Hashtable categoryTable);
   }
  
  
  
  1.2       +1 -3      jakarta-turbine/src/java/org/apache/turbine/services/db/pool/ConnectionPool.java
  
  Index: ConnectionPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/db/pool/ConnectionPool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectionPool.java	2001/06/25 05:13:07	1.1
  +++ ConnectionPool.java	2001/07/17 23:01:00	1.2
  @@ -59,10 +59,8 @@
   import java.sql.SQLException;
   import java.util.Stack;
   import java.util.Vector;
  -
   import javax.sql.ConnectionPoolDataSource;
   import javax.sql.PooledConnection;
  -
   import org.apache.turbine.services.db.adapter.DB;
   import org.apache.turbine.services.db.adapter.DBFactory;
   
  @@ -78,7 +76,7 @@
    * @author <a href="mailto:paul@evolventtech.com">Paul O'Leary</a>
    * @author <a href="mailto:magnus@handtolvur.is">Magn�s ��r Torfason</a>
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
  - * @version $Id: ConnectionPool.java,v 1.1 2001/06/25 05:13:07 jvanzyl Exp $
  + * @version $Id: ConnectionPool.java,v 1.2 2001/07/17 23:01:00 jvanzyl Exp $
    */
   public class ConnectionPool
   {
  
  
  
  1.3       +4 -8      jakarta-turbine/src/java/org/apache/turbine/services/db/pool/DBConnection.java
  
  Index: DBConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/db/pool/DBConnection.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DBConnection.java	2001/06/25 07:23:36	1.2
  +++ DBConnection.java	2001/07/17 23:01:01	1.3
  @@ -55,21 +55,16 @@
    */
   
   import java.io.PrintStream;
  -
   import java.sql.Connection;
   import java.sql.PreparedStatement;
   import java.sql.SQLException;
   import java.sql.Statement;
  -
   import java.util.EventObject;
   import java.util.Vector;
  -
   import javax.sql.ConnectionEvent;
   import javax.sql.ConnectionEventListener;
   import javax.sql.PooledConnection;
  -
  -//!! this has to be decoupled, use a category.
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   
   /**
    * This class wraps the JDBC <code>Connection</code> class, providing
  @@ -84,9 +79,10 @@
    * @author <a href="mailto:dlr@collab.net">Daniel L. Rall</a>
    * @author <a href="mailto:magnus@handtolvur.is">Magn�s ��r Torfason</a>
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
  - * @version $Id: DBConnection.java,v 1.2 2001/06/25 07:23:36 jvanzyl Exp $
  + * @version $Id: DBConnection.java,v 1.3 2001/07/17 23:01:01 jvanzyl Exp $
    */
  -public class DBConnection implements ConnectionEventListener
  +public class DBConnection 
  +    implements ConnectionEventListener
   {
       /**
        * The ConnectionPool that this DBConnection came from.
  
  
  
  1.8       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/db/util/IDBroker.java
  
  Index: IDBroker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/db/util/IDBroker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- IDBroker.java	2001/07/17 20:36:05	1.7
  +++ IDBroker.java	2001/07/17 23:01:02	1.8
  @@ -72,7 +72,7 @@
   import org.apache.turbine.services.db.pool.DBConnection;
   
   //!! these two have to be removed.
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.velocity.runtime.configuration.Configuration;
   
   //!!
  @@ -114,7 +114,7 @@
    *
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
  - * @version $Id: IDBroker.java,v 1.7 2001/07/17 20:36:05 jmcnally Exp $
  + * @version $Id: IDBroker.java,v 1.8 2001/07/17 23:01:02 jvanzyl Exp $
    */
   public class IDBroker
       implements Runnable, IdGenerator
  
  
  
  1.20      +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/IntakeTool.java
  
  Index: IntakeTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/IntakeTool.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- IntakeTool.java	2001/07/14 05:02:26	1.19
  +++ IntakeTool.java	2001/07/17 23:01:02	1.20
  @@ -63,7 +63,7 @@
   import org.apache.turbine.services.db.om.Retrievable;
   import org.apache.turbine.services.intake.model.Group;
   import org.apache.turbine.services.pull.ApplicationTool;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.ParameterParser;
   import org.apache.turbine.RunData;
   import org.apache.turbine.services.pool.Recyclable;
  @@ -72,7 +72,7 @@
    * A Pull tool to make intake objects available to a template
    *
    * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
  - * @version $Id: IntakeTool.java,v 1.19 2001/07/14 05:02:26 jvanzyl Exp $
  + * @version $Id: IntakeTool.java,v 1.20 2001/07/17 23:01:02 jvanzyl Exp $
    */
   public class IntakeTool 
       implements ApplicationTool, Recyclable
  
  
  
  1.8       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/model/BooleanField.java
  
  Index: BooleanField.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/model/BooleanField.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BooleanField.java	2001/07/13 16:50:40	1.7
  +++ BooleanField.java	2001/07/17 23:01:03	1.8
  @@ -55,14 +55,14 @@
    */
   
   import org.apache.turbine.services.intake.xmlmodel.XmlField;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.ParameterParser;
   
   /**
    * Base class for Intake generated input processing classes.
    *
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: BooleanField.java,v 1.7 2001/07/13 16:50:40 jvanzyl Exp $
  + * @version $Id: BooleanField.java,v 1.8 2001/07/17 23:01:03 jvanzyl Exp $
    */
   public class BooleanField extends Field
   {    
  
  
  
  1.9       +1 -1      jakarta-turbine/src/java/org/apache/turbine/services/intake/model/ComboKeyField.java
  
  Index: ComboKeyField.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/model/ComboKeyField.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ComboKeyField.java	2001/07/14 19:36:30	1.8
  +++ ComboKeyField.java	2001/07/17 23:01:03	1.9
  @@ -61,7 +61,7 @@
   import org.apache.turbine.services.db.om.ObjectKey;
   import org.apache.turbine.services.intake.xmlmodel.Rule;
   import org.apache.turbine.services.intake.xmlmodel.XmlField;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   
   /**  */
   public class ComboKeyField extends Field
  
  
  
  1.24      +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/model/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/model/Field.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Field.java	2001/07/14 19:36:30	1.23
  +++ Field.java	2001/07/17 23:01:03	1.24
  @@ -68,13 +68,13 @@
   import org.apache.turbine.services.intake.validator.Validator;
   import org.apache.turbine.services.intake.validator.InitableByConstraintMap;
   import org.apache.turbine.services.intake.validator.ValidationException;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   
   /**
    * Base class for Intake generated input processing classes.
    *
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: Field.java,v 1.23 2001/07/14 19:36:30 jvanzyl Exp $
  + * @version $Id: Field.java,v 1.24 2001/07/17 23:01:03 jvanzyl Exp $
    */
   public abstract class Field
   {
  
  
  
  1.10      +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/DefaultValidator.java
  
  Index: DefaultValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/DefaultValidator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultValidator.java	2001/07/14 19:36:31	1.9
  +++ DefaultValidator.java	2001/07/17 23:01:04	1.10
  @@ -62,7 +62,7 @@
   import org.apache.turbine.services.intake.xmlmodel.Rule;
   import org.apache.turbine.services.intake.xmlmodel.XmlField;
   import org.apache.turbine.services.intake.xmlmodel.XmlGroup;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.ParameterParser;
   import org.apache.turbine.RunData;
   import org.apache.turbine.services.ServiceException;
  @@ -81,7 +81,7 @@
    * This validator can serve as the base class for more specific validators 
    *
    * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
  - * @version $Id: DefaultValidator.java,v 1.9 2001/07/14 19:36:31 jvanzyl Exp $
  + * @version $Id: DefaultValidator.java,v 1.10 2001/07/17 23:01:04 jvanzyl Exp $
    */
   public class DefaultValidator
       implements Validator, InitableByConstraintMap
  
  
  
  1.7       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/FileValidator.java
  
  Index: FileValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/FileValidator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FileValidator.java	2001/07/14 19:36:31	1.6
  +++ FileValidator.java	2001/07/17 23:01:04	1.7
  @@ -62,7 +62,7 @@
   import org.apache.turbine.services.intake.xmlmodel.Rule;
   import org.apache.turbine.services.intake.xmlmodel.XmlField;
   import org.apache.turbine.services.intake.xmlmodel.XmlGroup;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.ParameterParser;
   import org.apache.turbine.RunData;
   import org.apache.turbine.services.ServiceException;
  @@ -82,7 +82,7 @@
    * This validator can serve as the base class for more specific validators 
    *
    * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
  - * @version $Id: FileValidator.java,v 1.6 2001/07/14 19:36:31 jvanzyl Exp $
  + * @version $Id: FileValidator.java,v 1.7 2001/07/17 23:01:04 jvanzyl Exp $
    */
   public class FileValidator
       implements Validator, InitableByConstraintMap
  
  
  
  1.6       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/IntegerValidator.java
  
  Index: IntegerValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/IntegerValidator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IntegerValidator.java	2001/07/14 19:36:31	1.5
  +++ IntegerValidator.java	2001/07/17 23:01:04	1.6
  @@ -55,7 +55,7 @@
    */
   
   import java.util.Map;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.ServiceException;
   
   /**
  @@ -73,7 +73,7 @@
    * </table>
    *
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: IntegerValidator.java,v 1.5 2001/07/14 19:36:31 jvanzyl Exp $
  + * @version $Id: IntegerValidator.java,v 1.6 2001/07/17 23:01:04 jvanzyl Exp $
    */
   public class IntegerValidator
       extends NumberValidator
  
  
  
  1.7       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/NumberKeyValidator.java
  
  Index: NumberKeyValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/NumberKeyValidator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NumberKeyValidator.java	2001/07/14 19:36:31	1.6
  +++ NumberKeyValidator.java	2001/07/17 23:01:05	1.7
  @@ -57,7 +57,7 @@
   import java.math.BigDecimal;
   import java.util.Map;
   import org.apache.turbine.services.db.om.NumberKey;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.ServiceException;
   
   /**
  @@ -75,7 +75,7 @@
    * </table>
    *
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: NumberKeyValidator.java,v 1.6 2001/07/14 19:36:31 jvanzyl Exp $
  + * @version $Id: NumberKeyValidator.java,v 1.7 2001/07/17 23:01:05 jvanzyl Exp $
    */
   public class NumberKeyValidator
       extends NumberValidator
  
  
  
  1.7       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/NumberValidator.java
  
  Index: NumberValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/intake/validator/NumberValidator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NumberValidator.java	2001/07/14 19:36:31	1.6
  +++ NumberValidator.java	2001/07/17 23:01:05	1.7
  @@ -57,7 +57,7 @@
   import java.math.BigDecimal;
   import java.util.Map;
   import org.apache.turbine.services.db.om.NumberKey;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.ServiceException;
   
   /**
  @@ -75,7 +75,7 @@
    * </table>
    *
    * @author <a href="mailto:jmcnally@collab.net>John McNally</a>
  - * @version $Id: NumberValidator.java,v 1.6 2001/07/14 19:36:31 jvanzyl Exp $
  + * @version $Id: NumberValidator.java,v 1.7 2001/07/17 23:01:05 jvanzyl Exp $
    */
   public class NumberValidator
       extends DefaultValidator
  
  
  
  1.18      +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/pull/util/UIManager.java
  
  Index: UIManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/pull/util/UIManager.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- UIManager.java	2001/07/17 11:37:31	1.17
  +++ UIManager.java	2001/07/17 23:01:06	1.18
  @@ -59,7 +59,7 @@
   import java.util.Properties;
   import org.apache.turbine.Turbine;
   import org.apache.turbine.util.ContentURI;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.RunData;
   import org.apache.turbine.services.pull.ApplicationTool;
   import org.apache.turbine.services.pull.TurbinePull;
  @@ -101,7 +101,7 @@
    *
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:james_coltman@majorband.co.uk">James Coltman</a>
  - * @version $Id: UIManager.java,v 1.17 2001/07/17 11:37:31 jvanzyl Exp $
  + * @version $Id: UIManager.java,v 1.18 2001/07/17 23:01:06 jvanzyl Exp $
    */
   public class UIManager implements ApplicationTool
   {
  
  
  
  1.4       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/DBSecurityService.java
  
  Index: DBSecurityService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/DBSecurityService.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DBSecurityService.java	2001/07/17 20:36:07	1.3
  +++ DBSecurityService.java	2001/07/17 23:01:07	1.4
  @@ -80,7 +80,7 @@
   import org.apache.turbine.services.BaseService;
   import org.apache.turbine.services.security.BaseSecurityService;
   import org.apache.turbine.services.security.TurbineSecurity;
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.db.util.Criteria;
   import org.apache.turbine.services.security.util.AccessControlList;
   import org.apache.turbine.services.security.util.DataBackendException;
  @@ -94,7 +94,7 @@
    * An implementation of SecurityService that uses a database as backend.
    *
    * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
  - * @version $Id: DBSecurityService.java,v 1.3 2001/07/17 20:36:07 jmcnally Exp $
  + * @version $Id: DBSecurityService.java,v 1.4 2001/07/17 23:01:07 jvanzyl Exp $
    */
   public class DBSecurityService
       extends BaseSecurityService
  
  
  
  1.3       +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/DBUserManager.java
  
  Index: DBUserManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/DBUserManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DBUserManager.java	2001/07/15 18:05:35	1.2
  +++ DBUserManager.java	2001/07/17 23:01:07	1.3
  @@ -67,7 +67,7 @@
   import org.apache.turbine.services.security.util.EntityExistsException;
   import org.apache.turbine.services.security.util.PasswordMismatchException;
   
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.db.util.Criteria;
   
   import org.apache.turbine.services.security.UserManager;
  @@ -87,7 +87,7 @@
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:cberry@gluecode.com">Craig D. Berry</a>
    * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
  - * @version $Id: DBUserManager.java,v 1.2 2001/07/15 18:05:35 mpoeschl Exp $
  + * @version $Id: DBUserManager.java,v 1.3 2001/07/17 23:01:07 jvanzyl Exp $
    */
   public class DBUserManager implements UserManager
   {
  
  
  
  1.3       +3 -3      jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/entity/TurbineUser.java
  
  Index: TurbineUser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/security/impl/db/entity/TurbineUser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TurbineUser.java	2001/07/15 18:08:41	1.2
  +++ TurbineUser.java	2001/07/17 23:01:08	1.3
  @@ -76,7 +76,7 @@
    * @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
    * @author <a href="mailto:cberry@gluecode.com">Craig D. Berry</a>
    * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
  - * @version $Id: TurbineUser.java,v 1.2 2001/07/15 18:08:41 mpoeschl Exp $
  + * @version $Id: TurbineUser.java,v 1.3 2001/07/17 23:01:08 jvanzyl Exp $
    */
   public class TurbineUser
       extends org.apache.turbine.services.security.impl.db.entity.BaseTurbineUser
  @@ -446,9 +446,9 @@
           }
           catch (Exception e)
           {
  -            org.apache.turbine.util.Log.error("TurbineUser.valueUnbobund(): " +
  +            org.apache.turbine.services.Log.error("TurbineUser.valueUnbobund(): " +
                                                 e.getMessage());
  -            org.apache.turbine.util.Log.error(e);
  +            org.apache.turbine.services.Log.error(e);
   
               // To prevent messages being lost in case the logging system
               // goes away before sessions get unbound on servlet container
  
  
  
  1.11      +2 -2      jakarta-turbine/src/java/org/apache/turbine/services/xmlrpc/util/FileTransfer.java
  
  Index: FileTransfer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/xmlrpc/util/FileTransfer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FileTransfer.java	2001/07/17 11:37:33	1.10
  +++ FileTransfer.java	2001/07/17 23:01:09	1.11
  @@ -58,14 +58,14 @@
   
   import java.net.URL;
   
  -import org.apache.turbine.util.Log;
  +import org.apache.turbine.services.Log;
   import org.apache.turbine.services.xmlrpc.TurbineXmlRpc;
   
   /**
    * Test class for FileHandler.
    *
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
  - * @version $Id: FileTransfer.java,v 1.10 2001/07/17 11:37:33 jvanzyl Exp $
  + * @version $Id: FileTransfer.java,v 1.11 2001/07/17 23:01:09 jvanzyl Exp $
    */
   public class FileTransfer
   {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/xmlrpc/util FileTransfer.java

Posted by Jason van Zyl <jv...@apache.org>.
On 7/17/01 7:13 PM, "Jon Stevens" <jo...@latchkey.com> wrote:

> on 7/17/01 4:01 PM, "jvanzyl@apache.org" <jv...@apache.org> wrote:
> 
>> - using a separate Log.java file in the services to help decouple
>>   until we have a better way to pass on parent application
>> information/objects
>>   to components. will probably borrow ideas from avalon but use log4j
>>   for logging.
> 
> How about making the BaseService class responsible for providing methods for
> logging? That way, all the Services just inherit it and the initialization
> of the services can depend on being passed in a Log4J logging object?

The BaseService already has methods for providing logging, take a look. The
category is provided by the ServiceBroker, and this code is used throughout
the services code with a service implementation:
getCategory.debug("message").

The problem is not with the service code, the problem is with utilities
used by the services. The DB service is a good example where there are
lots of utility classes that leverage the Log.X() static methods. These
methods might be useful outside the services. Again it's a question
of coupling, we could easily have a reference to the ServiceBroker in
all of these classes to get hold of a category for logging but that doesn't
sound very appealing to me.

I think we either go the component way like Avalon where you have a base
component and it might have methods like:

setCategory(Category category)

So that a component can log independently of the services if it's used
somewhere else. We could also use the standard log4j way of using
Category.getInstance(X) where X is some place in the logging hierarchy.
 
> I'm not really that fond of having duplicate classes all over the place.

As I said it says in the code it's a stop gap so that I can separate
the services. Once they are separated I hope that more people will look
at them and help find an elegant solution for logging in classes that
are useful on their own but utilized by the services. It gets me another
step closer to decoupling without having to change a lot of the service
code. That code won't be living long.
 
> -jon

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-turbine/src/java/org/apache/turbine/services/xmlrpc/util FileTransfer.java

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/17/01 4:01 PM, "jvanzyl@apache.org" <jv...@apache.org> wrote:

> - using a separate Log.java file in the services to help decouple
>   until we have a better way to pass on parent application information/objects
>   to components. will probably borrow ideas from avalon but use log4j
>   for logging.

How about making the BaseService class responsible for providing methods for
logging? That way, all the Services just inherit it and the initialization
of the services can depend on being passed in a Log4J logging object?

I'm not really that fond of having duplicate classes all over the place.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org