Examples of AttributeNotAllowed


Examples of org.waveprotocol.wave.model.experimental.schema.AttributeValidationResult.AttributeNotAllowed

  /**
   * Checks that the validation result is ATTRIBUTE_NOT_ALLOWED.
   */
  private static void checkValidation_ANA(AttributeValidationResult result, String name) {
    assertEquals(Type.ATTRIBUTE_NOT_ALLOWED, result.getType());
    AttributeNotAllowed ana = result.asAttributeNotAllowed();
    assertEquals(name, ana.getName());
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.experimental.schema.AttributeValidationResult.AttributeNotAllowed

    }
    for (Map.Entry<String, String> attribute : attributes.entrySet()) {
      String name = attribute.getKey();
      ValueValidator validator = valueValidators.get(name);
      if (validator == null) {
        return new AttributeNotAllowed(name);
      }
      String value = attribute.getValue();
      if (!validator.validate(value)) {
        return new InvalidAttributeValue(name, value);
      }
View Full Code Here

Examples of org.waveprotocol.wave.model.experimental.schema.AttributeValidationResult.AttributeNotAllowed

  AttributeValidationResult validate(AttributesUpdate update) {
    for (int i = 0; i < update.changeSize(); ++i) {
      String name = update.getChangeKey(i);
      ValueValidator validator = valueValidators.get(name);
      if (validator == null) {
        return new AttributeNotAllowed(name);
      }
      String value = update.getNewValue(i);
      if (value == null) {
        if (requiredAttributes.contains(name)) {
          return new RemovingRequiredAttribute(name);
View Full Code Here

Examples of org.waveprotocol.wave.model.experimental.schema.AttributeValidationResult.AttributeNotAllowed

    }
    for (Map.Entry<String, String> attribute : attributes.entrySet()) {
      String name = attribute.getKey();
      ValueValidator validator = valueValidators.get(name);
      if (validator == null) {
        return new AttributeNotAllowed(name);
      }
      String value = attribute.getValue();
      if (!validator.validate(value)) {
        return new InvalidAttributeValue(name, value);
      }
View Full Code Here

Examples of org.waveprotocol.wave.model.experimental.schema.AttributeValidationResult.AttributeNotAllowed

  AttributeValidationResult validate(AttributesUpdate update) {
    for (int i = 0; i < update.changeSize(); ++i) {
      String name = update.getChangeKey(i);
      ValueValidator validator = valueValidators.get(name);
      if (validator == null) {
        return new AttributeNotAllowed(name);
      }
      String value = update.getNewValue(i);
      if (value == null) {
        if (requiredAttributes.contains(name)) {
          return new RemovingRequiredAttribute(name);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.