Package org.jitterbit.integration.data.project

Examples of org.jitterbit.integration.data.project.IntegrationProject


                                               ProjectLoadingCancelledException,
                                               InterchangeSavingException,
                                               UnsupportedVersionException {
        IntegrationProjectLock.acquire();
        try {
            IntegrationProject project = loadProject(projectName, projectFolder, issuesHandler);
            project.setDeployable(!readOnly);
            ManagedProjectImpl mp = projects.get(project);
            ProjectUtils.saveProjectFile(project, mp.getProjectFile());
            return project;
        } finally {
            IntegrationProjectLock.release();
View Full Code Here


    public DeepCopyResult clone(final IntegrationEntity item) {
        if (itemsToExclude.contains(item)) {
            throw new IllegalStateException("item is in the set of objects to exclude");
        }
        IntegrationProject project = ProjectUtils.getProject(item);
        return new ProjectAlteringProcessProcess<DeepCopyResult>(project) {

            @Override
            protected DeepCopyResult doWork() {
                originalToClone = Maps.newHashMap();
View Full Code Here

            e.setTransient(false);
        }
    }

    private DeepCopyResult createResult(IntegrationEntity item) {
        IntegrationProject project = ProjectUtils.getProject(item);
        return new DeepCopyResult(project, item, originalToClone, deleteHandler);
    }
View Full Code Here

                            managedProject.getProject().getName(), managedProject.getLocation());
            File newLocation = getNewFolderName();
            ProjectFile oldProjectFile = managedProject.getProjectFile();
            oldProjectFile.setNewName(newName);
            FileUtils.copyDirectory(oldLocation.getLocation(), newLocation);
            IntegrationProject renamedProject = manager.loadProject(newName, newLocation,
                            ProjectLoadingIssuesHandler.IGNORE);
            manager.setCurrentProject(renamedProject);
            deleteOldLocation(oldLocation.getLocation());
            updateRecentProjectManager(oldLocation, renamedProject);
        } catch (Exception ex) {
View Full Code Here

                            "An error occurred when renaming the project: " + ex.getMessage(), ex);
        }
    }
   
    private boolean isNewName() {
        IntegrationProject project = managedProject.getProject();
        String oldName = project.getName();
        boolean differs = !oldName.equals(newName);
        if (differs) {
            if (SystemUtils.IS_OS_WINDOWS) {
                boolean differsInCaseOnly = oldName.equalsIgnoreCase(newName);
                if (differsInCaseOnly) {
View Full Code Here

*/
public final class DefaultDeleteRequestHandler implements DeleteRequestHandler {

    @Override
    public boolean deleteRequested(final List<IntegrationEntity> entitiesToDelete) {
        final IntegrationProject project = getProject(entitiesToDelete);
        if (project == null) {
            return false;
        }
        return new ProjectAlteringProcessProcess<Boolean>(project) {

            @Override
            protected Boolean doWork() {
                project.deleteItems(entitiesToDelete);
                return true;
            }
        }.run();
    }
View Full Code Here

    private IntegrationProject getProject(List<IntegrationEntity> entitiesToDelete) {
        // XXX: For now we can safely assume that all items belong to the same project.
        // Once we allow more than one project opened at the same time this will not
        // work.
        for (IntegrationEntity e : entitiesToDelete) {
            IntegrationProject p = ProjectUtils.getProject(e);
            if (p != null) {
                return p;
            }
        }
        return null;
View Full Code Here

        Set<String> old = mappings;
        if (mapStrings == null) {
            mapStrings = Lists.newArrayList();
        }
        mappings = new LinkedHashSet<String>(mapStrings);
        IntegrationProject project = ProjectUtils.getProject(this);
        if (project != null) {
            updateScriptedLinks(project.getItemLookup());
        }
        firePropertyChange(MAPPINGS, old, mapStrings);
    }
View Full Code Here

        }
    }

    private void processProjectRename() throws InterchangeSavingException {
        DeployLog.LOG.fine("Processing project rename");
        IntegrationProject p = currentProject.getProject();
        RenamedEntity dr = renamedEntities.get(p.getID());
        if (dr != null) {
            currentProject.renameProject(dr.getNewName());
        }
    }
View Full Code Here

        e.setName(finalName);
    }

    private void updateProject() {
        DeployLog.LOG.fine("Updating the project");
        IntegrationProject p = currentProject.getProject();
        DeployState state = new DeployState();
        if (p.hasBeenDeployed()) {
            state.setDeployed();
        }
        collectDeployState(p, state, false);
        p.setDeployed(state.isDeployed());
        p.setDeployDirty(state.isDirty());
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.project.IntegrationProject

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.