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

From: cvs@openprivacy.org
Date: Wed Feb 07 2001 - 00:17:15 PST

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

    Date: Wednesday February 7, 19101 @ 0:17
    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-serv11129/src/java/talon/util

    Modified Files:
            BasePropertyManager.java
    Log Message:
    needed to have smarter property management so that we can serve default components

    *****************************************************************
    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.3

    CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/util/BasePropertyManager.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/BasePropertyManager.java.diff?r1=1.3&r2=1.2

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

    Index: talon/src/java/talon/util/BasePropertyManager.java
    diff -u talon/src/java/talon/util/BasePropertyManager.java:1.2 talon/src/java/talon/util/BasePropertyManager.java:1.3
    --- talon/src/java/talon/util/BasePropertyManager.java:1.2 Thu Jan 25 11:05:19 2001
    +++ talon/src/java/talon/util/BasePropertyManager.java Wed Feb 7 00:17:15 2001
    @@ -20,7 +20,7 @@
      * Base class for handling properties.
      *
      * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
      */
     public abstract class BasePropertyManager extends BaseComponent implements Component, PropertyManager {
     
    @@ -30,7 +30,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public String getProperty( String name ) {
             return this.props.getProperty( name );
    @@ -39,7 +39,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public String getProperty( String name, String _default ) {
     
    @@ -55,7 +55,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public boolean getBoolean( String name ) {
             String value = getProperty( name );
    @@ -72,7 +72,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public Vector getVector( String name ) {
     
    @@ -97,11 +97,42 @@
             return v;
         }
     
    + /**
    + * @see PropertyManager
    + * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
    + */
    + public Hashtable getGroup( String key ) {
    +
    + Enumeration keys = getKeys();
    + Hashtable result = new Hashtable();
    +
    +
    + while ( keys.hasMoreElements() ) {
    +
    + String name = (String)keys.nextElement();
    +
    + //test if the current name is valid.
    + if ( name.indexOf( key ) == 0 ) {
    +
    + String value = getProperty( name );
    +
    + //update the name.
    + name = name.substring( key.length() + 1, name.length() );
    +
    + result.put( name, value );
    + }
    +
    +
    + }
    +
    + return result;
    + }
     
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public PropertyManager setProperty( String name, String value ) {
             this.props.put( name, value );
    @@ -111,7 +142,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public PropertyManager setBoolean( String name, boolean value ) {
     
    @@ -126,7 +157,7 @@
         /**
          * @see PropertyManager
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public Enumeration getKeys() {
             return this.props.keys();
    @@ -136,7 +167,7 @@
          *
          *
          * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
    - * @version $Id: BasePropertyManager.java,v 1.2 2001/01/25 19:05:19 burton Exp $
    + * @version $Id: BasePropertyManager.java,v 1.3 2001/02/07 08:17:15 burton Exp $
          */
         public void setProperties( Properties props ) {
     



    This archive was generated by hypermail 2b30 : Wed Feb 07 2001 - 00:17:46 PST