Examples of Variables


Examples of org.apache.geronimo.gshell.command.Variables

    protected Object doExecute() throws Exception {
        if (context.getVariables().get(LayoutManager.CURRENT_NODE) != null)
        {
            log.info("Exiting subshell");
            Variables v = context.getVariables();
            while (v != null && v.get(LayoutManager.CURRENT_NODE) != null) {
                v.unset(LayoutManager.CURRENT_NODE);
                v = v.parent();
            }
            return SUCCESS;
        }
        else
        {
View Full Code Here

Examples of org.apache.jackrabbit.test.config.util.Variables

 
  /**
   * Don't forget to call init() on the returned {@link RepositoryConfig}.
   */
  public RepositoryConfig createConfig(String home) throws ConfException {
    Variables variables = new Variables();
    variables.setProperty(RepositoryConfigurationParser.REPOSITORY_HOME_VARIABLE, home);
   
    return createConfig(variables);
  }
View Full Code Here

Examples of org.eclipse.bpel.model.Variables

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetVariables(Variables newVariables, NotificationChain msgs) {
    Variables oldVariables = variables;
    variables = newVariables;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BPELPackage.PROCESS__VARIABLES, oldVariables, newVariables);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of org.eclipse.bpel.model.Variables

        if (result == null) result = caseWSDLElement(partnerLinks);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case BPELPackage.VARIABLES: {
        Variables variables = (Variables)theEObject;
        Object result = caseVariables(variables);
        if (result == null) result = caseExtensibleElement(variables);
        if (result == null) result = caseExtensibleElement_1(variables);
        if (result == null) result = caseWSDLElement(variables);
        if (result == null) result = defaultCase(theEObject);
View Full Code Here

Examples of org.eclipse.bpel.model.Variables

        process.setTargetNamespace(packageBpelNamespaceMap.get(ctClass.getPackage()));
       
        PartnerLinks partnerLinks = BPELFactory.eINSTANCE.createPartnerLinks();
        process.setPartnerLinks(partnerLinks);       
       
        Variables variables = BPELFactory.eINSTANCE.createVariables();
        process.setVariables(variables);

        classProcessMap.put(ctClass, process);
        classProcessLinksMap.put(ctClass, new HashSet<PartnerLink>());
        processWsdlDeps.put(process, new HashSet<Definition>());
View Full Code Here

Examples of org.eclipse.bpel.model.Variables

        Variable variable = ((ForEach)container).getCounterName();
        if (variable != null && variable.getName().equals(variableName)) {
          return variable;
        }
      } else {
        Variables variables = null;
        if (container instanceof Process)
          variables = ((Process)container).getVariables();       
        else if (container instanceof Scope)
          variables = ((Scope)container).getVariables();
       
        if (variables != null) {
         
          List<Object> list = new ArrayList<Object>();
         
          // check all BPEL variables if anyone has the correct variable name
         
          list.addAll(variables.getChildren());
          list.addAll(variables.getExtensibilityElements());
         
          for (Object n : list) {
            if (n instanceof Variable) {           
              Variable variable = (Variable) n;
              String name = variable.getName();
View Full Code Here

Examples of org.eclipse.bpel.model.Variables

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetVariables(Variables newVariables, NotificationChain msgs) {
    Variables oldVariables = variables;
    variables = newVariables;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BPELPackage.SCOPE__VARIABLES, oldVariables, newVariables);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

Examples of org.olat.ims.qti.container.Variables

   */
  public boolean process(Element el_respcond, ItemContext itc, EvalContext ect) {
    // 1. evaluate conditionvar
    // 2. if true, set variables
    //    and setCurrentDisplayFeedback (TODO: assuming there is only one displayfeedback in a respcondition)
    Variables vars;
    Element el_condVar = (Element) el_respcond.selectSingleNode("conditionvar");
    String respcondtitle = el_respcond.attributeValue("title");
    QTI_and qtiAnd = QTIHelper.getQTI_and();
    boolean fulfilled = qtiAnd.eval(el_condVar, itc, ect);
    // continue to set variables and display feedback if question was answered correctly
    if (fulfilled) {
      vars = itc.getVariables();
      List setvars = el_respcond.selectNodes("setvar");
      for (Iterator iter = setvars.iterator(); iter.hasNext();) {
        Element element = (Element) iter.next();
        String action = element.attributeValue("action");
        String varName = element.attributeValue("varname");
        if (varName == null) varName = "SCORE";
        varName.trim();
        String varVal = element.getText();
        Variable var = vars.getVariable(varName);
        if (var == null) throw new RuntimeException("var "+varName+" is in setvar, but was not declared ");
        if (action.equals("Set")) {
          var.setValue(varVal);
        } else {
          // we are doing Integer or float arithmetic
View Full Code Here

Examples of org.olat.ims.qti.container.Variables

  /**
   *
   */
  public static Variables declareVariables(Element el_outcomes) {
    String varName;
    Variables variables = new Variables();

    if (el_outcomes == null) return variables;
    List decvars = el_outcomes.selectNodes("decvar");
    /*
     * <decvar defaultval = "0" varname = "Var_SumofScores" vartype = "Integer"
     * minvalue = "-10" maxvalue = "10" cutvalue = "0"/> <decvar minvalue = "0"
     * maxvalue = "1" defaultval = "0"/>
     */
    for (Iterator iter = decvars.iterator(); iter.hasNext();) {
      Element decvar = (Element) iter.next();
      varName = decvar.attributeValue("varname"); // dtd CDATA 'SCORE'
      if (varName == null) varName = "SCORE";
      String varType = decvar.attributeValue("vartype");
      if (varType == null) varType = "Integer"; // default
      Variable v = null;
      if (varType.equals("Integer") || varType.equals("Decimal")) {
        String def = decvar.attributeValue("defaultval");
        String min = decvar.attributeValue("minvalue");
        String max = decvar.attributeValue("maxvalue");
        String cut = decvar.attributeValue("cutvalue");
        v = new DecimalVariable(varName, max, min, cut, def);
        variables.setVariable(v);
      } else throw new RuntimeException("vartype " + varType + " not supported (declaration)");

    }
    return variables;
  }
View Full Code Here

Examples of org.sonatype.gshell.variables.Variables

    }

    public Object execute(final CommandContext context) throws Exception {
        assert context != null;
        IO io = context.getIo();
        Variables vars = context.getVariables();

        io.println("Creating archetype from: {}", pomFile.getAbsoluteFile()); // TODO: i18n

        MavenProject project = buildProject(context);
        log.debug("Built project: {}", project);

        log.debug("Configuring");
        ArchetypeCreationConfigurator configurator = plexus.lookup(ArchetypeCreationConfigurator.class);
        Properties config = configurator.configureArchetypeCreation(project, !batch, props, null, languages);

        RepositorySystem rsys = plexus.lookup(RepositorySystem.class);

        ArchetypeCreationRequest request = new ArchetypeCreationRequest()
            .setProject(project)
            .setProperties(config)
            .setLanguages(languages)
            .setFilteredExtensions(filteredExtensions)
            .setPreserveCData(preserveCDATA)
            .setKeepParent(keepParent)
            .setPartialArchetype(partial)
            .setLocalRepository(rsys.createDefaultLocalRepository())
            .setPackageName(packageName);

        if (registryFile == null) {
            File dir = vars.get(SHELL_USER_HOME, File.class);
            registryFile = new File(dir, ".m2/archetype.xml");
        }
        request.setArchetypeRegistryFile(registryFile);

        if (outputDirectory != null) {
            request.setOutputDirectory(outputDirectory);
        }
        else {
            // HACK: Default dir is not rooted
            System.setProperty("user.dir", vars.get(SHELL_USER_DIR, File.class).getAbsolutePath());
        }

        log.debug("Creating archetype");
        ArchetypeManager archetypeManager = plexus.lookup(ArchetypeManager.class);
        ArchetypeCreationResult result = archetypeManager.createArchetypeFromProject(request);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.