Package org.jitterbit.integration.data.entity

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


     *            the <code>KongaTreeNode</code> to which the created fragment will be attached.
     * @param type
     *            the <code>EntityType</code> to include in the fragment.
     */
    public void createFragment(KongaTreeNode parent, EntityType type) {
        RootFolder rf = project.getRootFolder(type);
        createFolderContent(parent, rf);
    }
View Full Code Here


        private void updateUi(boolean refresh) {
            if (projectViewer == null) {
                return;
            }
            for (EntityType type : destinationTypes) {
                RootFolder rf = project.getRootFolder(type);
                if (refresh) {
                    projectViewer.refresh(rf);
                }
                projectViewer.expand(rf);
            }
View Full Code Here

            this.lookup = lookup;
            files = Sets.newHashSet();
        }

        public void load() throws InterchangeLoadingException {
            RootFolder rf = project.getRootFolder(type);
            loadEntities(root, rf);
            cleanupOldFiles();
        }
View Full Code Here

public class FolderFactory implements IntegrationEntityFactory {

    @Override
    public void createEntity(Folder parent, IntegrationEntityFactoryCallback callback) {
        try {
            RootFolder rf = parent.getRootFolder();
            if (rf != null) {
                Folder folder = new Folder("", rf.getItemType());
                folder.setName(EntityFactoryUtils.getNewEntityName(folder, parent));
                callback.creationSucceeded(folder, parent);
            } else {
                callback.creationFailed(new IntegrationEntityFactoryException(
                                "Unknown root folder for the parent " + parent));
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

    }

    private void addEntities(IntegrationProject project,
                             List<IntegrationEntity> entities,
                             EntityType type) {
        RootFolder rootFolder = project.getRootFolder(type);
        if (rootFolder == null) {
            // This should never happen
            throw new RuntimeException("Failed to find the root folder for the type " + type);
        }
        addItemsToList(rootFolder, entities, type);
View Full Code Here

        public void updateState(PopupMenuSite site, List<?> objects) {
            rootFolder = null;
            if (objects.size() == 1) {
                Object o = objects.get(0);
                if (o instanceof RootFolder) {
                    RootFolder rf = (RootFolder) o;
                    if (isApplicable(rf)) {
                        rootFolder = rf;
                    }
                }
            }
View Full Code Here

        }
    }

    private KongaTreeNode findConnectRoot(EntityType type) {
        assert type != null : "The filter that accepts only Connect Wizard operations is broken.";
        RootFolder rootFolder = project.getRootFolder(type);
        // Note that we cannot iterate through the model, but must iterate over
        // the nodes directly. This is to ensure that the operation is inserted
        // even if the model has a KongaTreeFilter that filters out the parent
        // (perhaps temporarily).
        KongaTreeNode root = treeModel.getRoot();
View Full Code Here

        @Override
        public void updateState(PopupMenuSite site, List<?> objects) {
            super.updateState(site, objects);
            if ((objects.size() == 1) && (objects.get(0) instanceof RootFolder)) {
                setVisible(true);
                RootFolder folder = (RootFolder) objects.get(0);
                setEnabled(folder.getNumberOfChildren() > 0);
            } else {
                setVisible(false);
                setEnabled(false);
            }
        }
View Full Code Here

    public final void execute(String[] params) throws CommandException {
        IntegrationProject project = view.getProject();
        if (project == null) {
            throw new CommandException("No project is open.");
        }
        RootFolder root = null;
        if (params.length == 1) {
            root = project.getRootFolder(getType(params[0]));
        }
        execute(view.getContentViewer(), root);
    }
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.