Examples of RootFolder


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

        checkArgument(target != from, "target cannot be the same as the source type");
    }

    private void duplicateToImpl(EntityType target) {
        sanityCheck(target);
        RootFolder root = project.getRootFolder(from);
        RootFolder destination = project.getRootFolder(target);
        for (Folder folder : root.getAllSubFolders()) {
            if (folder.isJitterbitConnectFolder()) {
                continue;
            }
            processFolder(folder, destination);
View Full Code Here

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

                        return;
                    }
                    currentEntity = parentClone;
                    currentParent = currentParent.getParent();
                } else {
                    RootFolder rf = getRootFolderForEntity(currentEntity);
                    currentEntity.setParent(rf);
                    return;
                }
            }
        }
View Full Code Here

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

            }
        }

        private RootFolder getRootFolderForEntity(IntegrationEntity e) {
            EntityType type = EntityUtils.getItemType(e);
            RootFolder rf = projectShell.getRootFolder(type);
            return rf;
        }
View Full Code Here

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

        private IntegrationEntity attachToParent() {
            remainingItems.remove(currentParent);
            if (currentParent instanceof RootFolder) {
                EntityType type = EntityUtils.getItemType(currentEntity);
                RootFolder rf = projectShell.getRootFolder(type);
                currentEntity.setParent(rf);
                return null;
            }
            IntegrationEntity parentClone = getParentClone(currentParent);
            currentEntity.setParent(parentClone);
View Full Code Here

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

        IntegrationProjectId projectId = (IntegrationProjectId)EntityType.Project.getIntegrationId(sProjectId);
        project = m_integrationProjectMap.get(projectId);
      }

            if( parentFolderId == null ) {
        RootFolder rootFolder = getRootFolder(entityType, project);
        if ( rootFolder == null ) {
          System.out.println("Failed to find RootFolder for Folder " + folder.getName());
        }
        else
          rootFolder.addSubFolder(folder);
      }
      else {
        Folder parentFolder = m_folderIdFolderMap.get(parentFolderId);
        if ( parentFolder == null )
          orphanFolders.add(new OrphanFolder(folder, parentFolderId));
View Full Code Here

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

        @Override
        public boolean apply(Object o) {
            if (o instanceof KongaTreeNode) {
                KongaTreeNode node = (KongaTreeNode) o;
                if (node.getUserObject() instanceof RootFolder) {
                    RootFolder root = (RootFolder) node.getUserObject();
                    if (root.getItemType() == type) {
                        return true;
                    }
                }
            }
            return false;
View Full Code Here

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

    private static Supplier<List<IntegrationEntity>> toSupplier(final IntegrationProject project, final EntityType type) {
        return new Supplier<List<IntegrationEntity>>() {

            @Override
            public List<IntegrationEntity> get() {
                RootFolder root = project.getRootFolder(type);
                return root.getAllItemsRecursively();
            }
        };
    }
View Full Code Here

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

        project.insertEntity(folder, parent);
        return folder;
    }

    private Folder getConnectRoot(EntityType type, boolean createIfNotExists) {
        RootFolder typeRoot = project.getRootFolder(type);
        String name = JitterbitConnectNames.JITTERBIT_CONNECT;
        Folder connectRoot = typeRoot.findSubFolder(name);
        if (connectRoot == null && createIfNotExists) {
            connectRoot = createAndInsertFolder(type, typeRoot, name);
        }
        return connectRoot;
    }
View Full Code Here

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

        onDone();
    }

    private List<IntegrationEntity> collectEntitiesToTest(IntegrationProject project) {
        List<IntegrationEntity> entities = Lists.newArrayList();
        RootFolder sources = project.getRootFolder(EntityType.Source);
        collectEntitiesToTest(sources, entities);
        RootFolder targets = project.getRootFolder(EntityType.Target);
        collectEntitiesToTest(targets, entities);
        Collections.sort(entities, new EntityTypeAndNameSorter());
        return entities;
    }
View Full Code Here

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

        project = IntegrationProject.createNewProject("Test");
    }
   
    @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),
                        Sets.newHashSet(project.getAllEntitiesOfClass(Schedule.class)));
        assertTrue(project.getAllEntitiesOfClass(Operation.class).isEmpty());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.