Package org.jbpm.ui.common.model

Examples of org.jbpm.ui.common.model.Variable


    protected GlobalValidatorsWizardPage(String pageName, List<Variable> variables, List<Swimlane> swimlanes) {
        super(pageName);
        this.allVariables.addAll(variables);
        for (Swimlane swimlane : swimlanes) {
          this.allVariables.add(new Variable(swimlane.getName(), DefaultFormat.class.getName(), swimlane.isPublicVisibility()));
    }
        for (Variable variable : allVariables) {
            if (!variable.getName().contains(" ")) {
                bshVariableNames.add(variable.getName());
            }
View Full Code Here


            String varType = (String) JXPathContext.newContext(xsdDocContext, node).getValue("@type");
            if ((varType != null) && (varType.length() > 0)) {
                // if (rootGroupElementNames.contains(varName)) { // this check
                // for single elements
                logDebug("Found variable: " + varName + " of type " + varType);
                Variable variable = new Variable(varName);
                variable.setFormat(TypeMapper.getWfeTypeForInfopathType(varType));
                formVariables.add(variable);
            }
        }

        List<String> variableNames = formNode.getProcessDefinition().getVariableNames(true);
View Full Code Here

        if (lexem1Text.indexOf(".") > 0) {
            // Java names doesn't allowed use of point in variable name
            lexem1Text = lexem1Text.substring(0, lexem1Text.indexOf("."));
        }

        Variable var1 = getVariableByName(lexem1Text);
        if (var1 == null) {
            // variable deleted
            return null;
        }
        BSHTypeSupport typeSupport = BSHTypeSupport.getByFormat(var1.getFormat());

        Operation operation = Operation.getByOperator(operator, typeSupport);
        if (operation == null) {
            throw new NullPointerException("operation not found for operator: " + operator);
        }

        if (lexem2Text.indexOf(".") > 0) {
            // Java names doesn't allowed use of point in variable name
            lexem2Text = lexem2Text.substring(0, lexem2Text.indexOf("."));
        }
        Variable var2 = getVariableByName(lexem2Text);
        if (var2 == null) {
            return null;
        }

        return new Expr(var1, var2, operation);
View Full Code Here

            if (lexem1Text.indexOf(".") > 0) {
                // Java names doesn't allowed use of point in variable name
                lexem1Text = lexem1Text.substring(0, lexem1Text.indexOf("."));
            }
            Variable var1 = getVariableByName(lexem1Text);
            if (var1 == null) {
                // variable deleted
                continue;
            }
            BSHTypeSupport typeSupport = BSHTypeSupport.getByFormat(var1.getFormat());

            Operation operation = Operation.getByOperator(operator, typeSupport);
            if (operation == null) {
                throw new RuntimeException("Operation not found for operator: " + operator);
            }

            Object lexem2;
            if (lexem2Text.indexOf(".") > 0) {
                // Java names doesn't allowed use of point in variable name
                lexem2Text = lexem2Text.substring(0, lexem2Text.indexOf("."));
            }
            Variable var2 = getVariableByName(lexem2Text);
            if (var2 != null) {
                lexem2 = var2;
            } else if ("void".equals(lexem2Text)) {
                lexem2 = "null";
            } else {
View Full Code Here

                    copy.setConstraint(node.getConstraint());
                    if (node instanceof ITimed && ((ITimed) node).timerExist()) {
                        ((ITimed) copy).setDueDate(((ITimed) node).getDuration().getDuration());
                        String variableName = ((ITimed) node).getDuration().getVariableName();
                        if (variableName != null) {
                          Variable variable = copyBuffer.getSourceDefinition().getVariablesMap().get(variableName);
                            CopyVariableAction copyAction = new CopyVariableAction(variable);
                            elements.add(copyAction);
                        }
                    }
                    if (node instanceof State) {
                        ((State) copy).setMinimizedView(((State) node).isMinimizedView());
                    }
                    if (node instanceof Decision) {
                        copy.setDelegationConfiguration(node.getDelegationConfiguration());
                        copy.setDelegationClassName(node.getDelegationClassName());
                    }
                    if (node instanceof Subprocess) {
                        ((Subprocess) copy).setSubProcessName(((Subprocess) node).getSubProcessName());
                        List<VariableMapping> variables = ((Subprocess) node).getVariablesList();
                        ((Subprocess) copy).setVariablesList(variables);
                        for (VariableMapping varMapping : variables) {
                            Variable variable = copyBuffer.getSourceDefinition().getVariablesMap().get(varMapping.getProcessVariable());
                            if (variable != null) {
                                CopyVariableAction copyAction = new CopyVariableAction(variable);
                                elements.add(copyAction);
                            }
                        }
                        copy.setDelegationClassName(node.getDelegationClassName());
                    }
                    targetDefinition.addChild(copy);

                    targetNodeList.put(copy.getName(), copy);

                    if (node instanceof FormNode) {
                        FormNode formNode = (FormNode) node;
                        if (formNode.hasForm() || formNode.hasFormValidation()) {
                            CopyFormFilesAction copyAction = new CopyFormFilesAction(formNode, (FormNode) copy);
                            copyAction.setSourceFolder(copyBuffer.getSourceFolder());
                            copyAction.setTargetFolder(targetFolder);
                            elements.add(copyAction);
                        }
                        Map<String, Integer> variables = formNode.getFormVariables(copyBuffer.getSourceFolder());
                        for (String varName : variables.keySet()) {
                            Variable variable = copyBuffer.getSourceDefinition().getVariablesMap().get(varName);
                            if (variable != null) {
                                CopyVariableAction copyAction = new CopyVariableAction(variable);
                                elements.add(copyAction);
                            }
                        }
View Full Code Here

        private Variable oldVariable;
        private final Variable variable;

        public CopyVariableAction(Variable sourceVariable) {
            super(CopyBuffer.GROUP_VARIABLES, sourceVariable.getName());
            this.variable = new Variable(sourceVariable.getName(), sourceVariable.getFormat(), sourceVariable.isPublicVisibility());
        }
View Full Code Here

                variableWithSwimlanes.add(variable);
            }
        }
        for (String swimlaneName : formNode.getProcessDefinition().getSwimlaneNames()) {
            if (onlyVariablesWithSpace || swimlaneName.indexOf(" ") == -1) {
                variableWithSwimlanes.add(new Variable(swimlaneName)); // string
                                                                       // type
            }
        }
        return variableWithSwimlanes;
    }
