Package org.jitterbit.cli

Examples of org.jitterbit.cli.CommandException


    @Override
    public void execute(String[] params) throws CommandException {
        DataStructureType inputType = page.getObject().getInputStructure().getStructureType();
        if (inputType == DataStructureType.None) {
            throw new CommandException("This transformation does not use source data.");
        }
        if (params.length == 0) {
            loadSourceWithoutArgument();
        } else {
            loadSourceWithArgument(inputType, StringUtils.join(params, " "));
View Full Code Here


        DataStructureType type = page.getObject().getInputStructure().getStructureType();
        switch (type) {
        case None: // fall-through
        case Database: // fall-through
        case LDAP:
            throw new CommandException("This command is not supported for transformations with input type " + type);
        default:
            loadSourceFile();
        }
    }
View Full Code Here

    private void loadSourceFile() throws CommandException {
        RecentFileStore files = createProjectFileStore();
        FileUi latestFile = files.latestFile();
        if (latestFile == null) {
            throw new CommandException("No known source file to use.");
        }
        SourceDataService svc = page.getTreeDataService().getSourceDataService();
        File file = latestFile.getFile();
        LoadSourceDataInput input = new LoadSourceDataFileInput(file);
        svc.loadSourceData(input, null);
View Full Code Here

        Editor editor = view.getActiveEditor();
        if (editor instanceof IntegrationEntityPage) {
            IntegrationEntity object = ((IntegrationEntityPage) editor).getObject();
            deployObjects(Sets.newHashSet(object));
        } else {
            throw new CommandException("No object open to deploy.");
        }
    }
View Full Code Here

            String projectName = dir.getName();
            ProjectNameValidator validator = new ProjectNameValidator();
            validator.validateName(projectName);
            return projectName;
        } catch (IllegalNameException ex) {
            throw new CommandException(ex.getMessage());
        }
    }
View Full Code Here

        }
    }

    private void createNewEntityInProject(String[] params) throws CommandException {
        if (view.getProject() == null) {
            throw new CommandException("No project open.");
        }
        EntityType type = getTypeToCreate(params);
        if (type == null) {
            throw new CommandException("Unknown or unsupported type: " + params[0]);
        }
        createEntityOfType(type);
    }
View Full Code Here

   
    @Override
    public final void execute(String[] params) throws CommandException {
        project = getManagedProject();
        if (project == null) {
            throw new CommandException("No project open.");
        }
        view.saveAndRun(new Runner(params), null, null);
    }
View Full Code Here

    @Override
    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]));
        }
View Full Code Here

        for (EntityType type : EntityTypeConfig.getInstance().getDisplayOrder()) {
            if (type.getPlural().toLowerCase().startsWith(lowerCaseParam)) {
                return type;
            }
        }
        throw new CommandException("Unknown item type: " + param);
    }
View Full Code Here

        try {
            ProjectPathQuery query = new ProjectPathQuery(project);
            KSet<IntegrationEntity> matches = query.findItems(path);
            return matches.keepAll(filter);
        } catch (IllegalArgumentException pathSyntaxError) {
            throw new CommandException(pathSyntaxError.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.cli.CommandException

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.