@Test(expected = IllegalArgumentException.class) public void testGuards() throws Exception { validator.validate(EntityNames.STUDENT, new HashSet<String>(Arrays.asList("student1", "student2"))); }
@Override public Set<String> validate(String entityType, Set<String> entityIds) throws IllegalStateException { Set<String> result = new HashSet<String>(); if(areParametersValid(GLOBAL_WRITE_RESOURCE, entityType, entityIds)) { result = entityIds; } return result; }
GlobalEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> entityIds) throws IllegalStateException { Set<String> result = new HashSet<String>(); if(areParametersValid(GLOBAL_WRITE_RESOURCE, entityType, entityIds)) { result = entityIds; } return result; } }
GlobalEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> entityIds) throws IllegalStateException { Set<String> result = new HashSet<String>(); if(areParametersValid(GLOBAL_WRITE_RESOURCE, entityType, entityIds)) { result = entityIds; } return result; }  }
GlobalEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> entityIds) throws IllegalStateException { Set<String> result = new HashSet<String>(); if(areParametersValid(GLOBAL_WRITE_RESOURCE, entityType, entityIds)) { result = entityIds; } return result; }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> entityIds); @Override SecurityUtil.UserContext getContext(); }
GlobalEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> entityIds) throws IllegalStateException { Set<String> result = new HashSet<String>(); if(areParametersValid(GLOBAL_WRITE_RESOURCE, entityType, entityIds)) { result = entityIds; } return result; }  @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, Set<String> entityIds); @Override SecurityUtil.UserContext getContext();  }