public void configure()

in gson/src/java/org/apache/fulcrum/json/gson/GSONBuilderService.java [243:271]


    public void configure(Configuration conf) throws ConfigurationException {

        getLogger().debug("conf.getName()" + conf.getName());
        final Configuration configuredDateFormat = conf.getChild(DATE_FORMAT,
                false);
        if (configuredDateFormat != null) {
            this.dateFormat = configuredDateFormat.getValue();// DEFAULTDATEFORMAT);
        }
        final Configuration configuredAdapters = conf.getChild(GLOBAL_ADAPTERS,
                true);
        if (configuredAdapters != null) {
            Configuration[] nameVal = configuredAdapters.getChildren();
            for (int i = 0; i < nameVal.length; i++) {
                String key = nameVal[i].getName();
                getLogger().debug("configured key: " + key);
                if (key.equals("adapter")) {
                    String forClass = nameVal[i].getAttribute("forClass");
                    this.adapters = new Hashtable<String, String>();
                    this.adapters.put(forClass, nameVal[i].getValue());
                }
            }
        }
        // TODO provide configurable Type Adapters
        final Configuration configuredjsonPath = conf.getChild(
                USEJSONPATH, false);
        if (configuredjsonPath != null) {
            this.useJsonPath  = configuredjsonPath.getValueAsBoolean();
        }
    }