KickJava   Java API By Example, From Geeks To Geeks.

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


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.*;
21 import org.dom4j.Node;
22 import org.pentaho.core.component.IComponent;
23
24 /**
25  * The ActionDefinition represents the definition and metadata for a single
26  * action execution, which is equivalent to one execution of any given
27  * Component.
28  * <p>
29  * The ActionDefinition is derived from the solution's action sequence document.
30  * One ActionDefinition is handed to the appropriate Component, and provides all
31  * the necessary inputs, outputs and resources for that Component to execute.
32  */

33 public interface IActionDefinition {
34
35     /**
36      * Returns a Map of the input parameters that are defined to this
37      * ActionDefinition.
38      *
39      * @return Map of input parameters. Parameters take the name-value form.
40      */

41     public Map getActionInputDefinitions();
42
43     /**
44      *
45      * Returns the name of the parameter that the passed in name is mapped to in
46      * the Action Sequence Document
47      *
48      * @param name
49      * String name of the parameter to get a mapping for
50      * @return String name of the parameter that 'name' is mapped to
51      */

52     public String JavaDoc getMappedInputName(String JavaDoc name);
53
54     /**
55      * Returns a <tt>Map</tt> of the output parameters that are defined for this
56      * ActionDefinition.
57      *
58      * @return <tt>Map</tt> of output parameters. Parameters take the name-value
59      * form.
60      */

61     public Map getActionOutputDefinitions();
62
63     /**
64      *
65      * Returns the name of the parameter that the passed in name is mapped to in
66      * the Action Sequence Document
67      *
68      * @param name
69      * String name of the parameter to get a mapping for
70      * @return String name of the parameter that 'name' is mapped to
71      */

72     public String JavaDoc getMappedOutputName(String JavaDoc name);
73
74     /**
75      * Returns a <tt>List</tt> of the resource parameter names that are defined for this
76      * ActionDefinition.
77      *
78      * @return <tt>List</tt> of resource parameter names.
79      */

80     public List getActionResourceDefinitionNames();
81     
82     public boolean hasActionResources();
83
84     /**
85      *
86      * Returns the name of the parameter that the passed in name is mapped to in
87      * the Action Sequence Document
88      *
89      * @param name
90      * String name of the parameter to get a mapping for
91      * @return String name of the parameter that 'name' is mapped to
92      */

93     public String JavaDoc getMappedResourceName(String JavaDoc name);
94
95     /**
96      * Get the logging level for this ActionDefinition. The logging level may be
97      * set independently or may be inherited from a parent object's logging
98      * level.
99      *
100      * @return this ActionDefinition's logging level
101      * @see org.pentaho.util.logging.ILogger
102      */

103     public int getLoggingLevel();
104
105     /**
106      * Returns the list of input and output parameters that will be audited
107      * before component execution. This list is handed off to the auditing
108      * subsystem as metadata.
109      *
110      * @return <tt>List</tt> of parameters defined for pre-execution auditing
111      */

112     public List getPreExecuteAuditList();
113
114     /**
115      * Returns the list of input and output parameters that will be audited
116      * after component execution. This list is handed off to the auditing
117      * subsystem as metadata.
118      *
119      * @return <tt>List</tt> of parameters defined for post-execution auditing
120      */

121     public List getPostExecuteAuditList();
122
123     /**
124      * Returns boolean value regarding whether this action is set to execute
125      * synchronous or asynchronously.
126      *
127      * @return true, if set to asynchronous, false if set to synchronous
128      */

129     public boolean getSyncPreference();
130
131     /**
132      * Returns the Java class name of the Component that this ActionDefinition
133      * is created for.
134      *
135      * @return the Java class name of Component for this ActionDefinition
136      */

137     public String JavaDoc getComponentName();
138
139     /**
140      * Returns the Component definition portion of this ActionDefinition. The
141      * Component section typically describes that data and metadata that is
142      * relevant only to that particular component.
143      *
144      * @return the Component definition section of the ActionDefinition
145      */

146     public Node getComponentSection();
147
148     /**
149      * Returns the Component object that this ActionDefinition belongs to.
150      *
151      * @return the definition's Component object
152      */

153     public IComponent getComponent();
154
155     /**
156      * Returns the author of the ActionDefinition, if defined, or null
157      * otherwise.
158      *
159      * @return this definition's author, or null if not defined.
160      */

161     public String JavaDoc getAuthor();
162
163     /**
164      * Returns the description of the ActionDefinition, if defined, or null
165      * otherwise.
166      *
167      * @return this definition's description, or null if not defined.
168      */

169     public String JavaDoc getDescription();
170
171     /**
172      * Returns the URL to the Help page for this definition.
173      *
174      * @return the definition's Help URL
175      */

176     public String JavaDoc getHelp();
177
178     /**
179      * Returns the URL to the icon for this definition.
180      *
181      * @return the definition's icon URL
182      */

183     public String JavaDoc getIconUrl();
184
185     /**
186      * Sets the Component object that this definition will belong to. The
187      * component must be valid for this ActionDefinition, otherwise execution
188      * validation will fail.
189      *
190      * @param component
191      * the Component that is valid for this definiton.
192      */

193     public void setComponent(IComponent component);
194
195 }
196
Popular Tags