Package org.drools.command.runtime.rule

Examples of org.drools.command.runtime.rule.GetObjectCommand


  }

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

      writer.addAttribute( "fact-handle",
                           cmd.getFactHandle().toExternalForm() );

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


  public Object unmarshal(HierarchicalStreamReader reader,
                          UnmarshallingContext context) {
      FactHandle factHandle = new DefaultFactHandle( reader.getAttribute( "fact-handle" ) );
      String identifierOut = reader.getAttribute( "out-identifier" );

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

                             List<Setter> setters) {
        return new ModifyCommand(factHandle, setters);
    }

    public Command newGetObject(FactHandle factHandle) {
        return new GetObjectCommand(factHandle);
    }
View Full Code Here

    public Calendars getCalendars() {
        return commandService.execute( new GetCalendarsCommand() );
    }

    public Object getObject(FactHandle factHandle) {
        return commandService.execute( new GetObjectCommand( factHandle ) );
    }
View Full Code Here

    public Calendars getCalendars() {
        return commandService.execute( new GetCalendarsCommand() );
    }

    public Object getObject(FactHandle factHandle) {
        return commandService.execute( new GetObjectCommand( factHandle ) );
    }
View Full Code Here

                             List<Setter> setters) {
        return new ModifyCommand(factHandle, setters);
    }

    public Command newGetObject(FactHandle factHandle) {
        return new GetObjectCommand(factHandle);
    }
View Full Code Here

    public Command newGetObject(FactHandle factHandle) {
        return new GetObjectCommand(factHandle);
    }

    public Command newGetObject(FactHandle factHandle, String outIdentifier) {
        return new GetObjectCommand(factHandle, outIdentifier);
    }
View Full Code Here

    }

    @Test
    public void testSessionGetObject() throws Exception {
        FactHandle factHandle = new DefaultFactHandle( handle );
        GetObjectCommand cmd = (GetObjectCommand) CommandFactory.newGetObject( factHandle );
        cmd.setOutIdentifier( "rider" );

        ExecutionResults response = (ExecutionResults) template.requestBody( "direct:test-with-session",
                                                                             cmd );
        assertTrue( "Expected valid ExecutionResults object",
                    response != null );
View Full Code Here

    public Calendars getCalendars() {
        return commandService.execute( new GetCalendarsCommand() );
    }

    public Object getObject(FactHandle factHandle) {
        return commandService.execute( new GetObjectCommand( factHandle ) );
    }
View Full Code Here

    public Globals getGlobals() {
        return commandService.execute( new GetGlobalsCommand() );
    }

    public Object getObject(FactHandle factHandle) {
        return commandService.execute( new GetObjectCommand( factHandle ) );
    }
View Full Code Here

TOP

Related Classes of org.drools.command.runtime.rule.GetObjectCommand

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.