Package org.jitterbit.integration.data.entity

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


   
    private static class ToDescriptorImpl implements Function<IntegrationEntity, EntityDescriptor> {

        @Override
        public EntityDescriptor apply(IntegrationEntity e) {
            return new EntityDescriptor(e);
        }
View Full Code Here


        TransformationProcessor processor = new TransformationProcessor(schemaTransformProvider);
        Folder root = dataRoot.subFolder(EntityType.Transformation.name());
        for (Element tf : getEntityElementsOfType(EntityType.Transformation)) {
            String id = tf.getAttribute("entityId");
            String name = tf.getAttribute("name");
            EntityDescriptor descriptor = getTransformationDescriptor(id, name);
            File file = root.getFile(id + ".xml");
            processor.process(file);
            if (processor.wasLastTransformationAffected()) {
                affectedTransformations.add(descriptor);
                deleteJtrFiles(id);
View Full Code Here

            }
        }
    }
   
    private EntityDescriptor getTransformationDescriptor(String id, String name) {
        EntityDescriptor d = new EntityDescriptor(EntityType.Transformation, id);
        d.setName(name);
        return d;
    }
View Full Code Here

        displayOnStartUp = new ArrayList<EntityDescriptor>();
        if (entities == null) {
            return;
        }
        for (IntegrationEntity e : entities) {
            displayOnStartUp.add(new EntityDescriptor(e));
        }
    }
View Full Code Here

     * Sets the integration entity that will be active when the current project is loaded the next
     * time.
     *
     */
    public void setActiveEntityOnStartUp(IntegrationEntity entity) {
        activeOnStartUp = (entity == null) ? null : new EntityDescriptor(entity);
    }
View Full Code Here

    }

    private void processExpandedNodes(ProjectUiState state, ProjectContentViewer contentViewer) {
        List<EntityDescriptor> expandedEntities = Lists.newArrayList();
        for (IntegrationEntity e : contentViewer.getExpandedEntities()) {
            expandedEntities.add(new EntityDescriptor(e));
        }
        state.setExpandedOnStartUp(expandedEntities);
    }
View Full Code Here

            cleanupOldFiles();
        }

        private void loadEntities(ProjectStructurePersistor.Node node, IntegrationEntity parent)
                            throws InterchangeLoadingException {
            EntityDescriptor desc = node.getEntity();
            if (desc != null) { // Will be null for the root node
                String name = node.getName();
                File file = FileSupport.getFile(dataDirectory, desc);
                files.add(file);
                if (file.exists()) {
                    IntegrationEntity entity = createEntityShell(type, desc);
                    loadItemData(parent, file, entity);
                    parent = entity;
                } else {
                    String err = "Could not restore the " + desc.getEntityType() + " \"" + name + "\" [GUID = "
                            + desc.getID() + "] that is referred to in the project file, "
                            + "because the corresponding data file " + file.getAbsolutePath() + " does not exist.";
                    ErrorLog.log(ProjectLoaderImpl.class, err, new Exception(err));
                }
            }
            for (ProjectStructurePersistor.Node child : node.children()) {
View Full Code Here

                                  Persistor parentPersistor) {
        for (Persistor p : parentPersistor.getAllChildren()) {
            String id = p.getString(ENTITY_ID);
            String name = p.getString(NAME);
            if (FOLDER.equals(p.getName())) {
                Node node = new Node(parentNode, new EntityDescriptor(EntityType.Folder, id), name);
                buildTree(type, node, p);
            } else {
                new Node(parentNode, new EntityDescriptor(type, id), name);
            }
        }
    }
View Full Code Here

                Attributes atts = parser.getCurrentAttributes();
                String type = atts.getValue(XmlConstants.Attributes.TYPE);
                String id = atts.getValue(XmlConstants.Attributes.ID);
                boolean isActive = XmlConstants.Values.TRUE.equalsIgnoreCase(
                                atts.getValue(XmlConstants.Attributes.ACTIVE));
                ((ProjectUiSaxParser) parser).addEntityToOpenOnStartUp(new EntityDescriptor(type, id), isActive);
            } catch (IllegalArgumentException e) {
                throw new XmlLoadingException(e);
            } catch (NullPointerException e) {
                throw new XmlLoadingException(e);
            }
View Full Code Here

        if (XmlConstants.Elements.NODE.equals(localName)) {
            try {
                Attributes atts = parser.getCurrentAttributes();
                String type = atts.getValue(XmlConstants.Attributes.TYPE);
                String id = atts.getValue(XmlConstants.Attributes.ID);
                ((ProjectUiSaxParser) parser).addExpandedOnStartUp(new EntityDescriptor(type, id));
            } catch (IllegalArgumentException e) {
                throw new XmlLoadingException(e);
            } catch (NullPointerException e) {
                throw new XmlLoadingException(e);
            }
View Full Code Here

TOP

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

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.