KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > solution > ISolutionEngine


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * @created Jun 17, 2005
14  * @author James Dixon
15  *
16  */

17
18 package org.pentaho.core.solution;
19
20 import java.util.Map JavaDoc;
21 import java.util.List JavaDoc;
22
23 import org.pentaho.core.runtime.IRuntimeContext;
24 import org.pentaho.core.session.IPentahoSession;
25 import org.pentaho.core.ui.IPentahoUrlFactory;
26 import org.pentaho.util.logging.*;
27
28 /**
29  * The Solution Engine handles loading and launching execution of solutions and
30  * action sequences. There is one solution engine per request, which can launch
31  * one or more action sequences.
32  */

33 public interface ISolutionEngine extends ILogger {
34
35     /**
36      * Sets the source for input parameters.
37      *
38      * @param name
39      * name to give to this provider
40      * @param parameterProvider
41      * instance of a provider
42      * @see org.pentaho.core.solution.IParameterProvider
43      */

44     public void setParameterProvider(String JavaDoc name, IParameterProvider parameterProvider);
45
46     /**
47      * Executes the action sequence specified in the manner described in the
48      * parameters
49      *
50      * @param solutionName
51      * the name at the root level of the solution path
52      * @param actionPath
53      * the path relative to the solutionName that will lead to the
54      * requested action
55      * @param actionName
56      * name of the action sequence document
57      * @param processId
58      * id for the given action sequence document
59      * @param async
60      * synchronous(false) or asynchronous(true) execution (not
61      * currently used)
62      * @param instanceId
63      * id to be handed to the runtime repository
64      * @param persisted
65      * if true, store runtime data, otherwise do not
66      * @param parameterProviderMap
67      * group of ParameterProviders, sources for inout parameters
68      * @param outputHandler
69      * handler used to query for addition parameters
70      * @param listener
71      * object notified on completion of action sequences
72      * @param urlFactory
73      * factory for building urls
74      * @param messages
75      * list into which debug, info, warning, and errors messages will
76      * be added
77      * @return IRuntimeContext the RuntimeContext associated with this action
78      * sequence execution
79      *
80      * @see org.pentaho.core.runtime.IRuntimeContext
81      */

82     public IRuntimeContext execute(String JavaDoc solutionName, String JavaDoc actionPath, String JavaDoc actionName, String JavaDoc processId, boolean async, boolean instanceEnds, String JavaDoc instanceId, boolean persisted, Map JavaDoc parameterProviderMap, IOutputHandler outputHandler,
83             IActionCompleteListener listener, IPentahoUrlFactory urlFactory, List JavaDoc messages);
84
85     /**
86      * Executes the action sequence specified
87      * @param runtime The runtime context for the execution
88      * @param solutionName Name of the solution
89      * @param sequencePath path to the solution
90      * @param sequenceName name of the action sequence
91      * @param processId id for the given process, typically a GUID or unique id for this execution
92      * @param async true if the execution should be asynchronous.
93      * @param instanceEnds currently true indicating that the process ends with this execution
94      * @param parameterProviderMap Map of parameter providers to use for the execution
95      * @param outputHandler The output handler for dealing with user feedback
96      * @return The runtime context for the execution
97      * @see IRuntimeContext
98      * @see IParameterProvider
99      * @see IActionSequence
100      */

101     public IRuntimeContext execute(IRuntimeContext runtime, String JavaDoc solutionName, String JavaDoc sequencePath, String JavaDoc sequenceName, String JavaDoc processId, boolean async, boolean instanceEnds, Map JavaDoc parameterProviderMap, IOutputHandler outputHandler);
102
103     /**
104      * Sets the action complete listener which will be called when the action is complete
105      * @param listener Listener to call back when execution is complete.
106      */

107     public void setlistener(IActionCompleteListener listener);
108
109     /**
110      * Sets the session in the solution engine
111      * @param session The session for this execution
112      */

113     public void setSession(IPentahoSession session);
114
115     /**
116      * @return the runtime context being used for this execution.
117      */

118     public IRuntimeContext getExecutionContext();
119
120     /**
121      * @return Gets the current status from this execution
122      */

123     public int getStatus();
124
125     /**
126      * Initialize the SolutionEngine. This method should be called immediately
127      * after object construction, and if solution engines are re-used among different
128      * IPentahoSessions to bind the solution engine to the session.
129      *
130      * @param session
131      * the session context for this SolutionEngine
132      */

133     public void init(IPentahoSession session);
134     
135     /**
136      * Sets if the promp page should be forced
137      * @param status
138      */

139     public void setForcePrompt( boolean forcePrompt );
140
141     /**
142      * Sets the xsl file to be used to generate the parameter page for the
143      * current component. The parameter should be a full path from the solution
144      * root starting with a /, or it should be a path relative to the directory
145      * of the current action sequence.
146      *
147      * @param xsl
148      * The name of the XSL file
149      */

150     public void setParameterXsl(String JavaDoc xsl);
151
152 }
153
Popular Tags