KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > action > CompositeAction


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.action;
18
19 import java.util.List JavaDoc;
20
21 /**
22  * Composite action
23  *
24  * @author Roy Wetherall
25  */

26 public interface CompositeAction extends Action
27 {
28     /**
29      * Indicates whether there are any actions
30      *
31      * @return true if there are actions, false otherwise
32      */

33     boolean hasActions();
34     
35     /**
36      * Add an action to the end of the list
37      *
38      * @param action the action
39      */

40     void addAction(Action action);
41     
42     /**
43      * Add an action to the list at the index specified
44      *
45      * @param index the index
46      * @param action the action
47      */

48     void addAction(int index, Action action);
49     
50     /**
51      * Replace the action at the specfied index with the passed action.
52      *
53      * @param index the index
54      * @param action the action
55      */

56     void setAction(int index, Action action);
57     
58     /**
59      * Gets the index of an action
60      *
61      * @param action the action
62      * @return the index
63      */

64     int indexOfAction(Action action);
65     
66     /**
67      * Get list containing the actions in their current order
68      *
69      * @return the list of actions
70      */

71     List JavaDoc<Action> getActions();
72     
73     /**
74      * Get an action at a given index
75      *
76      * @param index the index
77      * @return the action
78      */

79     Action getAction(int index);
80     
81     /**
82      * Remove an action from the list
83      *
84      * @param action the action
85      */

86     void removeAction(Action action);
87     
88     /**
89      * Remove all actions from the list
90      */

91     void removeAllActions();
92 }
93
Popular Tags