Package com.google.gwt.core.ext

Examples of com.google.gwt.core.ext.BadPropertyValueException


    @Override
    public ConfigurationProperty getConfigurationProperty(String propertyName)
        throws BadPropertyValueException {
      ConfigurationProperty prop = configProperties.get(propertyName);
      if (prop == null) {
        throw new BadPropertyValueException(propertyName);
      }
      return prop;
    }
View Full Code Here


    @Override
    public SelectionProperty getSelectionProperty(TreeLogger logger, String propertyName)
        throws BadPropertyValueException {
      SelectionProperty prop = selectionProperties.get(propertyName);
      if (prop == null) {
        throw new BadPropertyValueException(propertyName);
      }
      return prop;
    }
View Full Code Here

        PropertyOracle propertyOracle = context.getPropertyOracle();
        String consoleProfileProperty =
                propertyOracle.getConfigurationProperty("console.profile").getValues().get(0);

        if(null==consoleProfileProperty)
            throw new BadPropertyValueException("Missing configuration property 'console.profile'!");


        String prodVersionProperty =
                propertyOracle.getConfigurationProperty("console.product.version").getValues().get(0);
View Full Code Here

        if ("product".equals(consoleProfile)) {
            sourceWriter.println("return ProductConfig.Profile.PRODUCT;");
        } else if ("community".equals(consoleProfile)) {
            sourceWriter.println("return ProductConfig.Profile.COMMUNITY;");
        } else {
            throw new BadPropertyValueException(
                    "Invalid value for 'console.profile'. Valid values are 'community' or 'product'!");
        }
        sourceWriter.outdent();
        sourceWriter.println("}");
View Full Code Here

        if (property != null) {
            List<String> values = property.getValues();
            if (values != null && !values.isEmpty()) {
                return values.get(0);
            } else {
                throw new BadPropertyValueException("Missing configuration property '" + name + "'!");
            }
        } else {
            throw new BadPropertyValueException("Missing configuration property '" + name + "'!");
        }
    }
View Full Code Here

    Property prop = props.find(propertyName);
    if (prop == null) {
      // Don't know this property; that's not good.
      //
      throw new BadPropertyValueException(propertyName);
    }

    // Check if this property has already been queried for; if so, return
    // the same answer. This is necessary to match web mode behavior since
    // property providers are only called once. We cache even values that
View Full Code Here

        // Treat as an unknown value.
        //
        String msg = "Error while executing the JavaScript provider for property '"
            + propertyName + "'";
        logger.log(TreeLogger.ERROR, msg, e);
        throw new BadPropertyValueException(propertyName, "<failed to compute>");
      }
    }

    // value may be null if the provider returned an unknown property value.
    if (prop.isKnownValue(value)) {
      return value;
    } else {
      // Bad value due to the provider returning an unknown value.
      // The fact that the provider returned an invalid value will also
      // have been reported to the JS bad property value handler function.
      throw new BadPropertyValueException(propertyName, value);
    }
  }
View Full Code Here

      if (prop.getName().equals(propertyName)) {
        String value = currentValues[i];
        if (prop.isKnownValue(value)) {
          return value;
        } else {
          throw new BadPropertyValueException(propertyName, value);
        }
      }
    }

    // Didn't find it.
    //
    throw new BadPropertyValueException(propertyName);
  }
View Full Code Here

      final ConfigurationProperty cprop = (ConfigurationProperty) prop;
      final String name = cprop.getName();
      final List<String> values = cprop.getValues();
      return new DefaultConfigurationProperty(name, values);
    } else {
      throw new BadPropertyValueException(propertyName);
    }
  }
View Full Code Here

        possibleValues.add(v);
      }
      return new DefaultSelectionProperty(value, fallback, name, possibleValues,
          cprop.getFallbackValuesMap());
    } else {
      throw new BadPropertyValueException(propertyName);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.BadPropertyValueException

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.