Package com.dbxml.util

Examples of com.dbxml.util.ConfigurationCallback


   public Map getNamespaceMap() {
      if ( nsMap == null ) {
         Configuration nsCfg = config.getChild(NAMESPACES, true);
         nsMap = new TreeMap();
         nsCfg.processChildren(NAMESPACE, new ConfigurationCallback() {
            public void process(Configuration cfg) {
               String prefix = cfg.getAttribute(PREFIX);
               String uri = cfg.getAttribute(URI);
               nsMap.put(prefix, uri);
            }
View Full Code Here


      return isVisible(STATUSBAR, defValue);
   }

   public String[] listDrivers() {
      final Set set = new TreeSet();
      driversCfg.processChildren(DRIVER, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            set.add(cfg.getAttribute(LABEL));
         }
      });
      return (String[])set.toArray(EmptyStrings);
View Full Code Here

      return result;
   }

   public DriverConfig getDriver(final String label) {
      final DriverConfig driverConfig = new DriverConfig();
      driversCfg.processChildren(DRIVER, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( !lbl.equals(label) )
               return;
            String className = cfg.getAttribute(CLASS);
            driverConfig.setLabel(lbl);
            driverConfig.setClassName(className);

            final Map propsMap = driverConfig.getProperties();
            Configuration propsCfg = cfg.getChild(PROPERTIES);
            if ( propsCfg != null ) {
               propsCfg.processChildren(PROPERTY, new ConfigurationCallback() {
                  public void process(Configuration pcfg) {
                     propsMap.put(pcfg.getAttribute(NAME), pcfg.getAttribute(VALUE));
                  }
               });
            }
View Full Code Here

      else
         return null;
   }

   public void removeDriverConfig(final String label) {
      driversCfg.processChildren(DRIVER, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( lbl.equals(label) )
               cfg.delete();
         }
View Full Code Here

      });
   }

   public void addDriverConfig(DriverConfig driverConfig) {
      final String label = driverConfig.getLabel();
      driversCfg.processChildren(DRIVER, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( lbl.equals(label) )
               cfg.delete();
         }
View Full Code Here

      }
   }

   public String[] listFileSystems() {
      final Set set = new TreeSet();
      filesystemsCfg.processChildren(FILESYSTEM, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            set.add(cfg.getAttribute(LABEL));
         }
      });
      return (String[])set.toArray(EmptyStrings);
View Full Code Here

      return result;
   }

   public FileSystemConfig getFileSystem(final String label) {
      final FileSystemConfig fsCfg = new FileSystemConfig();
      filesystemsCfg.processChildren(FILESYSTEM, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( !lbl.equals(label) )
               return;
View Full Code Here

      else
         return null;
   }

   public void removeFileSystem(final String label) {
      filesystemsCfg.processChildren(FILESYSTEM, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( lbl.equals(label) )
               cfg.delete();
         }
View Full Code Here

      });
   }

   public void addFileSystem(FileSystemConfig filesystemConfig) {
      final String label = filesystemConfig.getLabel();
      filesystemsCfg.processChildren(FILESYSTEM, new ConfigurationCallback() {
         public void process(Configuration cfg) {
            String lbl = cfg.getAttribute(LABEL);
            if ( lbl.equals(label) )
               cfg.delete();
         }
View Full Code Here

   }

   public void setConfig(Configuration config) throws dbXMLException {
      super.setConfig(config);
      config.processChildren(TRIGGER,
         new ConfigurationCallback() {
            public void process(Configuration cfg) {
               String className = cfg.getAttribute(CLASS);
               try {
                  register(ClassResolver.get(className), cfg);
               }
View Full Code Here

TOP

Related Classes of com.dbxml.util.ConfigurationCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.