Package org.eobjects.analyzer.descriptors

Examples of org.eobjects.analyzer.descriptors.ConfiguredPropertyDescriptor


        newValue = new ELInputColumn(expression);
      } else {
        newValue = new ConstantInputColumn(expression);
      }

      final ConfiguredPropertyDescriptor propertyDescriptor = _accessoryHandler.getPropertyDescriptor();
      final AbstractBeanJobBuilder<?, ?, ?> beanJobBuilder = _accessoryHandler.getBeanJobBuilder();
      if (propertyDescriptor.isArray()) {
        InputColumn<?>[] currentValue = (InputColumn[]) beanJobBuilder.getConfiguredProperty(propertyDescriptor);
        if (currentValue == null) {
          currentValue = new InputColumn[0];
        }
        newValue = CollectionUtils.array(currentValue, newValue);
View Full Code Here


  @Override
  public void applyPropertyValues() {
    for (PropertyWidget<?> propertyWidget : getPropertyWidgetFactory().getWidgets()) {
      if (propertyWidget.isSet()) {
        Object value = propertyWidget.getValue();
        ConfiguredPropertyDescriptor propertyDescriptor = propertyWidget.getPropertyDescriptor();
        _filterJobBuilder.setConfiguredProperty(propertyDescriptor, value);
      }
    }
  }
View Full Code Here

   *            defines whether or not the method should throw an exception in
   *            case some of the applied properties are missing or errornous
   */
  public void applyPropertyValues(boolean errorAware) {
    for (PropertyWidget<?> propertyWidget : getPropertyWidgetFactory().getWidgets()) {
      ConfiguredPropertyDescriptor propertyDescriptor = propertyWidget.getPropertyDescriptor();
      if (propertyWidget.isSet()) {
        Object value = propertyWidget.getValue();
        setConfiguredProperty(propertyDescriptor, value);
      } else {
        if (errorAware && propertyDescriptor.isRequired()) {
          throw new UnconfiguredConfiguredPropertyException(_beanJobBuilder, propertyDescriptor);
        }
      }
    }
  }
View Full Code Here

        .with(PropertyDescriptor.class, propertyDescriptor).createInjector();
  }

  public PropertyWidget<?> create(String propertyName) {
    BeanDescriptor<?> descriptor = _beanJobBuilder.getDescriptor();
    ConfiguredPropertyDescriptor propertyDescriptor = descriptor.getConfiguredProperty(propertyName);
    if (propertyDescriptor == null) {
      throw new IllegalArgumentException("No such property: " + propertyName);
    }
    return create(propertyDescriptor);
  }
View Full Code Here

      } catch (Exception ex) {
        logger.debug("Job not correctly configured", ex);
        final String errorMessage;
        if (ex instanceof UnconfiguredConfiguredPropertyException) {
          UnconfiguredConfiguredPropertyException unconfiguredConfiguredPropertyException = (UnconfiguredConfiguredPropertyException) ex;
          ConfiguredPropertyDescriptor configuredProperty = unconfiguredConfiguredPropertyException
              .getConfiguredProperty();
          AbstractBeanJobBuilder<?, ?, ?> beanJobBuilder = unconfiguredConfiguredPropertyException
              .getBeanJobBuilder();
          errorMessage = "Property '" + configuredProperty.getName() + "' in "
              + LabelUtils.getLabel(beanJobBuilder) + " is not set!";
        } else {
          errorMessage = ex.getMessage();
        }
        _statusLabel.setText("Job error status: " + errorMessage);
View Full Code Here

TOP

Related Classes of org.eobjects.analyzer.descriptors.ConfiguredPropertyDescriptor

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.