RuntimeContext extends PentahoMessenger implements IRuntimeContext { public void promptNeeded() { if ( promptStatus < IRuntimeContext.PROMPT_WAITING ) { promptStatus = IRuntimeContext.PROMPT_WAITING; } } RuntimeContext( final String instanceId, final ISolutionEngine solutionEngine, final String solutionName,
      final IRuntimeElement runtimeData, final IPentahoSession session, final IOutputHandler outputHandler,
      final String processId, final IPentahoUrlFactory urlFactory, final Map parameterProviders, final List messages,
      ICreateFeedbackParameterCallback createFeedbackParameterCallback ); @Override Log getLogger(); String createNewInstance( final boolean persisted ); String createNewInstance( final boolean persisted, final Map parameters ); String createNewInstance( final boolean persisted, final Map parameters, final boolean forceImmediateWrite ); int getStatus(); void promptNow(); void promptNeeded(); boolean isPromptPending(); IPentahoUrlFactory getUrlFactory(); boolean feedbackAllowed(); IContentItem getFeedbackContentItem(); IContentItem getOutputItem( final String outputName, final String mimeType, final String extension ); IContentItem getOutputContentItem( final String mimeType ); IContentItem getOutputContentItem( final String outputName, final String mimeType ); String getHandle(); IPentahoSession getSession(); String getSolutionPath(); String getCurrentComponentName(); String getInstanceId(); int getErrorLevel(); void setActionSequence( final IActionSequence sequence ); void validateSequence( final String sequenceName, final IExecutionListener execListener ); IPentahoStreamSource getDataSource( final String parameterName ); void executeSequence( final IActionCompleteListener doneListener, final IExecutionListener execListener,
      final boolean async ); void setPromptStatus( final int status ); @SuppressWarnings( { "unchecked" } ) void executeSequence( final IActionSequence sequence, final IActionCompleteListener doneListener,
      final IExecutionListener execListener, final boolean async ); void dispose(); void dispose( final List actionParameters ); String getStringParameter( final String name, final String defaultValue ); Object getInputParameterValue( final String name ); String getInputParameterStringValue( final String name ); IActionParameter getInputParameter( final String name ); IActionParameter getOutputParameter( final String name ); IActionSequenceResource getResourceDefintion( final String name ); Set getInputNames(); void addTempParameter( final String name, final IActionParameter param ); void setOutputValue( final String name, final Object output ); InputStream getInputStream( final String parameterName ); Set getOutputNames(); Set getResourceNames(); InputStream getResourceInputStream( final IActionSequenceResource actionResource ); String getResourceAsString( final IActionSequenceResource actionResource ); Document getResourceAsDocument( final IActionSequenceResource actionResource ); IPentahoStreamSource getResourceDataSource( final IActionSequenceResource actionResource ); String getId(); String getProcessId(); String getActionName(); String getActionTitle(); void audit( final List auditList ); void audit( final String messageType, final String message, final String value, final long duration ); void addInputParameter( final String name, final IActionParameter param ); String applyInputsToFormat( final String format ); String applyInputsToFormat( final String format, final IParameterResolver resolver ); void sendFeedbackForm(); @Deprecated void createFeedbackParameter( final IActionParameter actionParam ); void createFeedbackParameter( final ISelectionMapper selMap, final String fieldName,
                             final Object defaultValues ); void createFeedbackParameter( final ISelectionMapper selMap, final String fieldName,
      final Object defaultValues, final boolean optional ); void createFeedbackParameter( final String fieldName, final String displayName, final String hint,
      final Object defaultValues, final List values, final Map dispNames, final String displayStyle ); void createFeedbackParameter( String fieldName, final String displayName, String hint, Object defaultValues,
      final List values, final Map dispNames, final String displayStyle, final boolean optional ); boolean checkForFieldInTemplate( final String fieldName ); void createFeedbackParameter( final String fieldName, final String displayName, final String hint,
      final Object defaultValue, final boolean visible ); void createFeedbackParameter( String fieldName, final String displayName, String hint, Object defaultValue,
      final boolean visible, final boolean optional ); void setParameterXsl( final String xsl ); void setParameterTarget( final String target ); @Override String getLogId(); void forceSaveRuntimeData(); int getOutputPreference(); void setOutputHandler( final IOutputHandler outputHandler ); IActionSequence getActionSequence(); IParameterManager getParameterManager(); Map getParameterProviders(); void setCreateFeedbackParameterCallback( ICreateFeedbackParameterCallback callback ); @Override List<IContentItem> getOutputContentItems(); static final boolean debug; }
@Test public void testPromptNeeded() throws Exception { runtimeCtx.setPromptStatus( IRuntimeContext.PROMPT_NO ); Assert.assertFalse( runtimeCtx.isPromptPending() ); runtimeCtx.promptNeeded(); Assert.assertTrue( runtimeCtx.isPromptPending() ); }