Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.Schedule


    public static void main(String[] args) {
        new ScheduleDurationPanelTest().run();
    }

    public void run() {
        Schedule schedule = new Schedule("Test Schedule");
        ScheduleDurationPanel panel = new ScheduleDurationPanel(schedule);
        QuickFrame.show(panel.getUi(), "ScheduleDurationPanelTest");
    }
View Full Code Here


    }
   
    private IntegrationProject createOriginalProject() {
        IntegrationProject project = IntegrationProject.createNewProject(null);
        RootFolder schedules = project.getRootFolder(EntityType.Schedule);
        schedule_1 = new Schedule("s1");
        schedule_2 = new Schedule("s2");
        schedules.addItem(schedule_1);
        schedules.addItem(schedule_2);
        scheduleSubFolder_1 = new Folder("F1", EntityType.Schedule);
        schedule_3 = new Schedule("s3");
        scheduleSubFolder_1.addItem(schedule_3);
        schedules.addSubFolder(scheduleSubFolder_1);
        scheduleSubFolder_2 = new Folder("F2", EntityType.Schedule);
        schedule_4 = new Schedule("s4");
        schedule_5 = new Schedule("s5");
        scheduleSubFolder_2.addItem(schedule_4);
        scheduleSubFolder_2.addItem(schedule_5);
        schedules.addSubFolder(scheduleSubFolder_2);
        email_1 = new EmailMessage();
        project.getRootFolder(EntityType.EmailMessage).addItem(email_1);
View Full Code Here

        return project;
    }

    private void checkSchedules(IntegrationProject partial) {
        RootFolder schedules = partial.getRootFolder(EntityType.Schedule);
        Schedule schedule_2_copy = (Schedule) schedules.getDescendant(schedule_2.getID());
        assertEquals(schedule_2, schedule_2_copy);
        assertTrue(schedule_2_copy.getParent() == schedules);
        Folder subFolder_2_copy = (Folder) schedules.getDescendant(scheduleSubFolder_2.getID());
        assertEquals(scheduleSubFolder_2, subFolder_2_copy);
        assertTrue(subFolder_2_copy.getParent() == schedules);
        Schedule schedule_4_copy = (Schedule) schedules.getDescendant(schedule_4.getID());
        assertEquals(schedule_4, schedule_4_copy);
        assertTrue(schedule_4_copy.getParent() == subFolder_2_copy);
        Schedule schedule_3_copy = (Schedule) schedules.getDescendant(schedule_3.getID());
        assertEquals(schedule_3, schedule_3_copy);
        // Since we didn't copy the parent of schedule_3, we expect the corresponding schedule
        // in the partial project to be attached to the RootFolder.
        assertTrue(schedule_3_copy.getParent() == schedules);
        assertEquals(1, schedules.getNumberOfSubFoldersRecursively());
        assertEquals(3, schedules.getNumberOfItemsRecursively());
    }
View Full Code Here

    }
   
    @Override
    public void run() {
        installNameValidator();
        Schedule moved = new Schedule("S");
        Schedule existing = new Schedule("S");
        Folder parent = new Folder("F", EntityType.Schedule);
        parent.addItem(existing);
        DeleteRequestHandler deleter = new DeleteRequestHandler() {
           
            @Override
View Full Code Here

        project = IntegrationProject.createNewProject("Test");
    }
   
    @Test
    public void testEntityAdded() {
        IntegrationEntity schedule = new Schedule("Test Schedule");
        Listener lst = new EntityAddedListener(schedule);
        project.addProjectListener(lst);
        project.insertEntity(schedule, project.getRootFolder(EntityType.Schedule));
        lst.verify();
    }
View Full Code Here

    }

   
    @Test
    public void testDeleteSingleEntity() {
        IntegrationEntity schedule = new Schedule("Test Schedule");
        project.insertEntity(schedule, project.getRootFolder(EntityType.Schedule));
        Listener lst = new SingleEntityDeletedListener(schedule);
        project.addProjectListener(lst);
        project.deleteItems(Arrays.asList(schedule));
        lst.verify();
View Full Code Here

    }

   
    @Test
    public void testDeleteSeveralEntities() {
        IntegrationEntity schedule = new Schedule("Test Schedule");
        project.insertEntity(schedule, project.getRootFolder(EntityType.Schedule));
        IntegrationEntity email = new EmailMessage("Test Schedule");
        project.insertEntity(email, project.getRootFolder(EntityType.EmailMessage));
        Listener lst = new SeveralEntitiesDeletedListener(schedule, email);
        project.addProjectListener(lst);
View Full Code Here

    }

   
    @Test
    public void testReviveSingleEntity() {
        IntegrationEntity schedule = new Schedule("Test Schedule");
        project.insertEntity(schedule, project.getRootFolder(EntityType.Schedule));
        project.deleteItems(Arrays.asList(schedule));
        Listener lst = new SingleEntityRevivedListener(schedule);
        project.addProjectListener(lst);
        project.reviveItems(Arrays.asList(schedule), new EntityRevivorCallback() {
View Full Code Here

   
    @Test
    public void testMoveEntity() {
        Folder folder = new Folder("A", EntityType.Schedule);
        project.insertEntity(folder, project.getRootFolder(EntityType.Schedule));
        IntegrationEntity schedule = new Schedule("Test Schedule");
        project.insertEntity(schedule, folder);
        Listener lst = new EntityMovedListener(schedule);
        project.addProjectListener(lst);
        schedule.setParent(project.getRootFolder(EntityType.Schedule));
        lst.verify();
    }
View Full Code Here

    @Test
    public void testNoConflict() {
        Folder originalParent = new Folder("F1", EntityType.Schedule);
        Folder newParent = new Folder("F2", EntityType.Schedule);
        Schedule schedule = new Schedule("S");
        originalParent.addItem(schedule);
        DefaultEntityMover mover = new DefaultEntityMover();
        mover.setItemsToMove(Arrays.asList(schedule));
        assertTrue(mover.isAllowedTarget(newParent));
        assertEquals(Arrays.asList(schedule), mover.executeMove(newParent));
        assertSame(newParent, schedule.getParent());
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.Schedule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.