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 testValidate() { Assert.assertEquals(Collections.emptySet(), validator.validate(null, null)); Assert.assertEquals(Collections.emptySet(), validator.validate(new String(), new HashSet<String>())); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { return Collections.emptySet(); } | StudentDenyAllValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { return Collections.emptySet(); } } | StudentDenyAllValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { return Collections.emptySet(); } } | StudentDenyAllValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { return Collections.emptySet(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, ... | StudentDenyAllValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { return Collections.emptySet(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> validate(String entityType, ... |
@Test public void testCanValidate() { Assert.assertTrue(validator.canValidate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, false)); Assert.assertTrue(validator.canValidate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, true)); } | @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_PROGRAM_ASSOCIATION.equals(entityType) && isTeacher(); } | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_PROGRAM_ASSOCIATION.equals(entityType) && isTeacher(); } } | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_PROGRAM_ASSOCIATION.equals(entityType) && isTeacher(); } } | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_PROGRAM_ASSOCIATION.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Ove... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STUDENT_PROGRAM_ASSOCIATION.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Ove... |
@Test public void testValidAccessTeacher() { Set<String> ids = new HashSet<String>(Arrays.asList(studentProgramAssoc1.getEntityId())); Assert.assertTrue(validator.validate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, ids).equals(ids)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... |
@Test public void testInvalidAccessTeacher1() { Set<String> ids = new HashSet<String>(Arrays.asList(studentProgramAssoc2.getEntityId())); Assert.assertFalse(validator.validate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, ids).equals(ids)); ids = new HashSet<String>(Arrays.asList(studentProgramAssoc3.getEntityId())); Assert... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query = new NeutralQuery( new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... | TeacherToStudentProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_PROGRAM_ASSOCIATION, entityType, ids)) { return Collections.EMPTY_SET; } NeutralQuery query ... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.DISCIPLINE_INCIDENT, true)); assertTrue(validator.canValidate(EntityNames.DISCIPLINE_INCIDENT, false)); assertFalse(validator.canValidate(EntityNames.ATTENDANCE, false)); } | @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.DISCIPLINE_INCIDENT.equals(entityType); } | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.DISCIPLINE_INCIDENT.equals(entityType); } } | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.DISCIPLINE_INCIDENT.equals(entityType); } } | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.DISCIPLINE_INCIDENT.equals(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<Strin... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isTeacher() && EntityNames.DISCIPLINE_INCIDENT.equals(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<Strin... |
@Test public void testValidIncident() { Set<String> ids = list(disciplineIncident1.getEntityId()); assertTrue(validator.validate(EntityNames.DISCIPLINE_INCIDENT, ids).equals(ids)); ids = list(disciplineIncident2.getEntityId()); assertTrue(validator.validate(EntityNames.DISCIPLINE_INCIDENT, ids).equals(ids)); ids = list... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new HashSet<String>(ids); String myself = SecurityUtil.getSLIPrincipal().get... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... |
@Test public void testInvalidIncident() { Set<String> ids = list(disciplineIncident3.getEntityId()); assertFalse(validator.validate(EntityNames.DISCIPLINE_INCIDENT, ids).equals(ids)); ids = list(disciplineIncident3.getEntityId(), disciplineIncident1.getEntityId()); assertFalse(validator.validate(EntityNames.DISCIPLINE_... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new HashSet<String>(ids); String myself = SecurityUtil.getSLIPrincipal().get... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... | TeacherToDisciplineIncidentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.DISCIPLINE_INCIDENT, entityType, ids)) { return Collections.EMPTY_SET; } Set<String> discIncidentIds = new ... |
@Test public void testCanValidateStaffToReportCard() { assertTrue(validator.canValidate(EntityNames.REPORT_CARD, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testInvalidLz() 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(testLzPa... | @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 testCanValidateStaffToAttendance() throws Exception { assertTrue(validator.canValidate(EntityNames.ATTENDANCE, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToDisciplineAction() throws Exception { assertTrue(validator.canValidate(EntityNames.DISCIPLINE_ACTION, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentAcademicRecord() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_ACADEMIC_RECORD, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentAssessment() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_ASSESSMENT, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentDisciplineIncident() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_DISCIPLINE_INCIDENT_ASSOCIATION, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentGradebookEntry() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_GRADEBOOK_ENTRY, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentParentAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_PARENT_ASSOCIATION, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentSchoolAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_SCHOOL_ASSOCIATION, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanValidateStaffToStudentSectionAssociation() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_SECTION_ASSOCIATION, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testCanNotValidateOtherEntities() throws Exception { assertFalse(validator.canValidate(EntityNames.STUDENT, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } } | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudent(entityType); } @Override boolean canValidate(String entityType, boolean through); @SuppressWarnings("unchecked") @Override Set<String> ... |
@Test public void testNonZipFileInLz() throws Exception { File unzippedLzPathFile = new File("/test/lz/inbound/TEST-LZ/testFile.ctl"); String validLzPathname = unzippedLzPathFile.getParent(); List<String> testLzPaths = new ArrayList<String>(); testLzPaths.add(validLzPathname); when(mockedTenantDA.getLzPaths()).thenRetu... | @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 testCanGetAccessToReportCard() { Set<String> studentIds = new HashSet<String>(); Set<String> reportCards = new HashSet<String>(); Map<String, Object> reportCard1 = buildReportCard("student123"); Entity reportCardEntity = new MongoEntity("reportCard", reportCard1); reportCards.add(reportCardEntity.getE... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanGetAccessToAttendance() throws Exception { Set<String> studentIds = new HashSet<String>(); Set<String> attendances = new HashSet<String>(); Map<String, Object> attendance1 = buildAttendanceForStudent("student123", "school123"); Entity attendanceEntity1 = new MongoEntity("attendance", attendance... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanNotGetAccessToAttendance() throws Exception { Set<String> attendances = new HashSet<String>(); Map<String, Object> attendance1 = buildAttendanceForStudent("student123", "school123"); Entity attendanceEntity1 = new MongoEntity("attendance", attendance1); attendances.add(attendanceEntity1.getEnti... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanGetAccessToCurrentStudentSchoolAssociation() throws Exception { Map<String, Object> goodStudentSchoolAssociation = buildStudentSchoolAssociation("student123", "school123", new DateTime().plusHours(1)); Entity association = new MongoEntity(EntityNames.STUDENT_SCHOOL_ASSOCIATION, goodStudentSchoo... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanGetAccessToStudentSchoolAssociationWithoutExitWithdrawDate() throws Exception { Map<String, Object> goodStudentSchoolAssociation = buildStudentSchoolAssociation("student123", "school123"); Entity association = new MongoEntity(EntityNames.STUDENT_SCHOOL_ASSOCIATION, goodStudentSchoolAssociation)... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testDeniedAccessToExpiredStudentSchoolAssociation() throws Exception { Map<String, Object> badStudentSchoolAssociation = buildStudentSchoolAssociation("student123", "school123", new DateTime().minusDays(1)); Entity association = new MongoEntity(EntityNames.STUDENT_SCHOOL_ASSOCIATION, badStudentSchoolA... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanGetAccessToCurrentStudentSectionAssociation() throws Exception { Map<String, Object> goodStudentSectionAssociation = buildStudentSectionAssociation("student123", "section123", new DateTime().plusDays(1)); Entity association = new MongoEntity(EntityNames.STUDENT_SECTION_ASSOCIATION, goodStudentS... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanGetAccessToStudentSectionAssociationWithoutEndDate() throws Exception { Map<String, Object> goodStudentSectionAssociation = buildStudentSectionAssociation("student123", "section123"); Entity association = new MongoEntity(EntityNames.STUDENT_SECTION_ASSOCIATION, goodStudentSectionAssociation); M... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testDeniedAccessToExpiredStudentSectionAssociation() throws Exception { Map<String, Object> badStudentSectionAssociation = buildStudentSchoolAssociation("student123", "section123", new DateTime().minusDays(1)); Entity association = new MongoEntity(EntityNames.STUDENT_SECTION_ASSOCIATION, badStudentSec... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> students = new HashMap<String, Set<String>>(); NeutralQuer... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... | StaffToSubStudentEntityValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STUDENT_COMPETENCY, true)); assertTrue(validator.canValidate(EntityNames.STUDENT_COMPETENCY, false)); assertFalse(validator.canValidate(EntityNames.GRADEBOOK_ENTRY, true)); assertFalse(validator.canValidate(EntityNames.PROGRAM, false)); ... | @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_COMPETENCY.equals(entityType); } | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_COMPETENCY.equals(entityType); } } | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_COMPETENCY.equals(entityType); } } | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_COMPETENCY.equals(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_COMPETENCY.equals(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set... |
@Test public void shouldAcceptExchangeObjectReadExchangeControlFileAndSetExchangeBatchJob() throws Exception { Exchange preObject = new DefaultExchange(new DefaultCamelContext()); WorkNote workNote = Mockito.mock(WorkNote.class); String batchJobId = NewBatchJob.createId("InterchangeStudentCsv.ctl"); NewBatchJob mockedJ... | @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); } | ControlFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); } } | ControlFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); } } | ControlFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); } @Override void process(Exchange exchange); } | ControlFileProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); MongoTrackingAspect.aspectOf().reset(); } @Override void process(Exchange exchange); static final BatchJobStageType BATCH_JOB_STAGE; } |
@Test public void testSingleValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(competency1.getEntityId())); assertTrue(validator.validate(EntityNames.STUDENT_COMPETENCY, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = getIdsContainedInFieldOnEntities(entityType, new ArrayList<String>( ids... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... |
@Test public void testNegativeHeterogeneousValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(competency1.getEntityId(),competency2.getEntityId())); assertFalse(validator.validate(EntityNames.STUDENT_COMPETENCY, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = getIdsContainedInFieldOnEntities(entityType, new ArrayList<String>( ids... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... | StudentToStudentCompetencyValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_COMPETENCY, entityType, ids)) { return Collections.emptySet(); } Map<String, Set<String>> ssaToSC = ... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STAFF_ED_ORG_ASSOCIATION, false)); assertFalse(validator.canValidate(EntityNames.STAFF_ED_ORG_ASSOCIATION, true)); 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; } | TeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && !isTransitive; } } | TeacherToStaffEdOrgAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return EntityNames.STAFF_ED_ORG_ASSOCIATION.equals(entityType) && isTeacher() && !isTransitive; } } | TeacherToStaffEdOrgAssociationValidator 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 isTransit... | TeacherToStaffEdOrgAssociationValidator 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 isTransit... |
@Test public void testCanValidateNonExpiredAssociation() { Set<String> edOrgAssociationIds = new HashSet<String>(); Entity assoc = helper.generateStaffEdorg(helper.STAFF_ID, helper.ED_ORG_ID, false); edOrgAssociationIds.add(assoc.getEntityId()); assertTrue(validator.validate(EntityNames.STAFF_ED_ORG_ASSOCIATION, edOrgA... | @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; } NeutralQuery query = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutral... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... |
@Test public void testInvalidateExpiredAssociation() { Set<String> edOrgAssociationIds = new HashSet<String>(); Entity assoc = helper.generateStaffEdorg(helper.STAFF_ID, helper.ED_ORG_ID, true); edOrgAssociationIds.add(assoc.getEntityId()); assertFalse(validator.validate(EntityNames.STAFF_ED_ORG_ASSOCIATION, edOrgAssoc... | @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; } NeutralQuery query = new NeutralQuery(new NeutralCriteria(ParameterConstants.STAFF_REFERENCE, Neutral... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... | TeacherToStaffEdOrgAssociationValidator 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; } NeutralQuery query = new N... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STUDENT_SECTION_ASSOCIATION, false)); assertFalse(validator.canValidate(EntityNames.STUDENT_SECTION_ASSOCIATION, true)); assertFalse(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, true)); assertFalse(validator.canValidate(... | @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_SECTION_ASSOCIATION.equals(entityType) && !isTransitive; } | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_SECTION_ASSOCIATION.equals(entityType) && !isTransitive; } } | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_SECTION_ASSOCIATION.equals(entityType) && !isTransitive; } } | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_SECTION_ASSOCIATION.equals(entityType) && !isTransitive; } @Override boolean canValidate(String entityType, bo... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudentOrParent() && EntityNames.STUDENT_SECTION_ASSOCIATION.equals(entityType) && !isTransitive; } @Override boolean canValidate(String entityType, bo... |
@Test public void testPositiveValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(assoc1Current.getEntityId(), assoc1Past.getEntityId())); assertTrue(validator.validate(EntityNames.STUDENT_SECTION_ASSOCIATION, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... |
@Test public void testHeterogeneousValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(assoc1Current.getEntityId(), assoc2.getEntityId())); assertFalse(validator.validate(EntityNames.STUDENT_SECTION_ASSOCIATION, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... | StudentToStudentSectionAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT_SECTION_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery query... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, false)); assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, true)); assertTrue(validator.canValidate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, false)); assertTrue(validator.canValidate(Ent... | @Override public boolean canValidate(String entityType, boolean isTransitive) { return STUDENT_ASSOCIATIONS.contains(entityType) && isStaff(); } | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return STUDENT_ASSOCIATIONS.contains(entityType) && isStaff(); } } | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return STUDENT_ASSOCIATIONS.contains(entityType) && isStaff(); } } | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return STUDENT_ASSOCIATIONS.contains(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<Strin... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return STUDENT_ASSOCIATIONS.contains(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<Strin... |
@Test public void testCanValidateValidCohortAssociation() { Mockito.when(mockStudentValidator.validate(Mockito.eq(EntityNames.STUDENT), Mockito.any(Set.class))) .thenReturn(new HashSet<String>(Arrays.asList("Boop"))); for (int i = 0; i < 10; ++i) { cohortIds.add(helper.generateStudentCohort("Boop", "" + i, false).getEn... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associations = new HashMap<String, Set<String>>(); NeutralQuery basicQuery = new NeutralQuer... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... |
@Test public void shouldAddNewLz() throws Exception { List<String> testLzPaths = new ArrayList<String>(); testLzPaths.add("."); when(mockedTenantDA.getLzPaths()).thenReturn(testLzPaths); Exchange exchange = new DefaultExchange(new DefaultCamelContext()); tenantProcessor.process(exchange); assertEquals("Header on exchan... | @Override public void process(Exchange exchange) throws Exception { try { createNewLandingZones(); exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_SUCCESS); doPreloads(); } catch (Exception e) { exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_FAILURE); LOG.error("Exception encountered adding tenan... | TenantProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { try { createNewLandingZones(); exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_SUCCESS); doPreloads(); } catch (Exception e) { exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_FAILURE); LOG.er... | TenantProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { try { createNewLandingZones(); exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_SUCCESS); doPreloads(); } catch (Exception e) { exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_FAILURE); LOG.er... | TenantProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { try { createNewLandingZones(); exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_SUCCESS); doPreloads(); } catch (Exception e) { exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_FAILURE); LOG.er... | TenantProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { try { createNewLandingZones(); exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_SUCCESS); doPreloads(); } catch (Exception e) { exchange.getIn().setHeader(TENANT_POLL_HEADER, TENANT_POLL_FAILURE); LOG.er... |
@Test(expected = MissingConfigException.class) public void missingLocalDir() throws ParseException, MissingConfigException { String[] args = new String[] { "-u", "user", "-pass", "password", "-s", "server", "-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 testCanValidateValidProgramAssociation() { Mockito.when(mockStudentValidator.validate(Mockito.eq(EntityNames.STUDENT), Mockito.any(Set.class))) .thenReturn(new HashSet<String>(Arrays.asList("Boop"))); for (int i = 0; i < 10; ++i) { programIds.add(helper.generateStudentProgram("Boop", "" + i, false).ge... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associations = new HashMap<String, Set<String>>(); NeutralQuery basicQuery = new NeutralQuer... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... |
@Test public void testCanNotValidExpiredAssociation() { Mockito.when(mockStudentValidator.validate(Mockito.eq(EntityNames.STUDENT), Mockito.any(Set.class))) .thenReturn(new HashSet<String>(Arrays.asList("Boop"))); cohortIds.add(helper.generateStudentCohort("Boop", "Beep", true).getEntityId()); assertFalse(validator.val... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associations = new HashMap<String, Set<String>>(); NeutralQuery basicQuery = new NeutralQuer... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... |
@Test public void testCanNotValidateAssociationWithoutStudentAccess() { Mockito.when(mockStudentValidator.validate(Mockito.eq(EntityNames.STUDENT), Mockito.any(Set.class))) .thenReturn(new HashSet<String>(Arrays.asList("dummy"))); for (int i = 0; i < 10; ++i) { cohortIds.add(helper.generateStudentCohort("Boop", "" + i,... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associations = new HashMap<String, Set<String>>(); NeutralQuery basicQuery = new NeutralQuer... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... | StaffToStudentCohortProgramAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> associati... |
@Test public void testCanValidateTeacherToStaff() throws Exception { setupCurrentUser(staff1); assertTrue(validator.canValidate(EntityNames.STAFF, true)); assertFalse(validator.canValidate(EntityNames.STAFF, false)); assertFalse(validator.canValidate(EntityNames.SECTION, false)); assertFalse(validator.canValidate(Entit... | @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } | TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } } | TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } } | TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean transitive); @SuppressWarnings("unchecked")... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean transitive) { return transitive && EntityNames.STAFF.equals(entityType) && isStaff(); } @Override boolean canValidate(String entityType, boolean transitive); @SuppressWarnings("unchecked")... |
@Test public void testValidStaffStaffAssociationNoEndDate() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff2.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); assertTrue(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); ... | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testValidStaffStaffAssociationWithEndDate() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff3.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testExpiredStaffStaffAssociation() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testStaffWithNoEdorgAssociation() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff2.getEntityId(), staff5.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testSchoolStaffToLEAStaffAssociation() { setupCurrentUser(staff2); Set<String> staffId = new HashSet<String>(Arrays.asList(staff1.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testMulti1() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff1.getEntityId(), staff2.getEntityId(), staff3.getEntityId(), staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testPreLoad() { File landingZone = Files.createTempDir(); try { assertTrue(tenantProcessor.preLoad(landingZone.getAbsolutePath(), Arrays.asList("small"))); assertTrue(landingZone.list(new WildcardFileFilter("preload-*.zip")).length == 1); } finally { landingZone.delete(); } } | boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolute path {}", landingZone, landingZoneDi... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... |
@Test public void testMulti2() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff1.getEntityId(), staff4.getEntityId())); assertFalse(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@Test public void testMulti3() { setupCurrentUser(staff1); Set<String> staffId = new HashSet<String>(Arrays.asList(staff2.getEntityId(), staff3.getEntityId())); assertTrue(validator.validate(EntityNames.STAFF, staffId).equals(staffId)); } | @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> validIds = new HashSet<String>(); NeutralQuery basicQuery = new Neu... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... | TransitiveStaffToStaffValidator extends AbstractContextValidator { @SuppressWarnings("unchecked") @Override public Set<String> validate(String entityName, Set<String> staffIds) throws IllegalStateException { if (!areParametersValid(EntityNames.STAFF, entityName, staffIds)) { return Collections.EMPTY_SET; } Set<String> ... |
@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_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.CRIT... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... |
@Test public void testSuccessOne() { this.vth.generateTeacherSchool(USER_ID, SCHOOL_ID); Entity tsa = this.vth.generateTeacherSchool("Heru-er", SCHOOL_ID); Assert.assertTrue(val.validate(CORRECT_ENTITY_TYPE, Collections.singleton(tsa.getEntityId())).contains(tsa.getEntityId())); tsa = this.vth.generateTeacherSchool("Iz... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.CRIT... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... |
@Test public void testSuccessMulti() { this.vth.generateTeacherSchool(USER_ID, SCHOOL_ID); Set<String> ids = new HashSet<String>(); for (int i = 0; i < 100; i++) { ids.add(this.vth.generateTeacherSchool("Thor" + i, SCHOOL_ID).getEntityId()); } Assert.assertTrue(val.validate(CORRECT_ENTITY_TYPE, ids).containsAll(ids)); ... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.CRIT... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... |
@Test public void testWrongId() { Set<String> idsToValidate = Collections.singleton("Hammerhands"); Assert.assertFalse(val.validate(CORRECT_ENTITY_TYPE, idsToValidate).containsAll(idsToValidate)); idsToValidate = Collections.singleton("Nagas"); Assert.assertFalse(val.validate(CORRECT_ENTITY_TYPE, idsToValidate).contain... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.CRIT... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... |
@Test public void testHeterogenousList() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(this.vth.generateTeacherSchool(USER_ID, SCHOOL_ID).getEntityId(), this.vth.generateTeacherSchool("Ssss'ra", "Arcanus").getEntityId(), this.vth.generateTeacherSchool("Kali", "Arcanus") .getEntityId())); Assert.assert... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQuery nq = new NeutralQuery(new NeutralCriteria(ParameterConstants.ID, NeutralCriteria.CRIT... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... | TransitiveTeacherToTeacherSchoolAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.TEACHER_SCHOOL_ASSOCIATION, entityType, ids)) { return Collections.emptySet(); } NeutralQue... |
@Test public void testFilterbellScheduleDataFromLEA() { setupStaff(staffLea, lea.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(bellScheduleLea.getEntityId(), bellScheduleSchoolLea.getEntityId())); Set<String> actual = validator.validate(EntityNames.BELL_SCHEDULE, bellScheduleIds); Assert.a... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery classPeriodsQuery = new Neutral... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... |
@Test public void testFilterClassPeriodDataFromSchool() { setupStaff(staffSchoolLea, schoolParentLea.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(bellScheduleSchoolLea.getEntityId())); Set<String> actual = validator.validate(EntityNames.BELL_SCHEDULE, bellScheduleIds); Assert.assertEquals... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery classPeriodsQuery = new Neutral... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... |
@Test public void testFilterClassPeriodDataFromSchool2() { setupStaff(staffSchoolNoParent, schoolNoParent.getEntityId()); Set<String> expectedIds = new HashSet<String>(Arrays.asList(bellScheduleSchoolNoParent.getEntityId())); Set<String> actual = validator.validate(EntityNames.BELL_SCHEDULE, bellScheduleIds); Assert.as... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdorgDescendents(getDirectEdorgs()); NeutralQuery classPeriodsQuery = new Neutral... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... | GenericToGlobalBellScheduleWriteValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.BELL_SCHEDULE, entityType, ids)) { return Collections.emptySet(); } Set<String> edOrgLineage = getEdor... |
@Test public void testPreLoadBadDataSet() { File landingZone = Files.createTempDir(); try { assertTrue(!tenantProcessor.preLoad(landingZone.getAbsolutePath(), Arrays.asList("smallish"))); } finally { landingZone.delete(); } } | boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolute path {}", landingZone, landingZoneDi... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... | TenantProcessor implements Processor { boolean preLoad(String landingZone, List<String> dataSets) { File landingZoneDir = new File(landingZone); if (!landingZoneDir.exists()) { try { FileUtils.forceMkdir(landingZoneDir); } catch (IOException e) { LOG.error("TenantProcessor: Failed to create landing zone: {} with absolu... |
@Test public void testCanValidateTeacherToStudent() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Se... |
@Test public void testCanNotValidateOtherEntities() throws Exception { assertFalse(validator.canValidate(EntityNames.ATTENDANCE, false)); } | @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } } | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return EntityNames.STUDENT.equals(entityType) && isTeacher(); } @Override boolean canValidate(String entityType, boolean through); @Override Set<String> validate(String entityName, Se... |
@Test public void testCanGetAccessThroughSingleValidStudent() throws Exception { helper.generateTSA(TEACHER_ID, "3", false); helper.generateSSA("2", "3", false); studentIds.add("2"); Assert.assertEquals(validator.validate(EntityNames.STUDENT, studentIds), studentIds); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughInvalidStudent() throws Exception { helper.generateTSA(TEACHER_ID, "-1", false); helper.generateSSA("2", "3", false); studentIds.add("2"); Assert.assertFalse(validator.validate(EntityNames.STUDENT, studentIds).containsAll(studentIds)); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanGetAccessThroughManyStudents() throws Exception { for (int i = 0; i < 100; ++i) { helper.generateTSA(TEACHER_ID, "" + i, false); } for (int i = 0; i < 100; ++i) { for (int j = -1; j > -31; --j) { helper.generateSSA(String.valueOf(j), "" + i, false); studentIds.add(String.valueOf(j)); } } Assert... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCantGetAccessThroughManyStudents() throws Exception { for (int i = 0; i < 2; ++i) { helper.generateTSA(TEACHER_ID, String.valueOf(i), false); } for (int i = 0; i < 2; ++i) { for (int j = -1; j > -2; --j) { helper.generateSSA(String.valueOf(j), String.valueOf(i), false); studentIds.add(String.value... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanGetAccessThroughStudentsWithManySections() throws Exception { helper.generateTSA(TEACHER_ID, "0", false); for (int i = 0; i < 10; ++i) { helper.generateSSA("2", String.valueOf(i), false); studentIds.add("2"); } Assert.assertEquals(validator.validate(EntityNames.STUDENT, studentIds).size(), stud... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughManyStudents() throws Exception { for (int i = 100; i < 200; ++i) { helper.generateTSA(TEACHER_ID, "" + i, false); } for (int i = 0; i < 100; ++i) { for (int j = -1; j > -31; --j) { helper.generateSSA("" + j, "" + i, false); studentIds.add("" + j); } } assertFalse(validator.v... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughManyStudentsWithOneFailure() throws Exception { for (int i = 0; i < 100; ++i) { helper.generateTSA(TEACHER_ID, "" + i, false); } for (int i = 0; i < 100; ++i) { for (int j = -1; j > -31; --j) { helper.generateSSA("" + j, "" + i, false); studentIds.add("" + j); } } helper.gene... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test @Ignore public void testCanGetAccessThroughValidCohort() throws Exception { helper.generateTeacherSchool(TEACHER_ID, ED_ORG_ID); String cohortId = helper.generateCohort(ED_ORG_ID).getEntityId(); helper.generateStaffCohort(TEACHER_ID, cohortId, false, true); for (int i = 0; i < 10; ++i) { helper.generateStudentCoh... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testProcess() throws Exception { init(); Exchange exchange = createFileEntryExchange(); Resource xsd = Mockito.mock(Resource.class); Map<String, Resource> xsdList = new HashMap<String, Resource>(); FileEntryWorkNote workNote = (FileEntryWorkNote) exchange.getIn().getMandatoryBody(WorkNote.class); xsdL... | @Override protected void process(Exchange exchange, ProcessorArgs<FileEntryWorkNote> args) { prepareState(exchange, args.workNote); Source source = new FileSource(args.workNote.getFileEntry().getResourceId()); Metrics metrics = Metrics.newInstance(args.workNote.getFileEntry().getResourceId()); InputStream input = null;... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override protected void process(Exchange exchange, ProcessorArgs<FileEntryWorkNote> args) { prepareState(exchange, args.workNote); Source source = new FileSource(args.workNote.getFileEntry().getReso... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override protected void process(Exchange exchange, ProcessorArgs<FileEntryWorkNote> args) { prepareState(exchange, args.workNote); Source source = new FileSource(args.workNote.getFileEntry().getReso... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override protected void process(Exchange exchange, ProcessorArgs<FileEntryWorkNote> args) { prepareState(exchange, args.workNote); Source source = new FileSource(args.workNote.getFileEntry().getReso... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override protected void process(Exchange exchange, ProcessorArgs<FileEntryWorkNote> args) { prepareState(exchange, args.workNote); Source source = new FileSource(args.workNote.getFileEntry().getReso... |
@Test public void testCanNotGetAccessThroughExpiredCohort() throws Exception { assertTrue(validator.validate(EntityNames.STUDENT, studentIds).isEmpty()); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughDeniedCohort() throws Exception { helper.generateTeacherSchool(TEACHER_ID, ED_ORG_ID); String cohortId = helper.generateCohort(ED_ORG_ID).getEntityId(); helper.generateStaffCohort(TEACHER_ID, cohortId, false, false); for (int i = 0; i < 10; ++i) { helper.generateStudentCohort... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughInvalidCohort() throws Exception { helper.generateTeacherSchool(TEACHER_ID, ED_ORG_ID); String cohortId = helper.generateCohort(ED_ORG_ID).getEntityId(); helper.generateStaffCohort(TEACHER_ID, cohortId, false, true); for (int i = 0; i < 10; ++i) { helper.generateStudentCohort... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test @Ignore public void testCanNotGetAccessThroughCohortOutsideOfEdorg() throws Exception { helper.generateTeacherSchool(TEACHER_ID, ED_ORG_ID); String cohortId = helper.generateCohort("122").getEntityId(); helper.generateStaffCohort(TEACHER_ID, cohortId, false, true); for (int i = 0; i < 10; ++i) { helper.generateSt... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCohortAccessIntersectionRules() throws Exception { assertTrue(validator.validate(EntityNames.STUDENT, studentIds).isEmpty()); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanGetAccessThroughValidProgram() throws Exception { String edOrgId = helper.generateEdorgWithProgram(Arrays.asList(programId)).getEntityId(); helper.generateTeacherSchool(TEACHER_ID, edOrgId); helper.generateStaffProgram(TEACHER_ID, programId, false, true); for (int i = 0; i < 10; ++i) { helper.g... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanAccessStudentsThoughSectionAndProgramAssociations() throws Exception { String studentId1 = "STUDENT11"; String studentId2 = "STUDENT22"; helper.generateTSA(TEACHER_ID, SECTION_ID, false); helper.generateSSA(studentId1, SECTION_ID, false); studentIds.add(studentId1); String edOrgId = helper.gene... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughExpiredProgram() throws Exception { assertTrue(validator.validate(EntityNames.STUDENT, studentIds).isEmpty()); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughDeniedProgram() throws Exception { String edOrgId = helper.generateEdorgWithProgram(Arrays.asList(programId)).getEntityId(); helper.generateTeacherSchool(TEACHER_ID, edOrgId); helper.generateStaffProgram(TEACHER_ID, programId, false, false); for (int i = 0; i < 10; ++i) { hel... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanNotGetAccessThroughWithOneDeniedProgram() throws Exception { String edOrgId = helper.generateEdorgWithProgram(Arrays.asList(programId)).getEntityId(); helper.generateTeacherSchool(TEACHER_ID, edOrgId); helper.generateStaffProgram(TEACHER_ID, programId, false, true); for (int i = 0; i < 10; ++i)... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testVisitAndSend() throws Exception { init(); Exchange exchange = createFileEntryExchange(); processor.setUpState(exchange, exchange.getIn().getBody(FileEntryWorkNote.class)); RecordMetaImpl meta = new RecordMetaImpl("student", "student"); Location loc = Mockito.mock(Location.class); Mockito.when(loc.... | @Override public void visit(RecordMeta recordMeta, Map<String, Object> record) { state.get().addToBatch(recordMeta, record, typeProvider, helper); if (state.get().getDataBatch().size() >= batchSize) { sendDataBatch(); } } | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override public void visit(RecordMeta recordMeta, Map<String, Object> record) { state.get().addToBatch(recordMeta, record, typeProvider, helper); if (state.get().getDataBatch().size() >= batchSize) ... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override public void visit(RecordMeta recordMeta, Map<String, Object> record) { state.get().addToBatch(recordMeta, record, typeProvider, helper); if (state.get().getDataBatch().size() >= batchSize) ... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override public void visit(RecordMeta recordMeta, Map<String, Object> record) { state.get().addToBatch(recordMeta, record, typeProvider, helper); if (state.get().getDataBatch().size() >= batchSize) ... | EdFiParserProcessor extends IngestionProcessor<FileEntryWorkNote, IngestionFileEntry> implements
RecordVisitor { @Override public void visit(RecordMeta recordMeta, Map<String, Object> record) { state.get().addToBatch(recordMeta, record, typeProvider, helper); if (state.get().getDataBatch().size() >= batchSize) ... |
@Test public void testCanNotGetAccessThroughInvalidProgram() throws Exception { String edOrgId = helper.generateEdorgWithProgram(Arrays.asList(programId)).getEntityId(); helper.generateTeacherSchool(TEACHER_ID, edOrgId); helper.generateStaffProgram(TEACHER_ID, programId, false, true); for (int i = 0; i < 10; ++i) { hel... | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testProgramAccessIntersectionRules() throws Exception { assertTrue(validator.validate(EntityNames.STUDENT, studentIds).isEmpty()); } | @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Set<String> validIds = new HashSet<String>(); Set<String> valid... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... | TeacherToStudentValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityName, Set<String> ids) throws IllegalStateException { if (!areParametersValid(EntityNames.STUDENT, entityName, ids)) { return Collections.emptySet(); } Set<String> idsToValidate = new HashSet<String>(ids); Se... |
@Test public void testCanValidateStaffToGrade() throws Exception { assertTrue(validator.canValidate(EntityNames.GRADE, false)); assertTrue(validator.canValidate(EntityNames.GRADE, true)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... |
@Test public void testCanValidateStaffToStudentCompetency() throws Exception { assertTrue(validator.canValidate(EntityNames.STUDENT_COMPETENCY, false)); assertTrue(validator.canValidate(EntityNames.STUDENT_COMPETENCY, true)); } | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... |
@Test public void testDeniedStaffToOtherEntity() throws Exception { assertFalse(validator.canValidate(EntityNames.STUDENT, false)); assertFalse(validator.canValidate(EntityNames.STUDENT, true)); assertFalse(validator.canValidate(EntityNames.STUDENT_COMPETENCY_OBJECTIVE, false)); assertFalse(validator.canValidate(Entity... | @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } } | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean through) { return isStaff() && isSubEntityOfStudentSectionAssociation(entityType); } @Override boolean canValidate(String entityType, boolean through); @Override Set<Str... |
@Test public void testCanGetAccessToGrade() throws Exception { Set<String> grades = new HashSet<String>(); Map<String, Object> association = buildStudentSectionAssociation("student123", "section123", DateTime.now() .minusDays(3)); Entity studentSectionAssociation = new MongoEntity(EntityNames.STUDENT_SECTION_ASSOCIATIO... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> studentSectionAssociationIds = getIdsContainedInFieldOnEntities(entityType, new A... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... |
@Test public void testCanNotGetAccessToGrade() throws Exception { Set<String> grades = new HashSet<String>(); Map<String, Object> association = buildStudentSectionAssociation("student123", "section123", DateTime.now() .minusDays(3)); Entity studentSectionAssociation = new MongoEntity(EntityNames.STUDENT_SECTION_ASSOCIA... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> studentSectionAssociationIds = getIdsContainedInFieldOnEntities(entityType, new A... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... |
@Test public void testCanNotGetAccessToGradeDueToGradeLookup() throws Exception { Set<String> grades = new HashSet<String>(); Map<String, Object> association = buildStudentSectionAssociation("student123", "section123", DateTime.now() .minusDays(3)); Entity studentSectionAssociation = new MongoEntity(EntityNames.STUDENT... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> studentSectionAssociationIds = getIdsContainedInFieldOnEntities(entityType, new A... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... |
@Test public void testCanNotGetAccessToGradeDueToStudentSectionAssociationLookup() throws Exception { Set<String> grades = new HashSet<String>(); Map<String, Object> association = buildStudentSectionAssociation("student123", "section123", DateTime.now() .minusDays(3)); Entity studentSectionAssociation = new MongoEntity... | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<String>> studentSectionAssociationIds = getIdsContainedInFieldOnEntities(entityType, new A... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... | StaffToSubStudentSectionAssociationEntityValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(SUB_ENTITIES_OF_STUDENT_SECTION, entityType, ids)) { return Collections.EMPTY_SET; } Map<String, Set<Stri... |
@Test public void testCanValidate() { assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, true)); assertTrue(validator.canValidate(EntityNames.STUDENT_COHORT_ASSOCIATION, false)); assertTrue(validator.canValidate(EntityNames.STUDENT_PROGRAM_ASSOCIATION, true)); assertTrue(validator.canValidate(Enti... | @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudent() && STUDENT_ASSOCIATIONS.contains(entityType); } | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudent() && STUDENT_ASSOCIATIONS.contains(entityType); } } | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudent() && STUDENT_ASSOCIATIONS.contains(entityType); } } | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudent() && STUDENT_ASSOCIATIONS.contains(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> valida... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public boolean canValidate(String entityType, boolean isTransitive) { return isStudent() && STUDENT_ASSOCIATIONS.contains(entityType); } @Override boolean canValidate(String entityType, boolean isTransitive); @Override Set<String> valida... |
@Test public void testProcess() throws Exception { List<Stage> mockedStages = createFakeStages(); Map<String, String> mockedProperties = createFakeBatchProperties(); File testZip = IngestionTest.getFile("ctl_tmp/test.zip"); NewBatchJob job = new NewBatchJob(BATCHJOBID, testZip.getAbsolutePath(), "finished", 29, mockedP... | @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); } | ControlFilePreProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); } } | ControlFilePreProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); } } | ControlFilePreProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); } @Override void process(Exchange exchange); Set<String> getShardCollections(); void setShardCollections(Set<String> shardCollections); void setBatchJobDAO(BatchJobDAO b... | ControlFilePreProcessor implements Processor { @Override public void process(Exchange exchange) throws Exception { processUsingNewBatchJob(exchange); } @Override void process(Exchange exchange); Set<String> getShardCollections(); void setShardCollections(Set<String> shardCollections); void setBatchJobDAO(BatchJobDAO b... |
@Test public void testPositiveValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(assoc1Current.getEntityId(), assoc1Past.getEntityId())); assertTrue(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<String>(); Set<String> toValidateIds = new HashSet<String>(ids); Entity se... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... |
@Test public void testHeterogeneousValidate() { Set<String> idsToValidate = new HashSet<String>(Arrays.asList(assoc1Current.getEntityId(), assoc2.getEntityId())); assertFalse(validator.validate(EntityNames.STUDENT_COHORT_ASSOCIATION, idsToValidate).containsAll(idsToValidate)); } | @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<String>(); Set<String> toValidateIds = new HashSet<String>(ids); Entity se... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... | StudentToStudentAssociationValidator extends AbstractContextValidator { @Override public Set<String> validate(String entityType, Set<String> ids) throws IllegalStateException { if (!areParametersValid(STUDENT_ASSOCIATIONS, entityType, ids)) { return Collections.emptySet(); } Set<String> otherStudentIds = new HashSet<St... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.