Examples of EmptyPropertyToken


Examples of org.structr.common.error.EmptyPropertyToken

  @Override
  public boolean isValid(SecurityContext securityContext, GraphObject object, PropertyKey<T> key, T value, ErrorBuffer errorBuffer) {

    if (value == null) {

      errorBuffer.add(object.getType(), new EmptyPropertyToken(key));

    } else {

      if (values.contains(value)) {
View Full Code Here

Examples of org.structr.common.error.EmptyPropertyToken

    if(value != null && value.length() > 0) {
      return true;
    }

    errorBuffer.add(object.getType(), new EmptyPropertyToken(key));
    return false;
  }
View Full Code Here

Examples of org.structr.common.error.EmptyPropertyToken

      return true;

    }

    errorBuffer.add(type, new EmptyPropertyToken(key));

    return true;
  }
View Full Code Here

Examples of org.structr.common.error.EmptyPropertyToken

      return false;

    }

    errorBuffer.add(type, new EmptyPropertyToken(key));

    return true;
  }
View Full Code Here

Examples of org.structr.common.error.EmptyPropertyToken

  public static boolean checkPropertyNotNull(final GraphObject node, final PropertyKey key, final ErrorBuffer errorBuffer) {
   
    String type  = node.getType();

    if (key == null) {
      errorBuffer.add(type, new EmptyPropertyToken(UnknownType));
      return true;
    }

    Object value = node.getProperty(key);

    if (value != null) {

      if (value instanceof Iterable) {

        if (((Iterable) value).iterator().hasNext()) {

          return false;

        }

      } else {

        return false;

      }

    }

    errorBuffer.add(type, new EmptyPropertyToken(key));

    return true;
  }
View Full Code Here

Examples of org.structr.common.error.EmptyPropertyToken

    String type   = node.getType();
    boolean error = false;

    if ((date == null) || ((date != null) && (date.getTime() == 0))) {

      errorBuffer.add(type, new EmptyPropertyToken(key));
      error = true;

    }

    return error;
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.