Package org.pentaho.platform.api.action

Examples of org.pentaho.platform.api.action.IAction


    }
    return cg;
  }

  public IAction getAction( String type, String perspectiveName ) {
    IAction action = null;
    String beanId = ( perspectiveName == null ) ? type : type + "." + perspectiveName; //$NON-NLS-1$
    try {
      action = (IAction) getBean( beanId, IAction.class );
    } catch ( NoSuchBeanDefinitionException e ) {
      // fallback condition, look for a type agnostic content generator
View Full Code Here


      throw new LoggingJobExecutionException( Messages.getInstance().getErrorString(
          "ActionAdapterQuartzJob.ERROR_0003_ACTION_WRONG_TYPE", actionClass.getName(), //$NON-NLS-1$
          IAction.class.getName() ) );
    }

    final IAction actionBean = (IAction) bean;

    try {
      invokeAction( actionBean, actionUser, context, jobDataMap.getWrappedMap() );

    } catch ( Throwable t ) {
      // ensure that scheduler thread isn't blocked on lock
      synchronized ( lock ) {
        lock.notifyAll();
      }

      // We should not distinguish between checked and unchecked exceptions here. All job execution failures
      // should result in a rethrow of a quartz exception
      throw new LoggingJobExecutionException( Messages.getInstance().getErrorString(
          "ActionAdapterQuartzJob.ERROR_0004_ACTION_FAILED", actionBean //$NON-NLS-1$
              .getClass().getName() ), t );
    }
  }
View Full Code Here

  }

  @Test
  public void testSetValue() throws Exception {
    IAction action = new TestVarArgsAction();
    ActionHarness harness = new ActionHarness( action );
    harness.setValue( "message", "test message" );

    Assert.assertEquals( "test message", harness.getValue( "message" ) );
  }
View Full Code Here

    return addJob( blockOutJobTrigger, IBlockoutManager.BLOCK_OUT_JOB_NAME, new BlockoutAction(), jobParams );
  }

  private Job addJob( IJobTrigger jobTrigger, String jobName ) throws Exception {
    return addJob( jobTrigger, jobName, new IAction() {
      @Override
      public void execute() throws Exception {
      }
    }, new HashMap<String, Serializable>() );
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.action.IAction

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.