public void isUniqueAttributeName(String name, DataObjectTO object, ValidatorCallback callback) {
   for (ObjectPropertyTO prop : object.getProperties()) {
     if (prop.getName().equalsIgnoreCase(name)) {
       callback.onFailure();
       return;
     }
   }
   callback.onSuccess();
 }
 public void canDeleteDataObject(
     DataModelerContext context,
     DataObjectTO object,
     DataModelTO model,
     ValidatorCallback callback) {
   if (!context.getHelper().isDataObjectReferenced(object.getClassName())) {
     callback.onSuccess();
   } else {
     callback.onFailure();
   }
 }
 public void canExtend(
     DataModelerContext context,
     String siblingCandidateName,
     String parentCandidateName,
     ValidatorCallback callback) {
   if (context.getHelper().isAssignableFrom(siblingCandidateName, parentCandidateName)) {
     callback.onSuccess();
   } else {
     callback.onFailure();
   }
 }
 public void isValidPosition(String position, ValidatorCallback callback) {
   int i = -1;
   if (position == null || position.length() == 0) {
     i = 0; // null or empty String is allowed
   }
   try {
     i = Integer.parseInt(position, 10);
   } catch (NumberFormatException e) {
   }
   if (i < 0) {
     callback.onFailure();
   } else {
     callback.onSuccess();
   }
 }
 public void isUniqueEntityName(
     String packageName, String name, DataModelTO model, ValidatorCallback callback) {
   Boolean b = Boolean.TRUE;
   String className = assembleClassName(packageName, name);
   for (DataObjectTO d : model.getDataObjects()) {
     if (d.getClassName().equalsIgnoreCase(className)) {
       b = Boolean.FALSE;
       break;
     }
   }
   if (b) {
     callback.onSuccess();
   } else {
     callback.onFailure();
   }
 }