target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testValidUpdateWithNoEdorgId() { EntityBody entityBody = new EntityBody(); entityBody.put("key", "value"); existingSection.getBody().put(ParameterConstants.SCHOOL_ID, ED_ORG_B); when(uriInfo.getPathSegments()).thenReturn(putPath); writeValidator.validateWriteRequest(entityBody, uriInfo, principal); }
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testValidDelete() { existingSection.getBody().put(ParameterConstants.SCHOOL_ID, ED_ORG_B); when(uriInfo.getPathSegments()).thenReturn(putPath); writeValidator.validateWriteRequest(null, uriInfo, principal); }
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test @ExpectedException(value = AccessDeniedException.class) public void testInvalidDelete() { existingSection.getBody().put(ParameterConstants.SCHOOL_ID, UN_ASSOCIATED_ED_ORG); when(uriInfo.getPathSegments()).thenReturn(putPath); writeValidator.validateWriteRequest(null, uriInfo, principal); }
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testEntityNotFound() { when(repo.findById(EntityNames.SECTION, SECTION_ID)).thenReturn(null); when(uriInfo.getPathSegments()).thenReturn(putPath); writeValidator.validateWriteRequest(null, uriInfo, principal); }
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testComplex() { existingSection.getBody().put(ParameterConstants.SCHOOL_ID, ED_ORG_B); String GRADEBOOK_ID = "gradebook-id"; Entity gradebookEntity = new MongoEntity(EntityNames.GRADEBOOK_ENTRY, GRADEBOOK_ID, new HashMap<String, Object>(), null); gradebookEntity.getBody().put(ParameterConstants.SECTIO...
public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to referenced entity."...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
WriteValidator { public void validateWriteRequest(EntityBody entityBody, UriInfo uriInfo, SLIPrincipal principal) { targetEdOrgIds = new HashSet<String>(); if (isWriteValidationEnabled && !isValidForEdOrgWrite(entityBody, uriInfo, principal)) { throw new APIAccessDeniedException("Invalid reference. No association to re...
@Test public void testEdOrgReferenceEntities() { securityContextInjector.setEducatorContext(); Entity edorg = createEntity(EntityNames.SCHOOL, "edorg1", new HashMap<String, Object>()); Mockito.when(repo.findAll(Mockito.eq(EntityNames.EDUCATION_ORGANIZATION), argThat(new BaseMatcher<NeutralQuery>() { @Override public bo...
public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
@Test public void testEdOrgFromAssociation() { securityContextInjector.setEducatorContext(); Entity edorg1 = createEntity(EntityNames.SCHOOL, "edorg1", new HashMap<String, Object>()); Entity edorg2 = createEntity(EntityNames.SCHOOL, "edorg2", new HashMap<String, Object>()); Entity edorg3 = createEntity(EntityNames.SCHO...
public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
@Test public void testEdOrgThroughStaff() { securityContextInjector.setStaffContext(); Entity edorg1 = createEntity(EntityNames.SCHOOL, "edorg1", new HashMap<String, Object>()); Entity edorg2 = createEntity(EntityNames.SCHOOL, "edorg2", new HashMap<String, Object>()); Mockito.when(repo.findAll(Mockito.eq(EntityNames.ED...
public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
@Test public void testHappyZipFileProcessor() throws Exception { Exchange preObject = new DefaultExchange(new DefaultCamelContext()); String batchJobId = NewBatchJob.createId("ValidZip.zip"); Mockito.when(workNote.getBatchJobId()).thenReturn(batchJobId); preObject.getIn().setBody(workNote); Mockito.when(mockedBatchJobD...
@Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batchJobId); } }
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
@Test (expected = AccessDeniedException.class) public void testInvalidReference() { securityContextInjector.setEducatorContext(); Map<String, Object> body = new HashMap<String, Object>(); body.put(ParameterConstants.SECTION_ID, "section1"); final Entity gradebookEntry = createEntity(EntityNames.GRADEBOOK_ENTRY, "gradeb...
public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } }
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineEdorgs(Iterable<Entity> entities, String entityType) { Set<String> edorgs = new HashSet<String>(); for (Entity entity : findOwner(entities, entityType, false)) { edorgs.add(entity.getEntityId()); } return edorgs; } @SuppressWarnings("unused")...
@Test public void testHierarchicalEdOrgs() { securityContextInjector.setStaffContext(); Entity edorg1 = createEntity(EntityNames.SCHOOL, "edorg1", new HashMap<String, Object>()); Mockito.when(repo.findAll(Mockito.eq(EntityNames.EDUCATION_ORGANIZATION), Mockito.any(NeutralQuery.class))).thenReturn( Arrays.asList(edorg1)...
public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg.getEntityId()); hierarchicalEdorgs.addAll(helper....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
@Test public void testOrphanedEntity() { securityContextInjector.setStaffContext(); Entity principalEntity = Mockito.mock(Entity.class); Mockito.when(principalEntity.getEntityId()).thenReturn("doofus1_id"); SLIPrincipal principal = Mockito.mock(SLIPrincipal.class); Mockito.when(principal.getEntity()).thenReturn(princip...
public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg.getEntityId()); hierarchicalEdorgs.addAll(helper....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
EdOrgOwnershipArbiter extends OwnershipArbiter { public Set<String> determineHierarchicalEdorgs(Iterable<Entity> entities, String entityType) { Set<String> hierarchicalEdorgs = new HashSet<String>(); List<Entity> edorgs = findOwner(entities, entityType, true); for (Entity edorg : edorgs) { hierarchicalEdorgs.add(edorg....
@Test public void followStudents() { paths = Arrays.asList("v1", ResourceNames.STUDENT_SCHOOL_ASSOCIATIONS, "ssa123", ResourceNames.STUDENTS); when(studentValidator.isReadAllowed(Matchers.anyListOf(String.class), any(MultivaluedMapImpl.class))).thenReturn(true); assertTrue(underTest.isAllowed(request)); paths = Arrays....
@Override protected boolean isReadAllowed(List<String> path, MultivaluedMap<String, String> queryParameters) { List<String> subPath = null; if (path.size() == 3) { subPath = Arrays.asList(path.get(2)); } else if (path.size() == 4) { subPath = Arrays.asList(path.get(2), path.get(3)); } if (subPath != null && path.get(0)...
ParentAccessValidator extends AccessValidator { @Override protected boolean isReadAllowed(List<String> path, MultivaluedMap<String, String> queryParameters) { List<String> subPath = null; if (path.size() == 3) { subPath = Arrays.asList(path.get(2)); } else if (path.size() == 4) { subPath = Arrays.asList(path.get(2), pa...
ParentAccessValidator extends AccessValidator { @Override protected boolean isReadAllowed(List<String> path, MultivaluedMap<String, String> queryParameters) { List<String> subPath = null; if (path.size() == 3) { subPath = Arrays.asList(path.get(2)); } else if (path.size() == 4) { subPath = Arrays.asList(path.get(2), pa...
ParentAccessValidator extends AccessValidator { @Override protected boolean isReadAllowed(List<String> path, MultivaluedMap<String, String> queryParameters) { List<String> subPath = null; if (path.size() == 3) { subPath = Arrays.asList(path.get(2)); } else if (path.size() == 4) { subPath = Arrays.asList(path.get(2), pa...
ParentAccessValidator extends AccessValidator { @Override protected boolean isReadAllowed(List<String> path, MultivaluedMap<String, String> queryParameters) { List<String> subPath = null; if (path.size() == 3) { subPath = Arrays.asList(path.get(2)); } else if (path.size() == 4) { subPath = Arrays.asList(path.get(2), pa...
@Test public void testAssessment() { Entity assessment = helper.generateAssessment(); Assert.assertTrue(validator.canAccess(assessment)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testEdorg() { Entity edorg = helper.generateEdorgWithParent(null); Assert.assertTrue(validator.canAccess(edorg)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testLearningObj() { Entity obj = helper.generateLearningObjective(); Assert.assertTrue(validator.canAccess(obj)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testLearningStd() { Entity ls = helper.generateLearningStandard(); Assert.assertTrue(validator.canAccess(ls)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testProgram() { Entity prog = helper.generateProgram(); Assert.assertTrue(validator.canAccess(prog)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testGradingPeriod() { Entity gp = helper.generateGradingPeriod(); Assert.assertTrue(validator.canAccess(gp)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testNoControlFileZipFileProcessor() throws Exception { Exchange preObject = new DefaultExchange(new DefaultCamelContext()); String batchJobId = NewBatchJob.createId("NoControlFile.zip"); Mockito.when(workNote.getBatchJobId()).thenReturn(batchJobId); preObject.getIn().setBody(workNote); Mockito.when(mo...
@Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batchJobId); } }
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
ZipFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); String batchJobId = workNote.getBatchJobId(); if (batchJobId == null) { handleNoBatchJobIdInExchange(exchange); } else { processZipFile(exchange, batc...
@Test public void testStudent() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Assert.assertFalse(validator.canAccess(student)); helper.generateStudentSchoolAssociation(student.getEntityId(), myEdOrg.getEntityId(), "", fa...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentSchoolAssociation() { Entity student = helper.generateStudent(); Entity ssa = helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Assert.assertFalse(validator.canAccess(ssa)); ssa = helper.generateStudentSchoolAssociation(student.getEntityId(...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentSectionAssoc() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity section = helper.generateSection(otherEdorg.getEntityId()); Entity ssa = helper.generateSSA(student.getEntityId(), section....
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testGrade() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity section = helper.generateSection(otherEdorg.getEntityId()); Entity ssa = helper.generateSSA(student.getEntityId(), section.getEntityId(),...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testAttendance() { Entity att = helper.generateAttendance("blah", otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(att)); att = helper.generateAttendance("blah", myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(att)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testCohort() { Entity cohort = helper.generateCohort(otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(cohort)); cohort = helper.generateCohort(myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(cohort)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testDisciplineIncident() { Entity di = helper.generateDisciplineIncident(otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(di)); di = helper.generateDisciplineIncident(myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(di)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testGraduationPlan() { Entity gp = helper.generateGraduationPlan(otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(gp)); gp = helper.generateGraduationPlan(myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(gp)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testParent() { Entity student = helper.generateStudent(); Entity ssa = helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity parent = helper.generateParent(); helper.generateStudentParentAssoc(student.getEntityId(), parent.getEntityId()); Assert.as...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentParentAssoc() { Entity student = helper.generateStudent(); Entity ssa = helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity parent = helper.generateParent(); Entity spa = helper.generateStudentParentAssoc(student.getEntityId(), parent....
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testPurgeDeltas() throws Exception { Mockito.when(job.getProperty(AttributeType.DUPLICATE_DETECTION.getName())).thenReturn(RecordHash.RECORD_HASH_MODE_DISABLE); Exchange exchange = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = new WorkNote("batchJobId", false); exchange.getIn().s...
@Override public void process(Exchange exchange, ProcessorArgs<WorkNote> args) { String tenantId = TenantContext.getTenantId(); removeRecordHash(args.job, tenantId); }
DeltaHashPurgeProcessor extends IngestionProcessor<WorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<WorkNote> args) { String tenantId = TenantContext.getTenantId(); removeRecordHash(args.job, tenantId); } }
DeltaHashPurgeProcessor extends IngestionProcessor<WorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<WorkNote> args) { String tenantId = TenantContext.getTenantId(); removeRecordHash(args.job, tenantId); } }
DeltaHashPurgeProcessor extends IngestionProcessor<WorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<WorkNote> args) { String tenantId = TenantContext.getTenantId(); removeRecordHash(args.job, tenantId); } @Override void process(Exchange exchange, ProcessorArgs<WorkNote> args); }
DeltaHashPurgeProcessor extends IngestionProcessor<WorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<WorkNote> args) { String tenantId = TenantContext.getTenantId(); removeRecordHash(args.job, tenantId); } @Override void process(Exchange exchange, ProcessorArgs<WorkNote> args); stati...
@Test(expected = MissingArgumentException.class) public void missingServerValue() throws ParseException, MissingConfigException { String[] args = new String[] { "-u", "user", "-pass", "password", "-s", "-d", "localDir", "-port", "22" }; propUtils.getUploadProperties(args); }
public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(FLAG_PASSWORD); i...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
@Test public void testSection() { Entity sec = helper.generateSection(otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(sec)); sec = helper.generateSection(myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(sec)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStaff() { Entity staff = helper.generateStaff(); helper.generateStaffEdorg(staff.getEntityId(), otherEdorg.getEntityId(), false); Assert.assertFalse(validator.canAccess(staff)); helper.generateStaffEdorg(staff.getEntityId(), myEdOrg.getEntityId(), false); Assert.assertTrue(validator.canAccess(staf...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStaffEdOrg() { Entity staff = helper.generateStaff(); Entity staffEdorg = helper.generateStaffEdorg(staff.getEntityId(), otherEdorg.getEntityId(), false); Assert.assertFalse(validator.canAccess(staffEdorg)); staffEdorg = helper.generateStaffEdorg(staff.getEntityId(), myEdOrg.getEntityId(), false);...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStaffCohort() { Entity staff = helper.generateStaff(); helper.generateStaffEdorg(staff.getEntityId(), otherEdorg.getEntityId(), false); Entity staffCohort = helper.generateStaffCohort(staff.getEntityId(), "cohortId", false, true); Assert.assertFalse(validator.canAccess(staffCohort)); helper.genera...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStaffProgram() { Entity staff = helper.generateStaff(); helper.generateStaffEdorg(staff.getEntityId(), otherEdorg.getEntityId(), false); Entity staffProgram = helper.generateStaffProgram(staff.getEntityId(), "programId", false, true); Assert.assertFalse(validator.canAccess(staffProgram)); helper.g...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentCohortAssoc() { Entity student = helper.generateStudent(); Entity ssa = helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity cohort = helper.generateCohort(otherEdorg.getEntityId()); Entity studentCohort = helper.generateStudentCohort(s...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentCompetency() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity section = helper.generateSection(otherEdorg.getEntityId()); Entity ssa = helper.generateSSA(student.getEntityId(), section.ge...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentCompObj() { Entity obj = helper.generateStudentCompetencyObjective(otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(obj)); obj = helper.generateStudentCompetencyObjective(myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(obj)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentDiscIncAssoc() { Entity student = helper.generateStudent(); helper.generateStudentSchoolAssociation(student.getEntityId(), otherEdorg.getEntityId(), "", false); Entity discIncAssoc = helper.generateStudentDisciplineIncidentAssociation(student.getEntityId(), "dicpId"); Assert.assertFalse(val...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testStudentProgramAssoc() { Entity spa = helper.generateStudentProgram("studentId", "programId", otherEdorg.getEntityId(), false); Assert.assertFalse(validator.canAccess(spa)); spa = helper.generateStudentProgram("studentId", "programId", myEdOrg.getEntityId(), false); Assert.assertTrue(validator.canA...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void unSupportedEntitiesTest() throws Exception { Exchange exchange = new DefaultExchange(new DefaultCamelContext()); List<NeutralRecord> neutralRecords = new ArrayList<NeutralRecord>(); neutralRecords.add(createNeutralRecord("gradingPeriod")); NeutralRecordWorkNote workNote = new NeutralRecordWorkNote(neu...
@Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > 0) { Metrics metrics = Metrics.newInstance(records.get(0).getSourceFile()); a...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
@Test public void testTeacherSectionAssoc() { Entity staff = helper.generateStaff(); helper.generateStaffEdorg(staff.getEntityId(), otherEdorg.getEntityId(), false); Entity staffSection = helper.generateTSA(staff.getEntityId(), "sectionId", false); Assert.assertFalse(validator.canAccess(staffSection)); helper.generateS...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testTeacherSchoolAssoc() { Entity tsa = helper.generateTeacherSchool("teacherId", otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(tsa)); tsa = helper.generateTeacherSchool("teacherId", myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(tsa)); }
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test public void testTeacher() { Entity teacher = helper.generateTeacher(); helper.generateTeacherSchool(teacher.getEntityId(), otherEdorg.getEntityId()); Assert.assertFalse(validator.canAccess(teacher)); helper.generateTeacherSchool(teacher.getEntityId(), myEdOrg.getEntityId()); Assert.assertTrue(validator.canAccess(...
public boolean canAccess(Entity entity) { return canAccess(entity, true); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
EntityOwnershipValidator { public boolean canAccess(Entity entity) { return canAccess(entity, true); } boolean canAccess(Entity entity); boolean canAccess(Entity entity, boolean isTransitive); }
@Test(expected = IllegalArgumentException.class) public void testValidateWrongType() { val.validate(EntityNames.ASSESSMENT, new HashSet<String>(Arrays.asList("Jomolungma"))); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.TEACHER_ID, NeutralCrite...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
@Test public void testSuccessOne() { Entity tsa = this.vth.generateTSA(USER_ID, SECTION_ID, false); Set<String> ids = Collections.singleton(tsa.getEntityId()); Assert.assertTrue(val.validate(CORRECT_ENTITY_TYPE, ids).equals(ids)); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.TEACHER_ID, NeutralCrite...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
@Test public void testSuccessMulti() { Set<String> ids = new HashSet<String>(); for (int i = 0; i < 100; i++) { ids.add(this.vth.generateTSA(USER_ID, SECTION_ID, false).getEntityId()); } Assert.assertTrue(val.validate(CORRECT_ENTITY_TYPE, ids).equals(ids)); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.TEACHER_ID, NeutralCrite...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
@Test public void testWrongId() { Set<String> ids = Collections.singleton("Hammerhands"); Assert.assertFalse(val.validate(CORRECT_ENTITY_TYPE, ids).equals(ids)); ids = Collections.singleton("Nagas"); Assert.assertFalse(val.validate(CORRECT_ENTITY_TYPE,ids).equals(ids)); ids = Collections.singleton("Phantom Warriors"); ...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.TEACHER_ID, NeutralCrite...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
@Test public void testHeterogenousList() { Set<String> ids = new HashSet<String>(Arrays .asList(this.vth.generateTSA(USER_ID, SECTION_ID, false).getEntityId(), this.vth.generateTSA("Ssss'ra", "Arcanus", false).getEntityId(), this.vth.generateTSA("Kali", "Arcanus", false).getEntityId())); Assert.assertFalse(val.validate...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.TEACHER_ID, NeutralCrite...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
TeacherToTeacherSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SECTION_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery nq = n...
@Test public void testCanValidationStaff() throws Exception { assertTrue(validator.canValidate(EntityNames.ASSESSMENT, true)); assertFalse(validator.canValidate(EntityNames.ASSESSMENT, false)); assertTrue(validator.canValidate(EntityNames.LEARNING_OBJECTIVE, true)); assertFalse(validator.canValidate(EntityNames.LEARNIN...
@Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(Str...
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(Str...
@Test public void testCanValidationTeacher() throws Exception { injector.setEducatorContext(); assertTrue(validator.canValidate(EntityNames.ASSESSMENT, true)); assertFalse(validator.canValidate(EntityNames.ASSESSMENT, false)); assertTrue(validator.canValidate(EntityNames.LEARNING_OBJECTIVE, true)); assertFalse(validato...
@Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } }
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(Str...
GlobalEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTransitive && isGlobalWrite(entityType) && !isStudentOrParent(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(Str...
@Test public void testDisableDeltaMode() throws Exception { Map<String, String> batchProperties = new HashMap<String, String>(); batchProperties.put(AttributeType.DUPLICATE_DETECTION.getName(), RecordHash.RECORD_HASH_MODE_DISABLE); Mockito.when(job.getBatchProperties()).thenReturn(batchProperties); Exchange exchange = ...
@Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > 0) { Metrics metrics = Metrics.newInstance(records.get(0).getSourceFile()); a...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
@Test public void testValidateSingleAssessment() throws Exception { HashSet<String> assessmentIds = new HashSet<String>(); assessmentIds.add(helper.generateAssessment().getEntityId()); assertTrue(validator.validate(EntityNames.ASSESSMENT, assessmentIds).containsAll(assessmentIds)); }
@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; ...
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; ...
@Test public void testValidateMultipleAssessments() throws Exception { HashSet<String> assessmentIds = new HashSet<String>(); assessmentIds.add(helper.generateAssessment().getEntityId()); assessmentIds.add(helper.generateAssessment().getEntityId()); assessmentIds.add(helper.generateAssessment().getEntityId()); assertTr...
@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; ...
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; ...
@Test public void testValidateSingleLearningObjective() throws Exception { HashSet<String> learningObjectiveIds = new HashSet<String>(); learningObjectiveIds.add(helper.generateLearningObjective().getEntityId()); assertTrue(validator.validate(EntityNames.LEARNING_OBJECTIVE, learningObjectiveIds).containsAll(learningObj...
@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; ...
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; ...
@Test public void testValidateMultipleLearningObjectives() throws Exception { HashSet<String> learningObjectiveIds = new HashSet<String>(); learningObjectiveIds.add(helper.generateLearningObjective().getEntityId()); learningObjectiveIds.add(helper.generateLearningObjective().getEntityId()); learningObjectiveIds.add(hel...
@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; ...
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; ...
@Test public void testValidateSingleLearningStandard() throws Exception { HashSet<String> learningStandardIds = new HashSet<String>(); learningStandardIds.add(helper.generateLearningStandard().getEntityId()); assertTrue(validator.validate(EntityNames.LEARNING_STANDARD, learningStandardIds).containsAll(learningStandardI...
@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; ...
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; ...
@Test public void testValidateMultipleLearningStandards() throws Exception { HashSet<String> learningStandardIds = new HashSet<String>(); learningStandardIds.add(helper.generateLearningStandard().getEntityId()); learningStandardIds.add(helper.generateLearningStandard().getEntityId()); learningStandardIds.add(helper.gen...
@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; ...
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; ...
@Test public void testValidateSingleCompetencyLevelDescriptor() throws Exception { HashSet<String> competencyLevelDescriptorIds = new HashSet<String>(); competencyLevelDescriptorIds.add(helper.generateCompetencyLevelDescriptor().getEntityId()); assertTrue(validator.validate(EntityNames.COMPETENCY_LEVEL_DESCRIPTOR, comp...
@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; ...
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; ...
@Test public void testValidateMultipleCompetencyLevelDescriptors() throws Exception { HashSet<String> competencyLevelDescriptorIds = new HashSet<String>(); competencyLevelDescriptorIds.add(helper.generateCompetencyLevelDescriptor().getEntityId()); competencyLevelDescriptorIds.add(helper.generateCompetencyLevelDescripto...
@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; ...
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; ...
@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; ...
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; ...
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STAFF_ED_ORG_ASSOCIATION, true)); assertFalse(validator.canValidate(EntityNames.STAFF_ED_ORG_ASSOCIATION, false)); assertFalse(validator.canValidate(EntityNames.ATTENDANCE, false)); assertFalse(validator.canValidate(EntityNames.ATTENDANC...
@Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && isTransitive; }
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && isTransitive; } }
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && isTransitive; } }
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && isTransitive; } @Override boolean canValidate(String entityType, boolean ...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && isTransitive; } @Override boolean canValidate(String entityType, boolean ...
@Test public void testPrevIngested() throws Exception{ DidSchemaParser didSchemaParser = Mockito.mock(DidSchemaParser.class); Mockito.when(dIdResolver.getDidSchemaParser()).thenReturn(didSchemaParser); Map<String, List<DidNaturalKey>> naturalKeys = new HashMap<String, List<DidNaturalKey>>(); naturalKeys.put("student", ...
@Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > 0) { Metrics metrics = Metrics.newInstance(records.get(0).getSourceFile()); a...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
@Test public void testCanValidateNonExpiredAssociation() { helper.generateStaffEdorg(helper.STAFF_ID, helper.ED_ORG_ID, false); Entity assoc = helper.generateStaffEdorg("staff2", helper.ED_ORG_ID, false); edOrgAssociationIds.add(assoc.getEntityId()); assertTrue(validator.validate(EntityNames.STAFF_ED_ORG_ASSOCIATION, e...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> requiredEdOrgsToSEOAs = new HashMap<String, Set<String>>(); { Iterable<Entit...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
@Test public void testInvalidateExpiredAssociation() { helper.generateStaffEdorg(helper.STAFF_ID, helper.ED_ORG_ID, true); Entity assoc = helper.generateStaffEdorg("staff2", helper.ED_ORG_ID, false); edOrgAssociationIds.add(assoc.getEntityId()); assertFalse(validator.validate(EntityNames.STAFF_ED_ORG_ASSOCIATION, edOrg...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> requiredEdOrgsToSEOAs = new HashMap<String, Set<String>>(); { Iterable<Entit...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
TransitiveTeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF_ED_ORG_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<...
@Test public void testCanValidateStaffToTeacher() throws Exception { setupCurrentUser(staff1); setupCommonTSAs(); assertTrue(validator.canValidate(EntityNames.TEACHER, true)); assertTrue(validator.canValidate(EntityNames.TEACHER, false)); }
@Override public boolean canValidate(String entityType, boolean through) { return EntityNames.TEACHER.equals(entityType) && isStaff(); }
StaffToTeacherValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.TEACHER.equals(entityType) && isStaff(); } }
StaffToTeacherValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.TEACHER.equals(entityType) && isStaff(); } }
StaffToTeacherValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.TEACHER.equals(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Set<St...
StaffToTeacherValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.TEACHER.equals(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Set<St...
@Test public void testInvalidTeacherAssociation() { setupCurrentUser(staff1); setupCommonTSAs(); Set<String> teacher = new HashSet<String>(Arrays.asList(teacher2.getEntityId())); assertTrue(validator.validate(EntityNames.TEACHER, teacher).isEmpty()); }
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testValidAndInvalidTeacherAssociation() { setupCurrentUser(staff1); setupCommonTSAs(); Set<String> teachers = new HashSet<String>(Arrays.asList(teacher1.getEntityId(), teacher2.getEntityId())); assertTrue(validator.validate(EntityNames.TEACHER, teachers).equals(new HashSet<String>(Arrays.asList(teache...
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testValidAssociationThroughSchool() { setupCurrentUser(staff2); setupCommonTSAs(); Set<String> teachers = new HashSet<String>(Arrays.asList(teacher1.getEntityId(), teacher3.getEntityId())); assertTrue(validator.validate(EntityNames.TEACHER, teachers).equals(teachers)); }
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testValidAssociationThroughLEA() { setupCurrentUser(staff1); setupCommonTSAs(); Set<String> teachers = new HashSet<String>(Arrays.asList(teacher1.getEntityId(), teacher3.getEntityId())); assertTrue(validator.validate(EntityNames.TEACHER, teachers).equals(teachers)); }
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testInvalidTeacher() { setupCurrentUser(staff1); setupCommonTSAs(); Set<String> teachers = new HashSet<String>(Arrays.asList(UUID.randomUUID().toString())); assertFalse(validator.validate(EntityNames.TEACHER, teachers).equals(teachers)); }
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testExpiredTeacher() { setupCurrentUser(staff1); helper.generateStaffEdorg(teacher1.getEntityId(), school1.getEntityId(), true); Set<String> teacher = new HashSet<String>(Arrays.asList(teacher1.getEntityId())); assertFalse(validator.validate(EntityNames.TEACHER, teacher).equals(teacher)); helper.gener...
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testNoTeacher() { setupCurrentUser(staff1); assertTrue(validator.validate(EntityNames.TEACHER, new HashSet<String>()).isEmpty()); }
@Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutr...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
StaffToTeacherValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> teacherIds) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER, entityName, teacherIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(ne...
@Test public void testNotPrevIngested() throws Exception{ NeutralRecord nr = createNeutralRecord("student"); List<NeutralRecord> neutralRecords = new ArrayList<NeutralRecord>(); neutralRecords.add(nr); DidSchemaParser didSchemaParser = Mockito.mock(DidSchemaParser.class); Mockito.when(dIdResolver.getDidSchemaParser())....
@Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > 0) { Metrics metrics = Metrics.newInstance(records.get(0).getSourceFile()); a...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
DeltaProcessor extends IngestionProcessor<NeutralRecordWorkNote, Resource> { @Override public void process(Exchange exchange, ProcessorArgs<NeutralRecordWorkNote> args) { List<NeutralRecord> filteredRecords = null; List<NeutralRecord> records = args.workNote.getNeutralRecords(); if (records != null && records.size() > ...
@Test public void testCanValidateTeacherToStaff() throws Exception { assertTrue(validator.canValidate(EntityNames.STAFF, true)); assertFalse(validator.canValidate(EntityNames.STAFF, false)); }
@Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isTeacher(); }
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isTeacher(); } }
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isTeacher(); } }
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean transitive); @Override Set<String> vali...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean transitive); @Override Set<String> vali...
@Test public void testInvalidTeacherStaffAssociation() { Set<String> ids = new HashSet<String>(Arrays.asList(staff1.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testValidTeacherStaffAssociationNoEndDate() { Set<String> ids = new HashSet<String>(Arrays.asList(staff2.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testValidTeacherStaffAssociationWithEndDate() { Set<String> ids = new HashSet<String>(Arrays.asList(staff3.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testExpiredTeacherStaffAssociation() { Set<String> ids = new HashSet<String>(Arrays.asList(staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testStaffWithNoEdorgAssociation() { Set<String> ids = new HashSet<String>(Arrays.asList(staff2.getEntityId(), staff5.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testMulti1() { Set<String> ids = new HashSet<String>(Arrays.asList(staff1.getEntityId(), staff2.getEntityId(), staff3.getEntityId(), staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testMulti2() { Set<String> ids = new HashSet<String>(Arrays.asList(staff1.getEntityId(), staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testMulti3() { Set<String> ids = new HashSet<String>(Arrays.asList(staff2.getEntityId(), staff3.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, ids).equals(ids)); }
@Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuery(new NeutralCriteria("staffReference", NeutralCriteria.CRITERIA_IN, ...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
TransitiveTeacherToStaffValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } NeutralQuery basicQuery = new NeutralQuer...
@Test public void testValidStudentParentAssociation() { Set<String> ids = new HashSet<String>(); for (Entity e : studentParentAssociationList) { String s = e.getEntityId(); ids.add(s); } boolean valid = validator.validate(EntityNames.STUDENT_PARENT_ASSOCIATION, ids).containsAll(ids); Assert.assertTrue(valid); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } Entity entity = SecurityUtil.getSLIPrincipal().getEn...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
@Test public void testProcess() throws Exception { List<ResourceEntry> mockedResourceEntries = createFakeResourceEntries(); List<Stage> mockedStages = createFakeStages(); Map<String, String> mockedProperties = createFakeBatchProperties(); NewBatchJob mockedJob = new NewBatchJob(BATCHJOBID, "192.168.59.11", "finished", ...
@Override public void process(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); if (workNote == null || workNote.getBatchJobId() == null) { missingBatchJobIdError(exchange); } else { processJobReporting(exchange, workNote); } }
JobReportingProcessor implements Processor { @Override public void process(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); if (workNote == null || workNote.getBatchJobId() == null) { missingBatchJobIdError(exchange); } else { processJobReporting(exchange, workNote); } } }
JobReportingProcessor implements Processor { @Override public void process(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); if (workNote == null || workNote.getBatchJobId() == null) { missingBatchJobIdError(exchange); } else { processJobReporting(exchange, workNote); } } }
JobReportingProcessor implements Processor { @Override public void process(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); if (workNote == null || workNote.getBatchJobId() == null) { missingBatchJobIdError(exchange); } else { processJobReporting(exchange, workNote); } } @Override voi...
JobReportingProcessor implements Processor { @Override public void process(Exchange exchange) { WorkNote workNote = exchange.getIn().getBody(WorkNote.class); if (workNote == null || workNote.getBatchJobId() == null) { missingBatchJobIdError(exchange); } else { processJobReporting(exchange, workNote); } } @Override voi...
@Test public void testOneInvalidStudentParentAssociation() { Set<String> ids = new HashSet<String>(); for (Entity e : studentParentAssociationList) { String s = e.getEntityId(); ids.add(s); } ids.add("invalidID"); boolean valid = validator.validate(EntityNames.STUDENT_PARENT_ASSOCIATION, ids).containsAll(ids); Assert.a...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } Entity entity = SecurityUtil.getSLIPrincipal().getEn...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
@Test public void testEmptyStudentParentAssociation() { Set<String> ids = new HashSet<String>(); ids.add("invalidID"); boolean valid = validator.validate(EntityNames.STUDENT_PARENT_ASSOCIATION, ids).containsAll(ids); Assert.assertTrue(!valid); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } Entity entity = SecurityUtil.getSLIPrincipal().getEn...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
StudentToStudentParentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { Set<String> validIds = new HashSet<String>(); if (!areParametersValid(EntityNames.STUDENT_PARENT_ASSOCIATION, entityType, ids)) { return ...
@Test public void testFilterClassPeriodDataFromLEA() { setupStaff(staffLea, lea.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(classPeriodLea.getEntityId(), classPeriodSchoolLea.getEntityId())); Set<String> actual = validator.validate(EntityNames.CLASS_PERIOD, classPeriodIds); Assert.assert...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery query = new NeutralQuery(new Neu...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
@Test public void testFilterClassPeriodDataFromSchool() { setupStaff(staffSchoolLea, schoolParentLea.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(classPeriodSchoolLea.getEntityId())); Set<String> actual = validator.validate(EntityNames.CLASS_PERIOD, classPeriodIds); Assert.assertEquals(ex...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery query = new NeutralQuery(new Neu...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
@Test public void testFilterClassPeriodDataFromSchool2() { setupStaff(staffSchoolNoParent, schoolNoParent.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(classPeriodSchoolNoParent.getEntityId())); Set<String> actual = validator.validate(EntityNames.CLASS_PERIOD, classPeriodIds); Assert.asser...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery query = new NeutralQuery(new Neu...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
GenericToGlobalClassPeriodWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.CLASS_PERIOD, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgD...
@Test public void testCanValidate() { setupCurrentUser(teacher1); Assert.assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, false)); Assert.assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, true)); injector.setStaffContext(); SecurityUtil.setUserContext(SecurityUtil.UserCont...
@Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_COHORT_ASSOCIATION.equals(entityType) && isTeacher(); }
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_COHORT_ASSOCIATION.equals(entityType) && isTeacher(); } }
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_COHORT_ASSOCIATION.equals(entityType) && isTeacher(); } }
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_COHORT_ASSOCIATION.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Overr...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_COHORT_ASSOCIATION.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Overr...
@Test public void testValidAccessTeacher1() { setupCurrentUser(teacher1); Set<String> ids = new HashSet<String>(Arrays.asList(studentCohortAssoc1.getEntityId())); Assert.assertTrue(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, ids).equals(ids)); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.C...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
@Test public void testValidAccessTeacher2() { setupCurrentUser(teacher2); Set<String> ids = new HashSet<String>(Arrays.asList(studentCohortAssoc2.getEntityId())); Assert.assertTrue(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, ids).equals(ids)); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.C...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
@Test public void testInvalidAccessTeacher1() { setupCurrentUser(teacher1); Set<String> ids = new HashSet<String>(Arrays.asList(studentCohortAssoc2.getEntityId())); Assert.assertFalse(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, ids).equals(ids)); ids = new HashSet<String>(Arrays.asList(studentCohortAssoc...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.C...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
@Test public void testInvalidAccessTeacher2() { setupCurrentUser(teacher2); Set<String> ids = new HashSet<String>(Arrays.asList(studentCohortAssoc1.getEntityId())); Assert.assertFalse(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, ids).equals(ids)); ids = new HashSet<String>(Arrays.asList(studentCohortAssoc...
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.C...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
@Test public void testValidLz() throws Exception { File validLzPathFile = new File("/test/lz/inbound/TEST-LZ/testFile.zip"); String validLzPathname = validLzPathFile.getParent(); List<String> testLzPaths = new ArrayList<String>(); testLzPaths.add(validLzPathname); when(mockedTenantDA.getLzPaths()).thenReturn(testLzPath...
@Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(LZ_STAGE, LZ_STAGE_DESC); String batchJobId = null; ReportStats reportStats = new SimpleReportStats(); NewBatchJob currentJob = null; File lzFile = exchange.getIn().getHeader("filePath", File.class); boolean hasE...
LandingZoneProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(LZ_STAGE, LZ_STAGE_DESC); String batchJobId = null; ReportStats reportStats = new SimpleReportStats(); NewBatchJob currentJob = null; File lzFile = exchange.getIn().get...
LandingZoneProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(LZ_STAGE, LZ_STAGE_DESC); String batchJobId = null; ReportStats reportStats = new SimpleReportStats(); NewBatchJob currentJob = null; File lzFile = exchange.getIn().get...
LandingZoneProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(LZ_STAGE, LZ_STAGE_DESC); String batchJobId = null; ReportStats reportStats = new SimpleReportStats(); NewBatchJob currentJob = null; File lzFile = exchange.getIn().get...
LandingZoneProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { Stage stage = Stage.createAndStartStage(LZ_STAGE, LZ_STAGE_DESC); String batchJobId = null; ReportStats reportStats = new SimpleReportStats(); NewBatchJob currentJob = null; File lzFile = exchange.getIn().get...
@Test public void testMulti() { setupCurrentUser(teacher2); Set<String> ids = new HashSet<String>(Arrays.asList(studentCohortAssoc2.getEntityId(), studentCohortAssoc1.getEntityId())); Assert.assertFalse(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, ids).equals(ids)); }
@Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.C...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
TeacherToStudentCohortAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COHORT_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = ...
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.DISCIPLINE_ACTION, true)); assertTrue(validator.canValidate(EntityNames.DISCIPLINE_ACTION, false)); assertTrue(validator.canValidate(EntityNames.DISCIPLINE_INCIDENT, true)); assertTrue(validator.canValidate(EntityNames.DISCIPLINE_INCIDEN...
@Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && (STUDENT_DENIED_ENTITIES.contains(entityType) || (isTransitive && EntityNames.isPublic(entityType)) || (!isTransitive && NON_TRANSITIVE_DENY_ALL .contains(entityType))); }
StudentDenyAllValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && (STUDENT_DENIED_ENTITIES.contains(entityType) || (isTransitive && EntityNames.isPublic(entityType)) || (!isTransitive && NON_TRANSITIVE_DENY_ALL .conta...
StudentDenyAllValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && (STUDENT_DENIED_ENTITIES.contains(entityType) || (isTransitive && EntityNames.isPublic(entityType)) || (!isTransitive && NON_TRANSITIVE_DENY_ALL .conta...
StudentDenyAllValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && (STUDENT_DENIED_ENTITIES.contains(entityType) || (isTransitive && EntityNames.isPublic(entityType)) || (!isTransitive && NON_TRANSITIVE_DENY_ALL .conta...
StudentDenyAllValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && (STUDENT_DENIED_ENTITIES.contains(entityType) || (isTransitive && EntityNames.isPublic(entityType)) || (!isTransitive && NON_TRANSITIVE_DENY_ALL .conta...