You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by ha...@apache.org on 2001/11/05 14:58:21 UTC

cvs commit: jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/core ConfigManagerImpl.java

hammant     01/11/05 05:58:21

  Modified:    apps/jesktop/src/java/org/apache/avalon/jesktop/core
                        ConfigManagerImpl.java
  Log:
  ConfigManager no longer hard codes xerces
  
  Revision  Changes    Path
  1.6       +22 -23    jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/core/ConfigManagerImpl.java
  
  Index: ConfigManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/jesktop/src/java/org/apache/avalon/jesktop/core/ConfigManagerImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConfigManagerImpl.java	2001/11/05 13:55:53	1.5
  +++ ConfigManagerImpl.java	2001/11/05 13:58:21	1.6
  @@ -33,7 +33,6 @@
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.phoenix.Block;
   import org.apache.avalon.jesktop.services.KernelConfigManager;
  -import org.apache.xerces.dom.DocumentImpl;
   
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
  @@ -55,7 +54,7 @@
    *
    *
    * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
  - * @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
    */
   public class ConfigManagerImpl extends AbstractLoggable
           implements Block, KernelConfigManager, ConfigManager, Contextualizable, Composable, Configurable  {
  @@ -143,7 +142,7 @@
   
               return (Document) mObjectRepository.get(CFG + configPath, classLoader);
           } else {
  -            Document doc = new DocumentImpl();
  +            Document doc = mDocumentBuilder.newDocument();
               Element root = doc.createElement("config");
   
               doc.appendChild(root);
  @@ -162,9 +161,9 @@
               return defaultVal;
           }
       }
  -    
  +
       public void registerConfigInterest(final Configlet clet, final String configPath) {
  -        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, clet);      
  +        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, clet);
       }
   
       public void unRegisterConfigInterest(final Configlet clet) {
  @@ -172,9 +171,9 @@
       }
   
       public void registerConfigInterest(final DesktopKernel dk, final String configPath) {
  -        
  +
           propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, dk);
  -        
  +
       }
   
       public void unRegisterConfigInterest(final DesktopKernel dk) {
  @@ -182,21 +181,21 @@
       }
   
       public void registerConfigInterest(final WindowManager wm, final String configPath) {
  -        
  -        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, wm);        
  +
  +        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, wm);
       }
   
       public void unRegisterConfigInterest(final WindowManager wm) {
           propChgSupport.removePropertyChangeListener(wm);
       }
  -    
  +
       public void registerConfigInterest(final Decorator dec, final String configPath) {
  -        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, (PropertyChangeListener) dec);      
  -    }    
  -    
  +        propChgSupport.addPropertyChangeListener(ConfigManager.PROPCHG_PREFIX + configPath, (PropertyChangeListener) dec);
  +    }
  +
       public void unRegisterConfigInterest(final Decorator dec) {
           propChgSupport.removePropertyChangeListener((PropertyChangeListener) dec);
  -    }    
  +    }
   
       public void notifyInterested(final String configPath, final Configlet sendingConfiglet,
                                     final Object config) {
  @@ -205,18 +204,18 @@
   
       public void notifyObjConfig(final String configPath, ClassLoader classLoader) {
   
  -        Object obj = getObjConfig(configPath, classLoader);         
  +        Object obj = getObjConfig(configPath, classLoader);
           notifyInterested(configPath,null,obj);
   
  -    } 
  -    
  +    }
  +
       public void notifyXMLConfig(final String configPath, ClassLoader classLoader) {
   
  -        Document doc = this.getXMLConfig(configPath, classLoader);         
  +        Document doc = this.getXMLConfig(configPath, classLoader);
           notifyInterested(configPath,null,doc);
  +
  +    }
   
  -    }    
  -    
   
       /**
        * Method notifyUpdated
  @@ -232,7 +231,7 @@
                   .getLaunchableTarget((JComponent) clet);
           Object oldCfg = getObjConfig(clt.getConfigPath(), clet.getClass().getClassLoader());
           Object newCfg = clet.getConfig();
  -        
  +
           if ((oldCfg == null) ||!oldCfg.equals(newCfg)) {
               mObjectRepository.put(CFG + clt.getConfigPath(), clet.getConfig());
               notifyInterested(clt.getConfigPath(), clet, clet.getConfig());
  @@ -300,6 +299,6 @@
           notifyInterested(clt.getConfigPath(), clet, clet.getConfig());
   
           //}
  -    }       
  -    
  +    }
  +
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>