View Full Code Here

                    variableWithSwimlanes.put(variable.getName(), variable);
                }
            }
            for (String swimlaneName : formNode.getProcessDefinition().getSwimlaneNames()) {
                if (includeVariablesWithSpace || swimlaneName.indexOf(" ") == -1) {
                    variableWithSwimlanes.put(swimlaneName, new Variable(swimlaneName)); // string
                                                                                         // type
                }
            }
        }
        return variableWithSwimlanes;
View Full Code Here

        }

        @Override
        public void widgetSelected(SelectionEvent e) {
            IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
            Variable variable = (Variable) selection.getFirstElement();
            List<Variable> children = getDefinition().getVariablesList();
            int index = children.indexOf(variable);
            getDefinition().swapChilds(variable, up ? children.get(index-1) : children.get(index+1));
            viewer.setSelection(selection);
            //updateButtons();
View Full Code Here

        @Override
        public void widgetSelected(SelectionEvent e) {
            try {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Variable variable = (Variable) selection.getFirstElement();
                GPDSearchQuery query = new GPDSearchQuery(editor.getDefinitionFile(), getDefinition(), variable.getName());
                NewSearchUI.runQueryInBackground(query);
            } catch (Exception ex) {
              DesignerLogger.logError(ex);
            }
        }
View Full Code Here

TOP

Related Classes of org.jbpm.ui.common.model.Variable

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.