KickJava   Java API By Example, From Geeks To Geeks.

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


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 Jul 18, 2005
14  * @author James Dixon
15  *
16  */

17 package org.pentaho.core.solution;
18
19 import java.util.Map JavaDoc;
20
21 /**
22  * The SequenceDefinition represents the definition of several consecutive
23  * action definitions that comprise an ActionSequence object, which is the
24  * runtime equivalent of an action sequence document.
25  * <p>
26  * A SequenceDefinition can contain one to many ActionDefinitions that, when
27  * executed by their constituent Components, flow automatically from one
28  * ActionDefinition to the next.
29  *
30  */

31 public interface ISequenceDefinition {
32
33     /**
34      * return code indicating a valid SequenceDefinition
35      */

36     public static final int ACTION_SEQUENCE_DEFINITION_OK = 0;
37
38     /**
39      * return code indicating a problem with the action sequences's XML
40      */

41     public static final int ACTION_SEQUENCE_DEFINITION_INVALID_XML = 1;
42
43     /**
44      * return code indicating an action document that does validate against the
45      * action document schema
46      */

47     public static final int ACTION_SEQUENCE_DEFINITION_INVALID_ACTION_DOC = 2;
48
49     /**
50      * result-type value indicating the action should be not be displayed to
51      * users during navigation
52      */

53     public static final String JavaDoc RESULT_TYPE_NONE = "none"; //$NON-NLS-1$
54

55     /**
56      * result-type value indicating the action should be be displayed as a
57      * report to users during navigation
58      */

59     public static final String JavaDoc RESULT_TYPE_REPORT = "report"; //$NON-NLS-1$
60

61     /**
62      * result-type value indicating the action should be be displayed as a
63      * business rule to users during navigation
64      */

65     public static final String JavaDoc RESULT_TYPE_RULE = "rule"; //$NON-NLS-1$
66

67     /**
68      * result-type value indicating the action should be be displayed as a
69      * process to users during navigation
70      */

71     public static final String JavaDoc RESULT_TYPE_PROCESS = "process"; //$NON-NLS-1$
72

73     /**
74      * Returns a Map of the input parameters that are defined to this
75      * SequenceDefinition. These inputs are part of the contract between this
76      * sequence definition and the platform subsystems, ie., the runtime
77      * context.
78      *
79      * @return Map of input parameters. Parameters take the name-value form.
80      */

81     public Map JavaDoc getInputDefinitions();
82
83     /**
84      * Returns a Map of the input parameters that are defined to this
85      * SequenceDefinition for a specific parameter provider. For example the input
86      * named "REGION" may come from a request parameter named "regn" Calling this
87      * method passing in "request" for the parameterproviderName will return a map that
88      * includes an entry with the key "regn" mapped to the "REGION" IActionParameter.
89      *
90      * @param parameterProviderName The name of the parameter provider e.g. "request", "session", "global"...
91      *
92      * @return Map of input parameters. Parameters take the name-value form.
93      */

94     public Map JavaDoc getInputDefinitionsForParameterProvider( String JavaDoc parameterProviderName );
95     
96     /**
97      * Returns a Map of the output parameters that are defined to this
98      * SequenceDefinition. These outputs are part of the contract between this
99      * sequence definition and the platform subsystems, ie., the runtime
100      * context.
101      *
102      * @return Map of output parameters. Parameters take the name-value
103      * form.
104      */

105     public Map JavaDoc getOutputDefinitions();
106
107     /**
108      * Returns the sequence's resource definitions as a Map. Resources are
109      * elements that exist outside of the action sequence document, such as
110      * images, icons, additional definition documents, etc.
111      *
112      * @return Map of resource parameters. Parameters take the name-value
113      * form.
114      */

115     public Map JavaDoc getResourceDefinitions();
116
117     /**
118      * Returns the document name of the action sequence document that this
119      * SequenceDefinition came from.
120      *
121      * @return the action sequence document name
122      */

123     public String JavaDoc getSequenceName();
124
125     /**
126      * Returns the type of the overall result of executing the action sequence
127      * document that this SequenceDefinition came from. For example if the
128      * sequence results in the generation of a report the result type for the
129      * sequence should be RESULT_TYPE_REPORT. This property is used to select
130      * icons to show next to the sequence name when users navigate the available
131      * actions. Tif this returns RESULT_TYPE_NONE, empty string or null, the
132      * action sequence will not be visible to users as they navigate
133      *
134      * @return the action sequence result type
135      */

136     public String JavaDoc getResultType();
137
138     /**
139      * Returns the author of the SequenceDefinition, if defined, or null
140      * otherwise.
141      *
142      * @return this definition's author, or null if not defined.
143      */

144     public String JavaDoc getAuthor();
145
146     /**
147      * Returns the description of this SequenceDefinition, if defined, or null
148      * otherwise.
149      *
150      * @return this definition's description, or null if not defined.
151      */

152     public String JavaDoc getDescription();
153
154     /**
155      * Returns the URL to the Help page for this definition.
156      *
157      * @return the definition's Help URL
158      */

159     public String JavaDoc getHelp();
160
161     /**
162      * Returns the title of this SequenceDefinition, if defined, or null
163      * otherwise.
164      *
165      * @return this definition's title, or null if not defined.
166      */

167     public String JavaDoc getTitle();
168
169     /**
170      * Returns the solution name, which is the name at the root level of the
171      * solution path.
172      *
173      * @return the name of the root level of this definition's solution
174      */

175     public String JavaDoc getSolutionName();
176
177     /**
178      * Returns the path relative to the solution name that will lead to this
179      * definition
180      *
181      * @return the solution path to this definition
182      */

183     public String JavaDoc getSolutionPath();
184
185     /**
186      * Get the logging level for this SequenceDefinition. The logging level may
187      * be set independently or may be inherited from a parent object's logging
188      * level.
189      *
190      * @return this SequenceDefinition's logging level
191      *
192      * @see org.pentaho.util.logging.ILogger
193      */

194     public int getLoggingLevel();
195
196     /**
197      * Returns the path to the icon for this SequenceDefinition. The path can be
198      * relative or absolute In the pre-configured install these paths are URLs
199      * of the form /style/icons/iconname.png This path is used by the navigation
200      * XSL to generate the navigation user interface. If this property is not
201      * set a generic icon is used.
202      *
203      * @return the url to the icon
204      */

205     public String JavaDoc getIcon();
206
207
208 }
209
Popular Tags