Package org.openbp.cockpit.generator

Examples of org.openbp.cockpit.generator.GeneratorSettings


            if (gen != null)
            {
              // Initialize the generator context and settings as if we would have gotten them from an item of newer type
              context.setSelectedGenerator(gen);

              GeneratorSettings settings = new GeneratorSettings();
              settings.setGeneratorName(gen.getName());
              context.setGeneratorSettings(settings);
              context.setProperty(GeneratorWizard.SETTINGS_PAGE, settings);
            }
          }
        }
View Full Code Here


      // Prepend xml method tag
      generatorInfo = "<?xml version=\"1.0\" encoding=\"" + XMLDriver.getInstance().getEncoding() + "\"?>" + generatorInfo;

      ByteArrayInputStream is = new ByteArrayInputStream(generatorInfo.getBytes());

      GeneratorSettings settings;
      try
      {
        settings = (GeneratorSettings) XMLDriver.getInstance().deserializeStream(GeneratorSettings.class, is);

        // Perform post-processing
        StandardMsgContainer msgs = new StandardMsgContainer();
        settings.setModel(item.getModel());
        settings.afterDeserialization(msgs);
        if (!msgs.isEmpty())
        {
          // Report errors that occured during the post-processing
          JMsgBox.show(null, msgs.toString(), JMsgBox.TYPE_OKLATER | JMsgBox.ICON_ERROR);
        }
      }
      catch (XMLDriverException e)
      {
        ExceptionUtil.printTrace(e);
        return false;
      }

      String name = settings.getGeneratorName();
      Generator gen = GeneratorMgr.getInstance().getGenerator(name);
      if (gen != null)
      {
        context.setSelectedGenerator(gen);
        context.setGeneratorSettings(settings);
View Full Code Here

      if (gen != null)
      {
        // Initialize the generator context and settings as if we would have gotten them from an item of newer type
        context.setSelectedGenerator(gen);

        GeneratorSettings settings = new GeneratorSettings();
        settings.setGeneratorName(generatorName);
        context.setGeneratorSettings(settings);
        context.setProperty(GeneratorWizard.SETTINGS_PAGE, settings);
      }
    }
  }
View Full Code Here

      {
        Item item = context.getItem();

        // First, serialize the generator settings and store them in the item
        String info = null;
        GeneratorSettings settings = context.getGeneratorSettings();
        if (settings != null && selectedGenerator != null)
        {
          settings.beforeSerialization();

          StringBuffer sb = new StringBuffer();
          StringBufferOutputStream os = new StringBufferOutputStream(sb);
          try
          {
View Full Code Here

            if (gen != null)
            {
              // Initialize the generator context and settings as if we would have gotten them from an item of newer type
              context.setSelectedGenerator(gen);

              GeneratorSettings settings = new GeneratorSettings();
              settings.setGeneratorName(gen.getName());
              context.setGeneratorSettings(settings);
              context.setProperty(GeneratorWizard.SETTINGS_PAGE, settings);
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.generator.GeneratorSettings

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.