Examples of Environment


Examples of org.jbpm.pvm.internal.env.Environment

  public List<JobRef> getJobs()
  {
    List<JobRef> results = new ArrayList<JobRef>();

    Environment env = ((EnvironmentFactory)processEngine).openEnvironment();

    try
    {
      ManagementService mgmtService = this.processEngine.getManagementService();

      // jobs
      JobQuery timerQuery = mgmtService.createJobQuery();
      timerQuery.timers();
      List<Job> timers = timerQuery.list();
      for(Job t : timers)
      {
        JobRef ref = ModelAdaptor.adoptJob(t);
        ref.setType("timer");
        results.add(ref);
      }

      // messages
      JobQuery msgQuery= mgmtService.createJobQuery();
      msgQuery.messages();
      List<Job> msgs = msgQuery.list();
      for(Job t : msgs)
      {
        JobRef ref = ModelAdaptor.adoptJob(t);
        ref.setType("message");
        results.add(ref);
      }
    }
    finally
    {
      env.close();
    }

    return results;
  }
View Full Code Here

Examples of org.jclouds.chef.domain.Environment

   @Test
   public void testCreateEnvironment() {
      api.deleteEnvironment(PREFIX);
      api.createEnvironment(Environment.builder().name(PREFIX).description(PREFIX).build());
      Environment env = api.getEnvironment(PREFIX);
      assertNotNull(env, "Created environment should not be null");
      assertEquals(env.getName(), PREFIX);
      assertEquals(env.getDescription(), PREFIX);
   }
View Full Code Here

Examples of org.jemmy.env.Environment

                cns = wrapperClass.getConstructor(Environment.class, cls);
            } catch (NoSuchMethodException e) {
            }
        } while ((cls = cls.getSuperclass()) != null);
        if (cns != null) {
            return (Wrap<T>) cns.newInstance(new Environment(env), control);
        } else {
            throw new WrapperException(controlClass, wrapperClass);
        }
    }
View Full Code Here

Examples of org.kie.api.runtime.Environment

                // now unmarshall that byte[]
                ByteArrayInputStream bais = new ByteArrayInputStream( rsession.bytes );
                Marshaller marshaller = MarshallerFactory.newMarshaller(new KnowledgeBaseImpl(this), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

                Environment environment = EnvironmentFactory.newEnvironment();
                KieSession ksession = marshaller.unmarshall( bais,
                                                             conf,
                                                             environment );
                session = (StatefulSession) ((StatefulKnowledgeSessionImpl) ksession).session;
View Full Code Here

Examples of org.kie.runtime.Environment

   
                // now unmarshall that byte[]
                ByteArrayInputStream bais = new ByteArrayInputStream( rsession.bytes );
                Marshaller marshaller = MarshallerFactory.newMarshaller( new KnowledgeBaseImpl( this )new ObjectMarshallingStrategy[] { MarshallerFactory.newSerializeMarshallingStrategy() }   );
               
                Environment environment = EnvironmentFactory.newEnvironment();
                KieSession ksession = marshaller.unmarshall( bais,
                                                                           conf,
                                                                           environment );
                session = (StatefulSession) ((StatefulKnowledgeSessionImpl) ksession).session;
   
View Full Code Here

Examples of org.lilian.experiment.Environment

      else if(type == Type.TURTLE)
        graph = Resources.turtleGraph(data);
       
      Experiment experiment = new GraphMeasures<String>(graph, size);
     
      Environment env = new Environment(environment, 0);
      Environment.current = env;
     
      env.addTag("narrow");
     
      experiment.run();  
     
      Global.log().info("App Finished");
    }
View Full Code Here

Examples of org.mozilla.javascript.tools.shell.Environment

        defineProperty("require", new Require(engine, this), DONTENUM);
        defineProperty("arguments", cx.newArray(this, engine.getArguments()), DONTENUM);
        // Set up "environment" in the global scope to provide access to the
        // System environment variables. http://github.com/ringo/ringojs/issues/#issue/88
        Environment.defineClass(this);
        Environment environment = new Environment(this);
        defineProperty("environment", environment, ScriptableObject.DONTENUM);
    }
View Full Code Here

Examples of org.openstreetmap.josm.gui.mappaint.Environment

                    if (ai.isSetInstruction) {
                        containsSetClassExpression = true;
                        continue;
                    }
                    final String val = ai.val instanceof Expression
                            ? (String) ((Expression) ai.val).evaluate(new Environment())
                            : ai.val instanceof String
                            ? (String) ai.val
                            : null;
                    if (ai.key.startsWith("throw")) {
                        try {
View Full Code Here

Examples of org.opentripplanner.visibility.Environment

    public void testPalazzo() {
        VLPolygon poly = poly(12.3402039, 45.4342526, 12.339956, 45.43421, 12.3401159, 45.4338161,
                12.3404923, 45.4338996, 12.3402845, 45.4344296, 12.3402433, 45.4344174, 12.3401433,
                45.4343973, 12.3401691, 45.4343433);

        Environment environment = new Environment(Arrays.asList(poly));
        environment.enforce_standard_form();
        VisibilityGraph vg = new VisibilityGraph(environment, 0.0000001);

        boolean expected[][] = {{ true,  true,  true, false, false, false, false,  true},
                                { true,  true,  true,  true,  true, false, false,  true},
                                { true,  true,  true,  true,  true,  true,  true,  true},
View Full Code Here

Examples of org.pdfsam.guiclient.business.Environment

          pluginsMap.put(infoDataModel, infoPanel);                 
         
          //menu
          setSplashStep(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"Building menus.."));       

          Environment environment = new Environment(pluginsMap, treePanel);
      SaveEnvironmentAction saveAction = new SaveEnvironmentAction(environment, this);
      LoadEnvironmentAction loadAction = new LoadEnvironmentAction(environment, this);
          exitMediator = new ApplicationExitMediator(new ApplicationCloser(this));
          getRootPane().setJMenuBar(new JMainMenuBar(saveAction, loadAction, exitMediator));


          //buttons bar
          setSplashStep(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"Building buttons bar.."));
          buttonsPanel = new JButtonsPanel(saveAction, loadAction, exitMediator, new LogActionListener());
          getContentPane().add(buttonsPanel,BorderLayout.PAGE_START)
         
          //set up check for updates mediator
          updateMediator = new UpdateCheckerMediator(statusPanel);
          if(Configuration.getInstance().isCheckForUpdates()){
            updateMediator.checkForUpdates(5000, false);
          }
          settingsPanel.setCheckUpdateMediator(updateMediator);
         
          //final set up
          mainScrollPanel = new JScrollPane(mainPanel);
          mainScrollPanel.setMinimumSize(new Dimension(100, 400));
         
          logPanel = new JLogPanel();
         
          horizSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treePanel, mainScrollPanel);
          horizSplitPane.setOneTouchExpandable(true);
          horizSplitPane.setDividerLocation(155);
         
          verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, horizSplitPane,logPanel);
          verticalSplitPane.setOneTouchExpandable(true);
          verticalSplitPane.setResizeWeight(1.0);
          verticalSplitPane.setDividerLocation(0.75);
         
          //load the default env if set
          String defaultEnvString = Configuration.getInstance().getDefaultEnvironment();
          if(defaultEnvString!=null && defaultEnvString.length()>0){
            File defaultEnv = new File(defaultEnvString);
            if(defaultEnv != null && defaultEnv.exists() && defaultEnv.isFile()){
              log.info(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"Loading default environment."));
              environment.loadJobs(defaultEnv);
            }
          }
          getContentPane().add(verticalSplitPane,BorderLayout.CENTER);
         
          setSize(640, 480);
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.