@Test public void testCanValidate() { setContext(seaStaff, Arrays.asList(SecureRoleRightAccessImpl.SEA_ADMINISTRATOR)); assertTrue(validator.canValidate(EntityNames.SECTION, true)); assertTrue(validator.canValidate(EntityNames.SECTION, false)); assertFalse(validator.canValidate(EntityNames.ATTENDANCE, true)); assertFalse(validator.canValidate(EntityNames.ATTENDANCE, false)); }
@Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.SECTION.equals(entityType) && isStaff(); }
StaffToGlobalSectionValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.SECTION.equals(entityType) && isStaff(); } }
StaffToGlobalSectionValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.SECTION.equals(entityType) && isStaff(); }  }
StaffToGlobalSectionValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.SECTION.equals(entityType) && isStaff(); }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext(); }
StaffToGlobalSectionValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.SECTION.equals(entityType) && isStaff(); }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> ids); @Override SecurityUtil.UserContext getContext();  }