Examples of CommandService


Examples of org.apache.isis.applib.services.command.spi.CommandService

    public void startTransactionOnCommandIfConfigured(final UUID transactionId) {
        final CommandContext commandContext = getServiceOrNull(CommandContext.class);
        if(commandContext == null) {
            return;
        }
        final CommandService commandService = getServiceOrNull(CommandService.class);
        if(commandService == null) {
            return;
        }
        final Command command = commandContext.getCommand();
        commandService.startTransaction(command, transactionId);
    }
View Full Code Here

Examples of org.apache.isis.applib.services.command.spi.CommandService

    }

    private void completeCommandIfConfigured() {
        final CommandContext commandContext = getServiceOrNull(CommandContext.class);
        if(commandContext != null) {
            final CommandService commandService = getServiceOrNull(CommandService.class);
            if(commandService != null) {
                final Command command = commandContext.getCommand();
                commandService.complete(command);

                if(command instanceof Command2) {
                    final Command2 command2 = (Command2) command;
                    command2.flushActionInteractionEvents();
                }
View Full Code Here

Examples of org.drools.command.CommandService

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

        CommandService commandService = (CommandService) buildCommandService( kbase,
                                                                              mergeConfig( configuration ),
                                                                              environment );
        commandService.getContext().set(WorkingMemoryEntryPointBuilder.class.getName(),
                                        new CommandBasedWorkingMemoryEntryPointBuilder(commandService));
        return new CommandBasedStatefulKnowledgeSession( commandService );
    }
View Full Code Here

Examples of org.drools.command.CommandService

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

        CommandService commandService = (CommandService) buildCommandService( id,
                                                                              kbase,
                                                                              mergeConfig( configuration ),
                                                                              environment );
        commandService.getContext().set(WorkingMemoryEntryPointBuilder.class.getName(),
                                        new CommandBasedWorkingMemoryEntryPointBuilder(commandService));
        return new CommandBasedStatefulKnowledgeSession( commandService );
    }
View Full Code Here

Examples of org.drools.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.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.command.CommandService

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

        CommandService commandService = (CommandService) buildCommandService( kbase,
                                                                              mergeConfig( configuration ),
                                                                              environment );
        commandService.getContext().set(WorkingMemoryEntryPointBuilder.class.getName(),
                                        new CommandBasedWorkingMemoryEntryPointBuilder(commandService));
        return new CommandBasedStatefulKnowledgeSession( commandService );
    }
View Full Code Here

Examples of org.drools.command.CommandService

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

        CommandService commandService = (CommandService) buildCommandService( id,
                                                                              kbase,
                                                                              mergeConfig( configuration ),
                                                                              environment );
        commandService.getContext().set(WorkingMemoryEntryPointBuilder.class.getName(),
                                        new CommandBasedWorkingMemoryEntryPointBuilder(commandService));
        return new CommandBasedStatefulKnowledgeSession( commandService );
    }
View Full Code Here

Examples of org.drools.command.CommandService

               scheduler );
    }

    public Void call() throws Exception {
        JDKCallableJobCommand command = new JDKCallableJobCommand( this );
        CommandService commandService = ((AcceptsTimerJobFactoryManager)scheduler).getTimerJobFactoryManager().getCommandService();
        commandService.execute( command );
        return null;
    }
View Full Code Here

Examples of org.drools.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
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.