Examples of CommandService


Examples of org.drools.core.command.CommandService

    }

    public Void call() throws Exception {
        try {
            JDKCallableJobCommand command = new JDKCallableJobCommand( this );
            CommandService commandService = ((AcceptsTimerJobFactoryManager)scheduler).getTimerJobFactoryManager().getCommandService();
            commandService.execute( command );
            return null;
        } catch( Exception e ) {
            logger.error("Unable to execute timer job!", e);
            throw e;
        }
View Full Code Here

Examples of org.drools.core.command.CommandService

        if ( environment == null ) {
            throw new IllegalArgumentException( "Environment cannot be null" );
        }

       
        CommandService commandService = (CommandService) buildCommandService( kbase, mergeConfig( configuration ), environment );
        if (commandService instanceof SingleSessionCommandService) {
          ((SingleSessionCommandService) commandService).
            addInterceptor(new ManualPersistInterceptor((SingleSessionCommandService) commandService));
          try {
            Class<?> clazz = Class.forName("org.jbpm.persistence.ManualPersistProcessInterceptor");
View Full Code Here

Examples of org.drools.core.command.CommandService

        if ( environment == null ) {
            throw new IllegalArgumentException( "Environment cannot be null" );
        }

        CommandService commandService = (CommandService) buildCommandService( id, kbase, mergeConfig( configuration ), environment );
        if (commandService instanceof SingleSessionCommandService) {
          ((SingleSessionCommandService) commandService).
            addInterceptor(new ManualPersistInterceptor((SingleSessionCommandService) commandService));
          try {
            Class<?> clazz = Class.forName("org.jbpm.persistence.ManualPersistProcessInterceptor");
View Full Code Here

Examples of org.drools.process.command.CommandService

       
        if ( environment == null ) {
            environment = EnvironmentFactory.newEnvironment();
        }
       
      CommandService commandService = ((SessionConfiguration) conf).getCommandService(this, environment);
      if (commandService != null) {
      return new CommandBasedStatefulKnowledgeSession(commandService);
      } else {
        ReteooStatefulSession session = (ReteooStatefulSession) this.ruleBase.newStatefulSession( (SessionConfiguration) conf,
                                                                                                  environment );
View Full Code Here

Examples of org.drools.process.command.CommandService

    public StatefulKnowledgeSession newStatefulKnowledgeSession() {
      return newStatefulKnowledgeSession(new SessionConfiguration());
    }
   
    public StatefulKnowledgeSession newStatefulKnowledgeSession(KnowledgeSessionConfiguration conf) {
      CommandService commandService = ((SessionConfiguration) conf).getCommandService(this.ruleBase);
      if (commandService != null) {
      return new CommandBasedStatefulKnowledgeSession(commandService);
      } else {
        ReteooStatefulSession session = (ReteooStatefulSession) this.ruleBase.newStatefulSession( (SessionConfiguration) conf );
        return new StatefulKnowledgeSessionImpl( session, this );
View Full Code Here

Examples of org.eclipse.ui.internal.commands.CommandService

   
    final CommandService [] commandService = new CommandService[1];
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        commandService[0] = new CommandService(commandManager);
        commandService[0].readRegistry();
        serviceLocator.registerService(ICommandService.class, commandService[0]);

      }});
   
View Full Code Here

Examples of org.exoplatform.services.command.impl.CommandService

      SessionProviderService sessionProviderService =
         (SessionProviderService)container.getComponentInstanceOfType(SessionProviderService.class);

      RepositoryService repositoryService =
         (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
      CommandService commandService = (CommandService)container.getComponentInstanceOfType(CommandService.class);

      GenericWebAppContext ctx;
      try
      {
         ctx =
            new GenericWebAppContext(getServletContext(), request, response, sessionProviderService
               .getSessionProvider(null), // null for
               // ThreadLocalSessionProvider
               repositoryService.getDefaultRepository());
      }
      catch (final RepositoryException e)
      {
         throw new IOException()
         {
            @Override
            public Throwable getCause()
            {
               return e;
            }
         };
      }
      catch (final RepositoryConfigurationException e)
      {
         throw new IOException()
         {
            @Override
            public Throwable getCause()
            {
               return e;
            }
         };
      }

      String catalogName = (String)ctx.get(WebConstants.CATALOG_NAME);

      String wsName = (String)ctx.get("workspace");
      if (wsName != null)
         ctx.setCurrentWorkspace(wsName);

      String currentPath = (String)ctx.get("path");

      if (currentPath == null)
         throw new ServletException("Path undefined " + request.getParameter("path") + " Request: "
            + request.getRequestURI());

      try
      {
         Command cmd;
         if (catalogName == null)
            cmd = commandService.getCatalog().getCommand("displayResource");
         else
            cmd = commandService.getCatalog(catalogName).getCommand("displayResource");

         if (cmd == null)
            throw new Exception("No 'displayResource' command found");
         ctx.put("path", currentPath);
         ctx.put("cache-control-max-age", getServletConfig().getInitParameter("cache-control-max-age"));
View Full Code Here

Examples of org.exoplatform.services.command.impl.CommandService

               return e;
            }
         };
      }

      CommandService commandService = (CommandService)container.getComponentInstanceOfType(CommandService.class);
      String catalogName = (String)ctx.get(WebConstants.CATALOG_NAME);

      // command from context
      String commandName = (String)ctx.get("Command");
      if (commandName == null)
         throw new ServletException("No Command found at the Context");
      Command cmd;
      if (catalogName == null)
         cmd = commandService.getCatalog().getCommand(commandName);
      else
         cmd = commandService.getCatalog(catalogName).getCommand(commandName);

      if (cmd == null)
         throw new ServletException("No Command found " + commandName);
      try
      {
View Full Code Here

Examples of org.geomajas.puregwt.client.command.CommandService

    setFallbackController(new NavigationController());

    Command commandRequest = new Command(GetMapConfigurationRequest.COMMAND);
    commandRequest.setCommandRequest(new GetMapConfigurationRequest(id, applicationId));
    CommandService cmdService = new CommandService();
    cmdService.execute(commandRequest, new CommandCallback() {

      public void onSuccess(CommandResponse response) {
        if (response instanceof GetMapConfigurationResponse) {
          // Initialize the MapModel and ViewPort:
          GetMapConfigurationResponse r = (GetMapConfigurationResponse) response;
View Full Code Here

Examples of org.geomajas.puregwt.client.command.CommandService

  public TilePresenter(VectorLayerRenderer renderer, TileCode tileCode) {
    this.renderer = renderer;
    this.tileCode = tileCode;
    siblings = new ArrayList<TileCode>();
    service = new CommandService();
  }
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.