Examples of IConfig


Examples of com.commongroundpublishing.rubylet.config.IConfig

    private volatile ServletContextListener child;
   
    private volatile ServletContextEvent sce;
   
    public void contextInitialized(ServletContextEvent sce) {
        final IConfig scConfig = new ServletContextConfig(sce.getServletContext());
        final String prefix = "RubyListener." + getClass().getSimpleName() + ".";
        listenerConfig = new PrefixedConfig(prefix, scConfig);
        final IConfig config = new ChainedConfig(listenerConfig, scConfig);

        this.sce = sce;
        factory = Util.getFactory(config, Util.RESTARTABLE_RUBY_FACTORY);
        factory.reference(this);
        child = factory.makeListener(listenerConfig);
View Full Code Here

Examples of com.gracevallorani.config.IConfig

@RequestMapping(value = "/admin/temp")
public class BackupAdminController {
  @RequestMapping(value = "shorts", method = RequestMethod.GET)
  public String getShorts(final HttpServletRequest request, Model model)  {
    try {
      IConfig config = new J2eeConfig();
      TreeMap<String, Showreel[]> categories = ArrayListHelper.getCategories(request);
      EntityManager entity = config.getEntityManagerFactory().createEntityManager();
     
      EntityTransaction trans = entity.getTransaction();
      trans.begin();
      try {
        int shortSectionOrder = 0;
View Full Code Here

Examples of de.mhus.lib.config.IConfig

  public void testHash() throws Exception {
 
    HashConfig c = new HashConfig();
    c.setString("test1", "wow");
    c.setString("test2", "alf");
    IConfig s = c.createConfig("sub");
    s.setString("test1", "wow1");
    s.setString("test2", "alf1");
    s = c.createConfig("sub");
    s.setString("test1", "wow2");
    s.setString("test2", "alf2");
    s = c.createConfig("sub");
    s.setString("test1", "wow3");
    s.setString("test2", "alf3");

    derTeschd(c, true);
  }
View Full Code Here

Examples of de.mhus.lib.config.IConfig

  }

  public BaseInfo initialize(IModConfig config) {
   
    Info info = new Info();
    IConfig cclasspath = config.getConfiguration().getConfig("classpath");
    info.classloader = new DynamicClassLoader(config.getConfiguration().getString("id", "?"));
    info.classloader.doSetupFromConfig(cclasspath);
    classloader.add(info.classloader);
   
    return info;
View Full Code Here

Examples of de.mhus.lib.config.IConfig

    MFormModel model = new MFormModel(MSingleton.instance().getActivator(),this);
    ObjectList list = model.getList();
    for (String key : config.getPropertyKeys()) {
      log().t("key",key);
      try {
        IConfig elementConfig = config.getConfig("element_" + key);
        if (elementConfig != null) {
          log().t("accept fobject",key);
          FObject element = registry.createElement(model, elementConfig.getString("type", "input"), elementConfig);
          element.setName(key);
          element.setTitle(key);
          list.add(element);
        }
      } catch (Exception e) {
View Full Code Here

Examples of de.mhus.lib.config.IConfig

    assertEquals( "sub", c.getConfigKeys()[0] );
   
    IConfig[] list = c.getConfigBundle("sub");
    assertEquals(3, list.length);
   
    IConfig sub = list[0];
    assertEquals("wow1", sub.getString("test1", "no") );
    assertEquals("alf1", sub.getString("test2", "no") );
    assertEquals("no",  sub.getString("test3", "no") );
   
    sub = list[1];
    assertEquals("wow2", sub.getString("test1", "no") );
    assertEquals("alf2", sub.getString("test2", "no") );
    assertEquals("no",  sub.getString("test3", "no") );
   
    sub = list[2];
    assertEquals("wow3", sub.getString("test1", "no") );
    assertEquals("alf3", sub.getString("test2", "no") );
    assertEquals("no",  sub.getString("test3", "no") );
   
    // change properties
   
    c.setProperty("test1", "aloa");
    c.setProperty("test3", "nix");
    assertEquals("aloa", c.getString("test1", "no") );
    assertEquals("alf", c.getString("test2", "no") );
    assertEquals("nix",  c.getString("test3", "no") );

    // change config
   
    sub = c.createConfig("sub");
    sub.setProperty("test1", "aloa4");
    sub.setProperty("test2", "alf4");
    assertEquals("aloa4", sub.getString("test1", "no") );
    assertEquals("alf4", sub.getString("test2", "no") );
    assertEquals("no",  sub.getString("test3", "no") );
   
    assertEquals( 2, c.moveConfig(sub, IConfig.MOVE_UP) );
    assertEquals( 3, c.moveConfig(sub, IConfig.MOVE_DOWN) );   
    assertEquals( 0, c.moveConfig(sub, IConfig.MOVE_FIRST) );
    assertEquals( 3, c.moveConfig(sub, IConfig.MOVE_LAST) );
View Full Code Here

Examples of de.mhus.lib.config.IConfig

    // Create Config
    HashConfig c = new HashConfig();
    c.setString("class", ClassLoaderActivator.class.getCanonicalName());
    c.setString("id", "test1");
    c.setString("name", "Loading1");
    IConfig cpath = c.createConfig("classpath");
    IConfig loader = cpath.createConfig("resource");
    loader.setString("jar", "etc/test/test.jar");
   
    // Create Bundle and ModConfig
    IBundle b1 = new ModBundle(new IModConfig[] {new ModConfig(c)}, "test1", false);
   
    // Init Bundle
View Full Code Here

Examples of de.mhus.lib.config.IConfig

    if (start != 0 && stop == 0) {
      stop = System.currentTimeMillis();
     
      try {
        if (MSingleton.instance().isPersistence()) {
          IConfig persistence = MSingleton.instance().getPersistenceManager().sessionScope().getPersistence("de.mhus.lib");
          long uid = MSingleton.instance().nextUniqueId();
          persistence.setString(getJmxName() + "_" + name + "_" + uid, getCurrentTimeAsString());
          persistence.save();
        }
      } catch (Throwable t) {
        log().t(t);
      }
     
View Full Code Here

Examples of de.mhus.lib.config.IConfig


public class BpmTest extends TestCase {

  public void testBpm() throws Exception {
    IConfig config = ConfigUtil.loadXmlForClass(BpmTest.class);
   
    MBpm bpm = MBpm.createBpm(config);
    bpm.setAsDefault();
    assertNotNull(bpm);
   
View Full Code Here

Examples of de.mhus.lib.config.IConfig

    doInitialize();
    open = true;
  }

  protected void doCreatePersistence() throws Exception {
    IConfig cPersistence = config.getConfig("persistence");
    if (cPersistence != null) {
      String clazz = cPersistence.getExtracted("class",DummyPersistence.class.getCanonicalName());
      persistence = (BpmPersistence) activator.getObject(clazz);
    } else
      persistence = new DummyPersistence();
   
    persistence.initialize(cPersistence);
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.