CVS update: talon/src/java/talon/util

From: cvs@openprivacy.org
Date: Wed Mar 14 2001 - 17:33:40 PST

  • Next message: cvs@openprivacy.org: "CVS update: talon/src/java/talon/implementations"

    Date: Wednesday March 14, 19101 @ 17:33
    Author: burton
    CVSWEB Options: -------------------

    Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi

    View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util

    -----------------------------------

    Update of /usr/local/cvs/public/talon/src/java/talon/util
    In directory giga:/tmp/cvs-serv4084/src/java/talon/util

    Modified Files:
            Base64.java BasePropertyManager.java
    Log Message:
    refactoring component package from interfaces to components

    *****************************************************************
    File: talon/src/java/talon/util/Base64.java

    CVSWEB Options: -------------------

    CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/Base64.java?annotate=1.3

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/Base64.java?rev=1.3&content-type=text/x-cvsweb-markup

    CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/Base64.java.diff?r1=1.3&r2=1.2

    -----------------------------------

    Index: talon/src/java/talon/util/Base64.java
    diff -u talon/src/java/talon/util/Base64.java:1.2 talon/src/java/talon/util/Base64.java:1.3
    --- talon/src/java/talon/util/Base64.java:1.2 Fri Feb 23 02:09:17 2001
    +++ talon/src/java/talon/util/Base64.java Wed Mar 14 17:33:40 2001
    @@ -13,7 +13,7 @@
     import java.net.*;
     import java.util.*;
     import talon.*;
    -import talon.interfaces.*;
    +import talon.components.*;
     import talon.util.net.*;
     
     /**
    @@ -33,7 +33,7 @@
      *
      * @author Stephen Blackheath
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Base64.java,v 1.2 2001/02/23 10:09:17 burton Exp $
    + * @version $Id: Base64.java,v 1.3 2001/03/15 01:33:40 burton Exp $
      */
     public class Base64 {
     
    @@ -69,7 +69,7 @@
          *
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Base64.java,v 1.2 2001/02/23 10:09:17 burton Exp $
    + * @version $Id: Base64.java,v 1.3 2001/03/15 01:33:40 burton Exp $
          */
         public static String encode(byte[] in) {
             return encode(in, false);
    @@ -79,7 +79,7 @@
          * Caller should specify equalsPad=true if they want a standards compliant encoding.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Base64.java,v 1.2 2001/02/23 10:09:17 burton Exp $
    + * @version $Id: Base64.java,v 1.3 2001/03/15 01:33:40 burton Exp $
          */
         public static String encode(byte[] in, boolean equalsPad) {
             
    @@ -114,7 +114,7 @@
          * shortened form.
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: Base64.java,v 1.2 2001/02/23 10:09:17 burton Exp $
    + * @version $Id: Base64.java,v 1.3 2001/03/15 01:33:40 burton Exp $
          */
         public static byte[] decode(String inStr)
             throws TalonException

    *****************************************************************
    File: talon/src/java/talon/util/BasePropertyManager.java

    CVSWEB Options: -------------------

    CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/BasePropertyManager.java?annotate=1.10

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/BasePropertyManager.java?rev=1.10&content-type=text/x-cvsweb-markup

    CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/BasePropertyManager.java.diff?r1=1.10&r2=1.9

    -----------------------------------

    Index: talon/src/java/talon/util/BasePropertyManager.java
    diff -u talon/src/java/talon/util/BasePropertyManager.java:1.9 talon/src/java/talon/util/BasePropertyManager.java:1.10
    --- talon/src/java/talon/util/BasePropertyManager.java:1.9 Sun Mar 11 01:50:48 2001
    +++ talon/src/java/talon/util/BasePropertyManager.java Wed Mar 14 17:33:40 2001
    @@ -14,15 +14,15 @@
     import java.util.*;
     
     import talon.*;
    -import talon.interfaces.*;
    -import talon.interfaces.exceptions.*;
    +import talon.components.*;
    +import talon.components.exceptions.*;
     import talon.implementations.*;
     
     /**
      * Base class for handling properties.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
      */
     public abstract class BasePropertyManager extends BaseComponent implements Component, PropertyManager {
     
    @@ -31,7 +31,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public Object getProperty( String name ) {
             return this.props.get( name );
    @@ -40,7 +40,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public Object getProperty( String name, Object _default ) {
     
    @@ -56,7 +56,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public boolean getBoolean( String name ) {
             String value = getString( name );
    @@ -74,7 +74,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public PropertyManager setBoolean( String name, boolean value ) {
     
    @@ -90,7 +90,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public PropertyManager setString( String name, String value ) {
             setProperty( name, value );
    @@ -100,7 +100,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public String getString( String name ) {
             return (String)getProperty( name );
    @@ -110,7 +110,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public String getString( String _name, String _default ) {
     
    @@ -128,7 +128,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public Vector getVector( String name ) {
     
    @@ -155,7 +155,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public PropertyManager getGroup( String key ) {
     
    @@ -196,7 +196,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public PropertyManager setProperty( String name, Object value ) {
     
    @@ -212,7 +212,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public Enumeration getKeys() {
             return this.props.keys();
    @@ -221,7 +221,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public void setProperties( Properties props ) {
             this.props = props;
    @@ -230,7 +230,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public void require( String[] requirements ) throws RequiredPropertyException {
     
    @@ -249,7 +249,7 @@
          * @see PropertyManager
          * @see Hashtable
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public boolean containsKey( String key ) {
             return props.containsKey( key );
    @@ -259,7 +259,7 @@
          * @see PropertyManager
          * @see Hashtable
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public boolean contains( Object object ) {
             return props.containsKey( object );
    @@ -269,7 +269,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public void dump() {
             dump( System.out );
    @@ -278,7 +278,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public void dump( PrintStream ps) {
     
    @@ -287,7 +287,7 @@
         
         /**
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         private String getPrettyPrint() {
     
    @@ -314,10 +314,122 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.9 2001/03/11 09:50:48 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
          */
         public int size() {
             return this.props.size();
         }
    +
    +
    + /**
    + * get a Integer property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public Integer getInteger( String _name ) {
    +
    + return (Integer)getProperty( _name );
    +
    + }
    +
    + /**
    + * get a string property but specify a default.
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public Integer getInteger( String _name, Integer _default ) {
    +
    + Integer result = getInteger( _name );
    +
    + if ( result == null ) {
    + result = _default;
    + }
    +
    + return result;
    + }
    +
    + /**
    + * Set a integer property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public PropertyManager setInteger( String _name, Integer _value ) {
    +
    + this.setProperty( _name, _value );
    +
    + return this;
    + }
    +
    + /**
    + * Set a integer property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public PropertyManager setInteger( String _name, int _value ) {
    +
    + return setInteger( _name, new Integer( _value ) );
    +
    + }
    +
    +
    + /**
    + * get a Long property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public Long getLong( String _name ) {
    +
    + return (Long)getProperty( _name );
    +
    + }
    +
    + /**
    + * get a string property but specify a default.
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public Long getLong( String _name, Long _default ) {
    +
    + Long result = getLong( _name );
    +
    + if ( result == null ) {
    + result = _default;
    + }
    +
    + return result;
    + }
    +
    + /**
    + * Set a integer property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public PropertyManager setLong( String _name, Long _value ) {
    +
    + this.setProperty( _name, _value );
    +
    + return this;
    + }
    +
    + /**
    + * Set a integer property
    + *
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.10 2001/03/15 01:33:40 burton Exp $
    + */
    + public PropertyManager setLong( String _name, long _value ) {
    +
    + return setLong( _name, new Long( _value ) );
    +
    + }
    +
    +
         
     }



    This archive was generated by hypermail 2b30 : Wed Mar 14 2001 - 17:34:12 PST