Package org.apache.isis.viewer.bdd.common

Examples of org.apache.isis.viewer.bdd.common.ScenarioCell


                + " arguments)");
        }
        final ObjectAdapter[] adapters = new ObjectAdapter[parameterCount];

        for (int i = 0; i < parameterCount; i++) {
            final ScenarioCell paramCell = argumentCells.get(i);
            final ObjectActionParameter parameter = parameters.get(i);
            adapters[i] = getAdapter(null, parameter.getSpecification(), onMemberBinding, paramCell);
        }
        return adapters;
    }
View Full Code Here


        if (!thatItBinding.isFound()) {
            final CellBinding performBinding = performContext.getPeer().getPerformBinding();
            throw ScenarioBoundValueException.current(performBinding, "(require " + IsisViewerConstants.THAT_IT_NAME
                + "' column)");
        }
        final ScenarioCell thatItCell = thatItBinding.getCurrentCell();
        final String thatIt = thatItCell.getText();
        final ThatSubcommand thatSubcommand = subcommandByKey.get(thatIt);
        if (thatSubcommand == null) {
            throw ScenarioBoundValueException.current(thatItBinding, "(unknown '" + IsisViewerConstants.THAT_IT_NAME
                + "' verb)");
        }
View Full Code Here

        // check we have an argument to validate (if one is required)
        if (!arg0Binding.isFound()) {
            throw ScenarioBoundValueException.current(thatBinding, "(requires argument)");
        }

        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();
        final String toValidate = arg0Cell.getText();
        if (StringUtils.isNullOrEmpty(toValidate)) {
            throw ScenarioBoundValueException.current(arg0Binding, "(required)");
        }

        final ObjectAdapter toValidateAdapter =
View Full Code Here

        if (!arg0Binding.isFound()) {
            throw ScenarioBoundValueException.current(thatBinding, "(requires argument)");
        }

        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();

        final ObjectAdapter containedAdapter =
            performContext.getPeer().getAdapter(null, nakedObjectMember.getSpecification(), arg0Binding, arg0Cell);

        boolean contains = false;
View Full Code Here

        if (!arg0Binding.isFound()) {
            throw ScenarioBoundValueException.current(thatBinding, "(requires argument)");
        }

        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();

        final String expectedSizeStr = arg0Cell.getText();
        final int expectedSize;
        try {
            expectedSize = Integer.parseInt(expectedSizeStr);
        } catch (final NumberFormatException ex) {
            throw ScenarioBoundValueException.current(arg0Binding, "(not an integer)");
View Full Code Here

        }
        return "ok";
    }

    private String getTitle() {
        final ScenarioCell currentCell = getPeer().getTitleBinding().getCurrentCell();
        return currentCell != null ? currentCell.getText() : "(no title provided)";
    }
View Full Code Here

            throw ScenarioBoundValueException.current(onMemberBinding, "(cannot set)");
        }

        // safe to obtain since guaranteed by superclass
        final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
        final ScenarioCell arg0Cell = argumentCells.get(0);

        // obtain existing as 'context' (used if this is a parsed @Value)
        final ObjectAdapter contextAdapter = otoa.get(onAdapter);

        // validate parameter
View Full Code Here

    public void doHandle(final PerformContext performContext) throws ScenarioBoundValueException {

        final ObjectAdapter onAdapter = performContext.getOnAdapter();
        final ObjectMember nakedObjectMember = performContext.getObjectMember();
        final CellBinding arg0Binding = performContext.getPeer().getArg0Binding();
        final ScenarioCell arg0Cell = arg0Binding.getCurrentCell();
        int requestedParamNum = -1;
        try {
            requestedParamNum = Integer.valueOf(arg0Cell.getText());
        } catch (final NumberFormatException ex) {
            throw ScenarioBoundValueException.current(arg0Binding, ex.getMessage());
        }

        final ObjectAction noa = (ObjectAction) nakedObjectMember;
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.bdd.common.ScenarioCell

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.