1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.pluto.descriptors.portlet;
17
18 import java.util.ArrayList;
19 import java.util.List;
20 import java.util.Iterator;
21
22 /***
23 * Portlet Application Configuration.
24 *
25 * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
26 * @version $Id: PortletAppDD.java 158816 2005-03-23 18:18:44Z ddewolf $
27 * @since Mar 6, 2005
28 */
29 public class PortletAppDD {
30
31 /*** The defined portlets within the system. */
32 private List portlets = new ArrayList();
33
34 /***
35 * Default Constructor.
36 */
37 public PortletAppDD() {
38 }
39
40 /***
41 * Retrieve the portlets which exist within this application.
42 * @return
43 */
44 public List getPortlets() {
45 return portlets;
46 }
47
48 /***
49 * Set the portlets that exist within this application.
50 * @param portlets
51 */
52 public void setPortlets(List portlets) {
53 this.portlets = portlets;
54 }
55
56
57
58 public PortletDD getPortlet(String name) {
59 ArrayList list = new ArrayList(portlets);
60 Iterator it = list.iterator();
61 PortletDD dd;
62 while(name != null && it.hasNext()) {
63 dd = (PortletDD)it.next();
64 if(name.equals(dd.getPortletName())) {
65 return dd;
66 }
67 }
68 return null;
69 }
70
71
72 }
73