Package org.jitterbit.integration.data.entity

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


    private IntegrationEntityMapLookup loadEntities(EnumMap<EntityType, ProjectStructurePersistor.Node> roots)
                                                                        throws InterchangeLoadingException {
        IntegrationEntityMapLookup lookup = new IntegrationEntityMapLookup();
        EntityTypeConfig metaData = EntityTypeConfig.getInstance();
        for (Map.Entry<EntityType, ProjectStructurePersistor.Node> e : roots.entrySet()) {
            EntityType type = e.getKey();
            if (metaData.isEntityTypeSupported(type)) {
                EntityTypeHandler h = new EntityTypeHandler(type, e.getValue(), lookup);
                h.load();
            }
        }
View Full Code Here


            });
        }
    }

    private MultiTreeSection getSectionFor(IntegrationEntity e) {
        EntityType type = EntityUtils.getItemType(e);
        if (type.isWizardType() && connectTree != null) {
            return connectTree;
        }
        return nonConnectTrees.get(type);
    }
View Full Code Here

        @Override
        protected Integer doInBackground() throws Exception {
            boolean hasLock = IntegrationProjectLock.acquireWithin(5, TimeUnit.SECONDS);
            if (hasLock) {
                try {
                    EntityType sourceType = sourceFolder.getItemType();
                    FolderStructureDuplicator duplicator = new FolderStructureDuplicator(project, sourceType);
                    duplicator.duplicateTo(destinationTypes);
                    int newFolders = duplicator.getNumberOfNewFolders();
                    duplicator.save(persistor);
                    return newFolders;
View Full Code Here

        EnumSet<EntityType> types = EnumSet.noneOf(EntityType.class);
        for (IntegrationEntity e : items) {
            if (e instanceof IntegrationProject) {
                continue;
            }
            EntityType type = EntityUtils.getItemType(e);
            types.add(type);
        }
        return types;
    }
View Full Code Here

            handleDeletedItem(parser, localName);
        }
    }

    private void handleDeletedItem(KongaSaxParser parser, String nodeName) throws KongaSaxParserException {
        EntityType type = null;
        try {
            type = EntityType.valueOf(nodeName);
        } catch (IllegalArgumentException e) {
            throw new KongaSaxParserException("Invalid EntityType: " + nodeName); //$NON-NLS-1$
        }
        try {
            String idStringRep = parser.getCurrentAttributes().getValue(XmlConstants.Attributes.ID);
            marker.markAsDeleted(type, type.getIntegrationId(idStringRep));
            loader.logDetail("Marked as deleted: " + type + " [" + idStringRep + "]");
        } catch (IllegalArgumentException e) {
            throw new KongaSaxParserException("Invalid ID: " //$NON-NLS-1$
                            + parser.getCurrentAttributes().getValue(XmlConstants.Attributes.ID));
        }
View Full Code Here

    public static EnumMap<EntityType, Node> load(Persistor media, Set<ProjectLoadingIssue> issues) {
        EnumMap<EntityType, Node> roots = Maps.newEnumMap(EntityType.class);
        for (Persistor typeRoot : media.getChildren(ENTITY_TYPE)) {
            Node root = new Node(null, null, null);
            String typeName = typeRoot.getString(NAME);
            EntityType type = null;
            try {
                type = EntityType.valueOf(typeName);
            } catch (Exception ex) {
                // Unknown item type. This can happen when loading a project that was created in a
                // later version of Jitterbit in which new item types were added. Sometimes such a
View Full Code Here

        EntityRoot root = getEntityRoot(entity);
        return root.getResource(name);
    }

    private EntityRoot getEntityRoot(IntegrationEntity entity) {
        EntityType type = entity.getEntityType();
        synchronized (lock) {
            Map<IntegrationEntity, EntityRoot> typeRoot = getTypeRoot(type);
            EntityRoot root = typeRoot.get(entity);
            if (root == null) {
                root = new EntityRoot(entity, getEntityLocation(entity));
View Full Code Here

            this.typesToShow = typesToShow.clone();
        }

        @Override
        public boolean apply(KongaTreeNode node) {
            EntityType toTest = null;
            if (node instanceof FolderNode) {
                toTest = ((FolderNode) node).getUserObject().getItemType();
            } else if (node instanceof IntegrationEntityTreeNode) {
                toTest = ((IntegrationEntityTreeNode) node).getUserObject().getEntityType();
            }
View Full Code Here

    boolean accept(IntegrationEntity entity) {
        if (entity == null) {
            return false;
        }
        EntityType type = entity.getEntityType();
        boolean correctType = (type == entityType) || (type == entityType.getSystemType());
        return correctType && (filter == null || filter.apply(entity));
    }
View Full Code Here

    }

    private void addSystemEntities(IntegrationProject project,
                                   List<IntegrationEntity> entities,
                                   EntityType type) {
        EntityType systemType = type.getSystemType();
        if (systemType != null) {
            RootFolder rootFolder = project.getRootFolder(systemType);
            if (rootFolder != null) {
                addItemsToList(rootFolder, entities, type);
            }
View Full Code Here

TOP

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

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.