Package org.drools.command.runtime

Examples of org.drools.command.runtime.GetGlobalCommand


        cmds = new ArrayList<Command>();

        cmds.add( new AssertEquals( "Check List size",
                                    5,
                                    new GetGlobalCommand( "list" ),
                                    "size()" ) );

        cmds.add( new AssertEquals( "Check Person",
                                    new Person( "bobba",
                                                77 ),
                                    new GetGlobalCommand( "list" ),
                                    "get( 0 )" ) );

        cmds.add( new AssertEquals( "Check Person",
                                    new Person( "darth",
                                                97 ),
                                    new GetGlobalCommand( "list" ),
                                    "get( 1 )" ) );

        cmds.add( new AssertEquals( "Check Person",
                                    new Person( "luke",
                                                30 ),
                                    new GetGlobalCommand( "list" ),
                                    "get( 2 )" ) );

        cmds.add( new AssertEquals( "Check Person",
                                    new Person( "yoda",
                                                98 ),
                                    new GetGlobalCommand( "list" ),
                                    "get( 3 )" ) );

        cmds.add( new AssertEquals( "Check Person",
                                    new Person( "ben",
                                                150 ),
                                    new GetGlobalCommand( "list" ),
                                    "get( 4 )" ) );

        steps.add( new StepImpl( path,
                                 new TestGroupCommand( "test2",
                                                       cmds ),
View Full Code Here


    public void removeEventListener(ProcessEventListener listener) {
        commandService.execute( new RemoveEventListenerCommand( listener ) );
    }

    public Object getGlobal(String identifier) {
        return commandService.execute( new GetGlobalCommand( identifier ) );
    }
View Full Code Here

  }

  public void marshal(Object object,
                      HierarchicalStreamWriter writer,
                      MarshallingContext context) {
      GetGlobalCommand cmd = (GetGlobalCommand) object;

      writer.addAttribute( "identifier",
                           cmd.getIdentifier() );

      if ( cmd.getOutIdentifier() != null ) {
          writer.addAttribute( "out-identifier",
                               cmd.getOutIdentifier() );
      }
  }
View Full Code Here

  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      String identifier = reader.getAttribute( "identifier" );
      String identifierOut = reader.getAttribute( "out-identifier" );

      GetGlobalCommand cmd = new GetGlobalCommand( identifier );
      if ( identifierOut != null ) {
          cmd.setOutIdentifier( identifierOut );
      }
      return cmd;
  }
View Full Code Here

TOP

Related Classes of org.drools.command.runtime.GetGlobalCommand

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.