Package org.tuba.data

Examples of org.tuba.data.Configuration


  @Test
  public void scaleTest() {
    ConfigurationProvider cP = new ConfigurationProvider();
    cP.setScaleValue(SCALE);
    Configuration configuration = cP.serializeConfiguration();

    String curDir = System.getProperty("user.dir"); //$NON-NLS-1$
    String imageFile = curDir + TEST_IMAGE;

    ImageRepresentation image = new ImageRepresentation(
View Full Code Here


    Element element = new Element(TAG_TIME);
    element.setAttribute(VALUE, time);
    List<Element> elements = new ArrayList<Element>();
    elements.add(element);
    Configuration configuration = new Configuration(elements);
    ref.getIntegrator().setConfiguration(configuration);

    ReferenceManager.getInstance().saveReference(ref, artefact);

    ref = getReference(artefact);
    configuration = ref.getIntegrator().getConfiguration();
    Assert.assertNotNull(configuration);
    Assert.assertEquals(1, configuration.getConfigurationElements().size());
    String value = configuration.getConfigurationElements().get(0)
        .getAttributeValue(VALUE);
    Assert.assertEquals(time, value);

    ref.getIntegrator().setConfiguration(null);
    ReferenceManager.getInstance().saveReference(ref, artefact);
View Full Code Here

    for (String pattern : namePattern) {
      element = new Element(NAMEPATTERN);
      element.setAttribute(VALUE, pattern);
      elements.add(element);
    }
    return new Configuration(elements);
  }
View Full Code Here

  public Configuration getConfiguration() {
    Element configElement = element.getChild(TAG);
    if (configElement == null)
      return null;

    return new Configuration(getChildren(configElement));
  }
View Full Code Here

    for (IIntegrator integrator : docInfo.getIntegrators())
      for (String integrationID : docInfo.getIntegrationIDs(integrator)) {
        XMLArtefact xmlArtefact = integrationInfo
            .getArtefactReference(integrationID);
        try {
          Configuration config = integrator
              .getConfiguration(integrationID);
          updateIntegratorConfiguration(config, xmlArtefact);
        } catch (UnknownIntegrationArtefact e) {
          removeArtefact(xmlArtefact);
          continue;
View Full Code Here

    if (provider == null) {
      showNotConfigurableMessage(plugin, shell);
      return;
    }

    Configuration oldConfiguration = plugin.getConfiguration();
    Configuration configuration = provider.provideConfiguration(shell,
        oldConfiguration);
    if (configuration == null)
      return;
    plugin.setConfiguration(configuration);
  }
View Full Code Here

    List<Element> elements = new ArrayList<Element>();
    Element element = new Element(SCALE);
    String value = Float.toString(scaleValue);
    element.setAttribute(VALUE, value);
    elements.add(element);
    return new Configuration(elements);
  }
View Full Code Here

TOP

Related Classes of org.tuba.data.Configuration

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.