Package org.structr.common.error

Examples of org.structr.common.error.InvalidPropertySchemaToken


        parseFormatString(entity, source.substring(1, source.length() - 1));

      } else {

        errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(source, "invalid_validation_expression", "Valdation expression must be enclosed in (), e.g. (" + source + ")"));
      }
    }
  }
View Full Code Here


  @Override
  public void parseFormatString(final Schema entity, String expression) throws FrameworkException {

    if (expression.length() == 0) {
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_date_pattern", "Empty date pattern."));
      return;
    }

    auxType = ", \"" + expression +"\"";
  }
View Full Code Here

  @Override
  public void parseFormatString(final Schema entity, final String expression) throws FrameworkException {

    if ("[]".equals(expression)) {
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_validation_expression", "Empty validation expression."));
      return;
    }

    localValidator = ", new SimpleRegexValidator(\""  + expression + "\")";
  }
View Full Code Here

    try {
      return Long.parseLong(source);
     
    } catch (Throwable t) {
     
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(source, "invalid_" + which +"_bound", StringUtils.capitalize(which) + " bound must be of type Long."));
    }
   
    return null;
  }
View Full Code Here

     
      return Integer.parseInt(source);
     
    } catch (Throwable t) {
     
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(source, "invalid_" + which +"_bound", StringUtils.capitalize(which) + " bound must be of type Integer."));
    }
   
    return null;
  }
View Full Code Here

          t.printStackTrace();
        }
      }
    }

    errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(source, "invalid_property_definition", "Unknow value type " + source + ", options are " + Arrays.asList(Type.values()) + "."));
    throw new FrameworkException(422, errorBuffer);
  }
View Full Code Here

  @Override
  public void parseFormatString(final Schema entity, final String expression) throws FrameworkException {

    if ("[]".equals(expression)) {
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_validation_expression", "Empty validation expression."));
      return;
    }

    localValidator = ", new SimpleRegexValidator(\""  + expression + "\")";
  }
View Full Code Here

    try {
      return Double.parseDouble(source);
     
    } catch (Throwable t) {
     
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(source, "invalid_" + which +"_bound", StringUtils.capitalize(which) + " bound must be of type Double."));
    }
   
    return null;
  }
View Full Code Here

  @Override
  public void parseFormatString(final Schema entity, final String expression) throws FrameworkException {

    if (expression.isEmpty()) {
      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_property_reference", "Empty property reference."));
      return;
    }

    auxType = ", " + expression + "Property";
  }
View Full Code Here

            buf.append(", ");
          }

        } else {

          errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_property_definition", "Invalid enum type name, must match [a-zA-Z_]+."));

        }
      }
      buf.append("\n\t};");

      enumDefinitions.add(buf.toString());

    } else {

      errorBuffer.add(SchemaNode.class.getSimpleName(), new InvalidPropertySchemaToken(expression, "invalid_property_definition", "No enum types found, please specify a list of types, e.g. (red, green, blue)"));
    }
  }
View Full Code Here

TOP

Related Classes of org.structr.common.error.InvalidPropertySchemaToken

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.