Examples of toConfig()


Examples of com.typesafe.config.ConfigObject.toConfig()

                className = (String) configValue.unwrapped();
            } else if (configValue.valueType() == ConfigValueType.OBJECT) {
                ConfigObject configObject = (ConfigObject) configValue;
                className = configObject.toConfig().getString("_class");
                if (configObject.toConfig().hasPath("_inline") &&
                        configObject.toConfig().getBoolean("_inline")) {
                    mutableInlinedAliasSet.add(label);
                }
            } else {
                throw new ConfigException.WrongType(configValue.origin(), label,
                                                    "STRING OR OBJECT", configValue.valueType().toString());
View Full Code Here

Examples of com.typesafe.config.ConfigObject.toConfig()

            T objectShell = type.newInstance();
            if (objectShell instanceof ConfigCodable) {
                ConfigObject newConfig = ((ConfigCodable) objectShell).fromConfigObject(
                        configObject, info.getFieldDefaults().root());
                if (newConfig != null) {
                    populateObjectFields(info, objectShell, newConfig.toConfig());
                }
            } else {
                populateObjectFields(info, objectShell, configObject.toConfig());
            }
            if (objectShell instanceof SuperCodable) {
View Full Code Here

Examples of com.typesafe.config.ConfigObject.toConfig()

                || Modifier.isAbstract(type.getModifiers()) || Modifier.isInterface(type.getModifiers())) {
                if (configValue.valueType() == ConfigValueType.LIST) {
                    Class<?> arrayType = pluginMap.arraySugar();
                    if (arrayType != null) {
                        ConfigObject aliasDefaults = pluginMap.aliasDefaults("_array");
                        String arrayFieldName = aliasDefaults.toConfig().getString("_primary");
                        String arraySugarName = pluginMap.getLastAlias("_array");
                        return ConfigFactory.empty().root().withValue(
                                classField, ConfigValueFactory.fromAnyRef(
                                        arraySugarName, pluginMap.category() + " array sugar : " +
                                                        pluginMap.config().root().get("_array").origin().description()))
View Full Code Here

Examples of com.typesafe.config.ConfigObject.toConfig()

                || Modifier.isAbstract(type.getModifiers()) || Modifier.isInterface(type.getModifiers())) {
                if (configValue.valueType() == ConfigValueType.LIST) {
                    Class<?> arrayType = pluginMap.arraySugar();
                    if (arrayType != null) {
                        ConfigObject aliasDefaults = pluginMap.aliasDefaults("_array");
                        String arrayFieldName = aliasDefaults.toConfig().getString("_primary");
                        String arraySugarName = pluginMap.getLastAlias("_array");
                        return ConfigFactory.empty().root().withValue(
                                classField, ConfigValueFactory.fromAnyRef(
                                        arraySugarName, pluginMap.category() + " array sugar : " +
                                                        pluginMap.config().root().get("_array").origin().description()))
View Full Code Here

Examples of it.eng.spagobi.commons.metadata.SbiConfig.toConfig()

      List hibList = hibQuery.list();
      Iterator it = hibList.iterator();     
      while (it.hasNext()) {     
        SbiConfig hibMap = (SbiConfig) it.next()
        if (hibMap != null) {
          Config biMap = hibMap.toConfig()
          toReturn.add(biMap);
        }
      }
      tx.commit();
    }catch(HibernateException he){
View Full Code Here

Examples of it.eng.spagobi.commons.metadata.SbiConfig.toConfig()

    try {
      tmpSession = getSession();
      tx = tmpSession.beginTransaction();
      SbiConfig hibMap = (SbiConfig)tmpSession.load(SbiConfig.class,  id);
      toReturn = hibMap.toConfig();
      tx.commit();

    } catch (HibernateException he) {
      logException(he);
View Full Code Here

Examples of it.eng.spagobi.commons.metadata.SbiConfig.toConfig()

      Criteria criteria = tmpSession.createCriteria(SbiConfig.class);
      criteria.add(labelCriterrion)
 
      SbiConfig hibConfig = (SbiConfig) criteria.uniqueResult();
      if (hibConfig == null) return null;
      toReturn = hibConfig.toConfig();       

      tx.commit();
    } catch (HibernateException he) {
      logException(he);
      if (tx != null)
View Full Code Here

Examples of org.milyn.GenericReaderConfigurator.toConfig()

public class GenericReaderConfiguratorTest extends TestCase {

    public void test_resource_only() {
        GenericReaderConfigurator configurator = new GenericReaderConfigurator(JavaXMLReader.class);

        SmooksResourceConfiguration config = configurator.toConfig().get(0);
        assertConfigOK(config, JavaXMLReader.class.getName(), 0, 0, 0);
    }

    public void test_resource_and_features_and_params() throws SAXException {
        GenericReaderConfigurator configurator = new GenericReaderConfigurator(JavaXMLReader.class);
View Full Code Here

Examples of org.milyn.GenericReaderConfigurator.toConfig()

        configurator.setFeature("http://c", false);
        configurator.setFeature("http://d", true);
        configurator.setFeature("http://e", false);
        configurator.setFeature("http://f", false);

        SmooksResourceConfiguration config = configurator.toConfig().get(0);
        assertConfigOK(config, JavaXMLReader.class.getName(), 8, 3, 3);

        assertEquals("1", config.getStringParameter("a"));
        assertEquals("2", config.getStringParameter("b"));
View Full Code Here

Examples of org.milyn.GenericReaderConfigurator.toConfig()

        GenericReaderConfigurator configurator = new GenericReaderConfigurator();

        configurator.getParameters().setProperty("a", "1");
        configurator.setFeature("http://a", true);

        SmooksResourceConfiguration config = configurator.toConfig().get(0);
        assertConfigOK(config, null, 2, 1, 0);

        assertEquals("1", config.getStringParameter("a"));

        assertTrue(AbstractParser.isFeatureOn("http://a", config));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.