axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis AxisProperties.java
Date Sun, 04 Aug 2002 12:56:59 GMT
gdaniels    2002/08/04 05:56:59

  Modified:    java/src/org/apache/axis/message SOAPHeader.java
               java/src/org/apache/axis AxisProperties.java
  Log:
  Cleanup imports, fix javadoc
  
  Revision  Changes    Path
  1.53      +0 -2      xml-axis/java/src/org/apache/axis/message/SOAPHeader.java
  
  Index: SOAPHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPHeader.java,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- SOAPHeader.java	3 Aug 2002 21:25:25 -0000	1.52
  +++ SOAPHeader.java	4 Aug 2002 12:56:59 -0000	1.53
  @@ -55,9 +55,7 @@
   
   package org.apache.axis.message;
   
  -import org.apache.axis.AxisProperties;
   import org.apache.axis.Constants;
  -import org.apache.axis.Message;
   import org.apache.axis.MessageContext;
   import org.apache.axis.soap.SOAPConstants;
   import org.apache.axis.encoding.DeserializationContext;
  
  
  
  1.4       +28 -28    xml-axis/java/src/org/apache/axis/AxisProperties.java
  
  Index: AxisProperties.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisProperties.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AxisProperties.java	4 Aug 2002 03:33:31 -0000	1.3
  +++ AxisProperties.java	4 Aug 2002 12:56:59 -0000	1.4
  @@ -62,7 +62,7 @@
   /**
    * <p>Configuration properties for AXIS.
    * </p>
  - * 
  + *
    * <p>Manage configuration properties according to a secure
    * scheme similar to that used by classloaders:
    * <ul>
  @@ -86,32 +86,32 @@
    *   <li>System properties take precedence over all other properties</li>
    * </ul>
    * </p>
  - * 
  + *
    * @author Richard A. Sitze
    */
   public class AxisProperties {
  -    
  +
       public static final char NL = '\n';
       public static final char CR = '\r';
  -    
  +
       /**
        * The prefered line separator
        */
       public static final String LS = System.getProperty("line.separator",
                                                           (new Character(NL)).toString());
  -                                                        
  +
       /**
        * Cache of AXIS Properties, keyed by (thread-context) class loaders.
        * Use <code>HashMap</code> because it allows 'null' keys, which
        * allows us to account for the (null) bootstrap classloader.
        */
       private static final HashMap axisPropertiesCache = new HashMap();
  -    
  +
   
       /**
        * Get value for property bound to the current thread context class loader.
  -     * 
  -     * @param property property name.
  +     *
  +     * @param propertyName property name.
        * @return property value if found, otherwise default.
        */
       public static String getProperty(String propertyName) {
  @@ -124,12 +124,12 @@
           }
           return value;
       }
  -    
  +
       /**
        * Get value for property bound to the current thread context class loader.
        * If not found, then return default.
  -     * 
  -     * @param property property name.
  +     *
  +     * @param propertyName property name.
        * @param dephault default value.
        * @return property value if found, otherwise default.
        */
  @@ -140,16 +140,16 @@
   
       /**
        * Set value for property bound to the current thread context class loader.
  -     * @param property property name
  +     * @param propertyName property name
        * @param value property value (non-default)  If null, remove the property.
        */
       public static void setProperty(String propertyName, String value) {
           setProperty(propertyName, value, false);
       }
  -    
  +
       /**
        * Set value for property bound to the current thread context class loader.
  -     * @param property property name
  +     * @param propertyName property name
        * @param value property value.  If null, remove the property.
        * @param isDefault determines if property is default or not.
        *        A non-default property cannot be overriden.
  @@ -162,7 +162,7 @@
               synchronized (axisPropertiesCache) {
                   ClassLoader classLoader = getThreadContextClassLoader();
                   HashMap properties = (HashMap)axisPropertiesCache.get(classLoader);
  -                
  +
                   if (value == null) {
                       properties.remove(propertyName);
                   } else {
  @@ -170,28 +170,28 @@
                           properties = new HashMap();
                           axisPropertiesCache.put(classLoader, properties);
                       }
  -                
  +
                       properties.put(propertyName, new Value(value, isDefault));
                   }
               }
           }
       }
  -    
  +
       /**
        * Set property values for <code>Properties</code> bound to the
        * current thread context class loader.
  -     * 
  +     *
        * @param newProperties name/value pairs to be bound
        */
       public static void setProperties(Map newProperties) {
           setProperties(newProperties, false);
       }
  -    
  -    
  +
  +
       /**
        * Set property values for <code>Properties</code> bound to the
        * current thread context class loader.
  -     * 
  +     *
        * @param newProperties name/value pairs to be bound
        * @param isDefault determines if properties are default or not.
        *        A non-default property cannot be overriden.
  @@ -216,11 +216,11 @@
   
   
       /***************** INTERNAL IMPLEMENTATION *****************/
  -    
  +
       private static class Value {
           final String value;
           final boolean isDefault;
  -        
  +
           Value(String value, boolean isDefault) {
               this.value = value;
               this.isDefault = isDefault;
  @@ -243,14 +243,14 @@
               if (classLoader != null) {
                   value = getValueProperty(classLoader.getParent(), propertyName);
               }
  -            
  +
               if (value == null  ||  value.isDefault) {
                   synchronized (axisPropertiesCache) {
                       HashMap properties = (HashMap)axisPropertiesCache.get(classLoader);
  -                        
  +
                       if (properties != null) {
                           Value altValue = (Value)properties.get(propertyName);
  -                        
  +
                           // set value only if override exists..
                           // otherwise pass default (or null) on..
                           if (altValue != null)
  @@ -259,10 +259,10 @@
                   }
               }
           }
  -        
  +
           return value;
       }
  -    
  +
       private static final ClassLoader getThreadContextClassLoader() {
           return Thread.currentThread().getContextClassLoader();
       }
  
  
  

Mime
View raw message