01: /*
02: * Copyright 2006 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * 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.services;
19:
20: import org.pentaho.core.runtime.IRuntimeContext;
21:
22: import java.util.List;
23:
24: /**
25: * The basic interface for requests to execute actions .
26: * @author mbatchel
27: *
28: */
29:
30: public interface IActionRequestHandler {
31:
32: /**
33: * Responsible for executing the action using the solution engine.
34: * @param timeout Timeout for the execution - currently ignored in the Base
35: * @param timeoutType - currently ignored in the Base
36: * @return RuntimeContext from the execution
37: * @see BaseRequestHandler
38: */
39: public IRuntimeContext handleActionRequest(int timeout,
40: int timeoutType);
41:
42: /**
43: * Executes an action sequence asynchronously.
44: * Note - this is currently not implemented in the BaseRequestHandler
45: * @return RuntimeContext created for the asynchronous execution.
46: */
47: public IRuntimeContext handleActionAsyncRequest();
48:
49: /**
50: * Gets the runtime. Currently not called anywhere in the platform
51: * @param requestHandle
52: * @return the RuntimeContext for the execution
53: */
54: public IRuntimeContext getRuntime(String requestHandle);
55:
56: /**
57: * As the execution happens, the action handler is responsible for storing
58: * a list of all the messages that occur in the case of component failure.
59: * This method returns that list. The items in the list are presented to the
60: * user as execution feedback.
61: * @return list of messages
62: */
63: public List getMessages();
64:
65: /**
66: * Sets whether to force the generation of a prompt page
67: * @param forcePrompt
68: */
69: public void setForcePrompt(boolean forcePrompt);
70: }
|