Package org.globus.workspace.client_core

Examples of org.globus.workspace.client_core.ParameterProblem


    void __checknull(String action,
                     String propname,
                     String val) throws ParameterProblem {
        if (val == null) {
            throw new ParameterProblem(action + " requires " + propname);
        }
    }
View Full Code Here


            }

            if (!this.exitState.isTransportReady()) {
                final String err = "Explicit exit state provided for " +
                    "shutdown-save is not 'TransportReady' which is illegal";
                throw new ParameterProblem(err);
            }
        }

        this.exitState = new State(State.STATE_TransportReady);
    }
View Full Code Here

            final URI uri = new URI(this.args.saveTarget);
            this.postRequest.setRootPartitionUnpropagationTarget(uri);
        } catch (URI.MalformedURIException e) {
            final String err = "Save target override is not a valid URI: '" +
                    this.args.saveTarget + "'";
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            final String dbg = "Save target override going to be used: '" +
                    this.args.saveTarget + "'";
View Full Code Here

    private void validateEndpoint() throws ParameterProblem {

        final EndpointReferenceType epr = this.stubConf.getEPR();

        if (epr == null) {
            throw new ParameterProblem(name() + " requires EPR");
        }

        final String eprStr;
        try {
            eprStr = EPRUtils.eprToString(epr);
        } catch (Exception e) {
            final String err = CommonUtil.genericExceptionMessageWrapper(e);
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            // xml print
            final String dbg =
View Full Code Here

    }

    private void validateIpDir() throws ParameterProblem {

        if (this.args.eprIdDir == null) {
            throw new ParameterProblem(name() + " requires --" + Opts.EPR_ID_DIR_OPT_STRING);
        }

        final File adir = new File(this.args.eprIdDir);
        if (!adir.exists()) {
            throw new ParameterProblem(
                    "Does not exist: " + this.args.eprIdDir);
        }
        if (!adir.isDirectory()) {
            throw new ParameterProblem(
                    "Must be a directory: " + this.args.eprIdDir);
        }
        if (!adir.canRead()) {
            throw new ParameterProblem(
                    "Can not read: " + this.args.eprIdDir);
        }
    }
View Full Code Here

            final URI uri = new URI(this.args.saveTarget);
            this.postShutdownRequest.setRootPartitionUnpropagationTarget(uri);
        } catch (URI.MalformedURIException e) {
            final String err = "Save target override is not a valid URI: '" +
                    this.args.saveTarget + "'";
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            final String dbg = "Save target override going to be used: '" +
                    this.args.saveTarget + "'";
View Full Code Here

    private void validateEndpoint() throws ParameterProblem {

        this.epr = this.stubConf.getEPR();
       
        if (this.epr == null) {
            throw new ParameterProblem(name() + " requires EPR");
        }

        final String eprStr;
        try {
            eprStr = EPRUtils.eprToString(this.epr);
        } catch (Exception e) {
            final String err = CommonUtil.genericExceptionMessageWrapper(e);
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            // xml print
            final String dbg =
                    "\nGiven EPR:\n----------\n" + eprStr + "----------\n";

            if (this.pr.useThis()) {
                this.pr.dbg(dbg);
            } else if (this.pr.useLogging()) {
                logger.debug(dbg);
            }
        }

        final String kind;
        if (EPRUtils.isInstanceEPR(this.epr)) {
            this.instanceDestroy =
                    new Destroy_Instance(this.epr, this.stubConf, this.pr);
            kind = "an instance";
        } else if (EPRUtils.isGroupEPR(this.epr)) {
            this.groupDestroy =
                    new Destroy_Group(this.epr,  this.stubConf, this.pr);
            kind = "a group";
        } else if (EPRUtils.isEnsembleEPR(this.epr)) {
            this.ensembleDestroy =
                    new Destroy_Ensemble(this.epr, this.stubConf, this.pr);
            kind = "an ensemble";
        } else {
            throw new ParameterProblem(name() + " requires an instance, " +
                    "group, or ensemble EPR.");
        }

        if (this.pr.enabled()) {
            final String dbg = "Given EPR is " + kind + " EPR";
View Full Code Here

    private void validateEndpoint() throws ParameterProblem {

        final EndpointReferenceType epr = this.stubConf.getEPR();

        if (epr == null) {
            throw new ParameterProblem(name() + " requires EPR");
        }

        final String eprStr;
        try {
            eprStr = EPRUtils.eprToString(epr);
        } catch (Exception e) {
            final String err = CommonUtil.genericExceptionMessageWrapper(e);
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            // xml print
            final String dbg =
View Full Code Here

        this.inject = new Ctx_InjectData(epr, this.stubConf, this.pr);
    }

    private void validateData() throws ParameterProblem {
        if (this.args.contextDataInjectFile == null) {
            throw new ParameterProblem(name() + " requires path to data file");
        }
        if (this.args.contextDataInjectName == null) {
            throw new ParameterProblem(name() + " requires data name");
        } else {
            this.dataName = this.args.contextDataInjectName;
        }
       
        try {
            this.dataValue =
                FileUtils.readFileAsString(this.args.contextDataInjectFile);
        } catch (IOException e) {
            final String err = CommonUtil.genericExceptionMessageWrapper(e);
            throw new ParameterProblem("Problem with data file '" +
                    this.args.contextDataInjectFile + "': " + err, e);
        }
    }
View Full Code Here

    private void validateEndpoint() throws ParameterProblem {

        final EndpointReferenceType epr = this.stubConf.getEPR();

        if (epr == null) {
            throw new ParameterProblem(name() + " requires EPR");
        }

        final String eprStr;
        try {
            eprStr = EPRUtils.eprToString(epr);
        } catch (Exception e) {
            final String err = CommonUtil.genericExceptionMessageWrapper(e);
            throw new ParameterProblem(err, e);
        }

        if (this.pr.enabled()) {
            // xml print
            final String dbg =
View Full Code Here

TOP

Related Classes of org.globus.workspace.client_core.ParameterProblem

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.