@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.SCHOOL, false)); assertTrue(validator.canValidate(EntityNames.SCHOOL, true)); assertTrue(validator.canValidate(EntityNames.EDUCATION_ORGANIZATION, false)); assertTrue(validator.canValidate(EntityNames.EDUCATION_ORGANIZATION, true)); }
@Override public boolean canValidate(String entityType, boolean isTransitive) { if (EntityNames.SCHOOL.equals(entityType) || EntityNames.EDUCATION_ORGANIZATION.equals(entityType)) { if (isStudentOrParent()) { return !isTransitive; } return true; } return false; }
GenericToEdOrgValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { if (EntityNames.SCHOOL.equals(entityType) || EntityNames.EDUCATION_ORGANIZATION.equals(entityType)) { if (isStudentOrParent()) { return !isTransitive; } return true; } return false; } }
GenericToEdOrgValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { if (EntityNames.SCHOOL.equals(entityType) || EntityNames.EDUCATION_ORGANIZATION.equals(entityType)) { if (isStudentOrParent()) { return !isTransitive; } return true; } return false; }  }
GenericToEdOrgValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { if (EntityNames.SCHOOL.equals(entityType) || EntityNames.EDUCATION_ORGANIZATION.equals(entityType)) { if (isStudentOrParent()) { return !isTransitive; } return true; } return false; }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext(); }
GenericToEdOrgValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { if (EntityNames.SCHOOL.equals(entityType) || EntityNames.EDUCATION_ORGANIZATION.equals(entityType)) { if (isStudentOrParent()) { return !isTransitive; } return true; } return false; }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }