KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mr > core > util > patterns > flow > Declaration


1 package org.mr.core.util.patterns.flow;
2
3 import org.w3c.dom.Element JavaDoc;
4 import org.mr.core.util.exceptions.CreationException;
5
6 import java.util.Map JavaDoc;
7
8 /*
9  * Copyright 2002 by
10  * <a HREF="http://www.coridan.com">Coridan</a>
11  * <a HREF="mailto: support@coridan.com ">support@coridan.com</a>
12  *
13  * The contents of this file are subject to the Mozilla Public License Version
14  * 1.1 (the "License"); you may not use this file except in compliance with the
15  * License. You may obtain a copy of the License at
16  * http://www.mozilla.org/MPL/
17  *
18  * Software distributed under the License is distributed on an "AS IS" basis,
19  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
20  * for the specific language governing rights and limitations under the
21  * License.
22  *
23  * The Original Code is "MantaRay" (TM).
24  *
25  * The Initial Developer of the Original Code is Coridan.
26  * Portions created by the Initial Developer are Copyright (C) 2006
27  * Coridan Inc. All Rights Reserved.
28  *
29  * Contributor(s): all the names of the contributors are added in the source
30  * code where applicable.
31  *
32  * Alternatively, the contents of this file may be used under the terms of the
33  * LGPL license (the "GNU LESSER GENERAL PUBLIC LICENSE"), in which case the
34  * provisions of LGPL are applicable instead of those above. If you wish to
35  * allow use of your version of this file only under the terms of the LGPL
36  * License and not to allow others to use your version of this file under
37  * the MPL, indicate your decision by deleting the provisions above and
38  * replace them with the notice and other provisions required by the LGPL.
39  * If you do not delete the provisions above, a recipient may use your version
40  * of this file under either the MPL or the GNU LESSER GENERAL PUBLIC LICENSE.
41  
42  *
43  * This library is free software; you can redistribute it and/or modify it
44  * under the terms of the MPL as stated above or under the terms of the GNU
45  * Lesser General Public License as published by the Free Software Foundation;
46  * either version 2.1 of the License, or any later version.
47  *
48  * This library is distributed in the hope that it will be useful, but WITHOUT
49  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
50  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
51  * License for more details.
52  */

53
54  /**
55  * User: Moti Tal
56  * Date: Mar 13, 2005
57  * Time: 10:37:20 AM
58  *
59  * The Decleration represent a task in the flow.
60  * The Decleration first should declare as a <declaration> nested at the <declerations> list.
61  * Each declaration should has a name attribute with unique value and class attribute with the implemented class name.
62  * (All tag name can be modify according to the application context. See ConfigurationLoader for more details).
63  * After sets the declaration it can be use as a step in the flow using it unique name.
64  */

65 public interface Declaration {
66
67     public final static String JavaDoc DECLARATION_TAG_NAME = "declaration";
68     public final static String JavaDoc DECLARATION_NAME_ATTR_NAME = "name";
69     public final static String JavaDoc DECLARATION_CLASS_ATTR_NAME = "class";
70     public final static String JavaDoc DECLARATION_INPUT_AOUTPUT_PARAM_ATTR_NAME = "variable";
71 // public final static String DECLARATION_ENTRYPOINT_ATTR_NAME = "entry-point";
72

73      /**
74       * Configure the declaration using the declaration element.
75       * @param i_element the declaration element
76       * @throws CreationException when configue task failed
77       */

78     public void configure(Element JavaDoc i_element) throws CreationException;
79     /**
80      * Takes inputs in the form of a HashMap and return the outputs as another HashMap
81      * @param i_params parameters from the previous Declaration
82      * @return the uptodate parameters.
83      */

84     public Map JavaDoc execute(Map JavaDoc i_params);
85
86 }
87
Popular Tags