Package org.jitterbit.integration.data.entity

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


        return tooltip;
    }

    private String getToolTipWhenActive() {
        OperationWrapperNode opNode = getNode();
        Schedule schedule = opNode.getDataObject().getSchedule();
        return schedule != null ? ToolTipStringFactory.getToolTip(schedule) : null;
    }
View Full Code Here


    String serverKey = clientServerKeyMappings.get(Schedule.SCHEDULE_ID).getServerKeyName();
    ScheduleId id = getScheduleId(serverKeyValues.getString(serverKey));
   
    serverKey = clientServerKeyMappings.get(Schedule.SCHEDULE_NAME).getServerKeyName();
    String name = serverKeyValues.getString(serverKey);
    Schedule schedule = new Schedule(id, name);

    Map<String, ServerPropertyKey> serverClientKeyMappings = ClientServerDeployKeyMappings.getServerClientKeyMappings(EntityType.Schedule);
    for( String key : serverKeyValues.getKeys() ) {
      ServerPropertyKey propKey = serverClientKeyMappings.get(key);
      if ( propKey != null ) {
        String clientKey = propKey.getClientKeyName();
        schedule.setStringProperty(clientKey, serverKeyValues.get(key));
      }
    }
    return schedule;
  }
View Full Code Here

    private String getScheduleString(Operation op) {
        ScheduleId scheduleId = op.getScheduleId();
        if (scheduleId != null) {
            IntegrationProject project = ProjectUtils.getProject(op);
            if (project != null) {
                Schedule schedule = project.getItemLookup().getEntity(scheduleId, Schedule.class);
                if (schedule != null) {
                    return schedule.getName();
                }
            }
            return "Yes";
        }
        return "No";
View Full Code Here

    @Test
    public void ensureIsValidTypeWorksForItems() {
        IntegrationEntity operation = new Operation("Test");
        assertTrue(isValidType(operation));
        IntegrationEntity schedule = new Schedule("Test");
        assertFalse(isValidType(schedule));
    }
View Full Code Here

*/
public class ProjectUtilsJUnitTest {

    @Test
    public void testGetProject() {
        Schedule schedule = new Schedule("S");
        assertNull(ProjectUtils.getProject(schedule));
        IntegrationProject project = IntegrationProject.createNewProject("Test");
        project.insertEntity(schedule, project.getRootFolder(EntityType.Schedule));
        assertSame(project, ProjectUtils.getProject(schedule));
    }
View Full Code Here

    }
   
    @Test
    public void testGetAllEntities() {
        RootFolder schedules = project.getRootFolder(EntityType.Schedule);
        Schedule s1 = new Schedule("s1");
        schedules.addItem(s1);
        Schedule s2 = new Schedule("s2");
        schedules.addItem(s2);
        Folder f1 = new Folder("F1", EntityType.Schedule);
        Schedule s3 = new Schedule("s3");
        f1.addItem(s3);
        schedules.addSubFolder(f1);
        Folder f2 = new Folder("F2", EntityType.Schedule);
        Schedule s4 = new Schedule("s4");
        f2.addItem(s4);
        schedules.addSubFolder(f2);
        EmailMessage email = new EmailMessage();
        project.getRootFolder(EntityType.EmailMessage).addItem(email);
        assertEquals(Sets.newHashSet(s1, s2, s3, s4),
View Full Code Here

    }
   
    @Test
    public void testMarkAsDeployDirty() {
        RootFolder schedules = project.getRootFolder(EntityType.Schedule);
        Schedule s1 = new Schedule("s1");
        project.insertEntity(s1, schedules);
        Folder folder = new Folder("Folder", EntityType.Schedule);
        Schedule s2 = new Schedule("s2");
        folder.addItem(s2);
        project.insertEntity(folder, schedules);
        EmailMessage email = new EmailMessage();
        project.insertEntity(email, project.getRootFolder(EntityType.EmailMessage));
        s1.setDeployDirty(false);
        s2.setDeployDirty(false);
        email.setDeployDirty(false);
        folder.setDeployDirty(false);
        project.markAsDeployDirty();
        for (IntegrationEntity e : Arrays.asList(s1, s2, folder, email)) {
            assertTrue(e.isDeployDirty());
View Full Code Here

    }
   
    @Test
    public void testRefreshItemLookup() {
        RootFolder schedules = project.getRootFolder(EntityType.Schedule);
        Schedule s1 = new Schedule("s1");
        schedules.addItem(s1);
        Folder folder = new Folder("Folder", EntityType.Schedule);
        Schedule s2 = new Schedule("s2");
        folder.addItem(s2);
        schedules.addSubFolder(folder);
        EmailMessage email = new EmailMessage();
        project.getRootFolder(EntityType.EmailMessage).addItem(email);
        project.refreshItemLookup();
View Full Code Here

    }

    @Test
    public void ensureDeployDirtyItemDetectionWorks() {
        RootFolder schedules = project.getRootFolder(EntityType.Schedule);
        Schedule s1 = new Schedule("s1");
        project.insertEntity(s1, schedules);
        Folder folder = new Folder("Folder", EntityType.Schedule);
        Schedule s2 = new Schedule("s2");
        folder.addItem(s2);
        project.insertEntity(folder, schedules);
        EmailMessage email = new EmailMessage();
        project.insertEntity(email, project.getRootFolder(EntityType.EmailMessage));
        markAsDeployClean(s1);
View Full Code Here

        e.setDeployed(true);
    }
   
    @Test
    public void ensureInsertingItemWorks() {
        Schedule s1 = new Schedule("s1");
        project.insertEntityUnderRoot(s1);
        assertSame(project.getRootFolder(EntityType.Schedule), s1.getParent());
        Folder f1 = new Folder("f1", EntityType.Schedule);
        project.insertEntityUnderRoot(f1);
        assertSame(project.getRootFolder(EntityType.Schedule), f1.getParent());
        Schedule s2 = new Schedule("s2");
        project.insertEntity(s2, f1);
        assertSame(f1, s2.getParent());
        assertEquals(Sets.newHashSet(s1, s2, f1), Sets.newHashSet(project.getAllEntities()));
    }
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.