Package com.google.gwt.core.ext

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


      // 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 (Arrays.asList(values).contains(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


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

    }

    @Override
    public ConfigurationProperty getConfigurationProperty(String propertyName)
        throws BadPropertyValueException {
      throw new BadPropertyValueException("no config properties");
    }
View Full Code Here

    public SelectionProperty getSelectionProperty(TreeLogger logger,
        String propertyName) throws BadPropertyValueException {
      if (userAgent != null && "user.agent".equals(propertyName)) {
        return userAgent;
      }
      throw new BadPropertyValueException("no property " + propertyName);
    }
View Full Code Here

    {
        PropertyOracle propertyOracle = context.getPropertyOracle();
        String profile = failSafeGetProperty(propertyOracle, "console.profile", null);
        if (null == profile)
        {
            throw new BadPropertyValueException("Missing configuration property 'console.profile'!");
        }
        String devHost = failSafeGetProperty(propertyOracle, "console.dev.host", "127.0.0.1");

        // most of the config attributes are by default empty
        // they need be overriden by custom gwt.xml descriptor on a project/product level
View Full Code Here

        value = ((ConfigurationProperty) prop).getValue();
      } else if (prop instanceof BindingProperty) {
        value = computePropertyValue(logger, propertyName,
            (BindingProperty) prop);
      } else {
        throw new BadPropertyValueException(propertyName);
      }
      prevAnswers.put(propertyName, value);
      return value;
    }
  }
View Full Code Here

      throws BadPropertyValueException {
    Property prop = getProperty(propertyName);
    if (prop instanceof BindingProperty) {
      return ((BindingProperty) prop).getDefinedValues();
    }
    throw new BadPropertyValueException(propertyName);
  }
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.isAllowedValue(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

    Property prop = props.find(propertyName);
    if (prop == null) {
      // Don't know this property; that's not good.
      //
      throw new BadPropertyValueException(propertyName);
    }
    return prop;
  }
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

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.