KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > commands > CompositeResult


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under GPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.commands;
12
13 import java.util.Iterator JavaDoc;
14 import java.util.LinkedList JavaDoc;
15 import java.util.List JavaDoc;
16
17 import org.jboss.portal.common.command.result.Result;
18 import org.jboss.portal.common.command.result.ResultType;
19
20 /**
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @version $Revision: 1.2 $
23  */

24 public class CompositeResult
25    implements Result
26 {
27    private final List JavaDoc results = new LinkedList JavaDoc();
28
29    /**
30     * DOCUMENT_ME
31     *
32     * @param result DOCUMENT_ME
33     */

34    public void addResult(Result result)
35    {
36       results.add(result);
37    }
38
39    /**
40     * DOCUMENT_ME
41     *
42     * @return DOCUMENT_ME
43     */

44    public Iterator JavaDoc iterator()
45    {
46       return results.iterator();
47    }
48
49    /**
50     * DOCUMENT_ME
51     *
52     * @return DOCUMENT_ME
53     */

54    public ResultType getType()
55    {
56       return CommandConstants.TYPE_COMPOSITE;
57    }
58 }
Popular Tags