Package org.jitterbit.integration.data.entity

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


        return lookup;
    }

    private void addRootFolders() {
        for (EntityType type : getRootFolderTypes()) {
            RootFolder folder = new RootFolder(type.getPlural(), type);
            addRootFolder(folder);
        }
    }
View Full Code Here


        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

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

            }
        }

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

        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

        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

        @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

    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

        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

        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

TOP

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

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.