KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > pci > model > Portlet


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.portletcontainer.pci.model;
6
7 import java.util.ArrayList JavaDoc;
8 import java.util.List JavaDoc;
9 import org.exoplatform.Constants;
10
11 /**
12  * Jul 11, 2004
13  * @author: Tuan Nguyen
14  * @email: tuan08@users.sourceforge.net
15  * @version: $Id: Portlet.java,v 1.1 2004/07/13 02:31:13 tuan08 Exp $
16  */

17 public class Portlet {
18     private List JavaDoc description;
19     private String JavaDoc portletName;
20     private List JavaDoc displayName = new ArrayList JavaDoc() ;
21     private String JavaDoc portletClass;
22     private List JavaDoc initParam;
23     private String JavaDoc expirationCache;
24     private List JavaDoc supports;
25     private List JavaDoc supportedLocale;
26     private String JavaDoc resourceBundle;
27     private PortletInfo portletInfo;
28     private ExoPortletPreferences portletPreferences;
29     private List JavaDoc securityRoleRef;
30     //exo extension
31
private List JavaDoc filter;
32     private List JavaDoc messageListener;
33     private String JavaDoc globalCache;
34     private String JavaDoc id;
35
36     public List JavaDoc getDescription() {
37     if(description == null) return Constants.EMPTY_LIST ;
38         return description;
39     }
40
41   public String JavaDoc getDescription(String JavaDoc lang) {
42     return Util.getDescription(lang, description) ;
43   }
44   
45     public void setDescription(List JavaDoc description) {
46         this.description = description;
47     }
48     
49   public void addDescription(Description desc) {
50     if(description == null) description = new ArrayList JavaDoc() ;
51     this.description.add(desc) ;
52   }
53   
54     public List JavaDoc getDisplayName() {
55         return displayName;
56     }
57   
58   public void addDisplayName(DisplayName name) {
59     this.displayName.add(name) ;
60   }
61
62     public void setDisplayName(List JavaDoc displayName) {
63         this.displayName = displayName;
64     }
65
66     public String JavaDoc getExpirationCache() {
67         return expirationCache;
68     }
69
70     public void setExpirationCache(String JavaDoc expirationCache) {
71         this.expirationCache = expirationCache;
72     }
73
74     public List JavaDoc getFilter() {
75     if(filter == null) return Constants.EMPTY_LIST ;
76         return filter;
77     }
78
79     public void setFilter(List JavaDoc filter) {
80         this.filter = filter;
81     }
82
83   public void addFilter(Filter f) {
84    if(filter == null) filter = new ArrayList JavaDoc();
85    this.filter.add(f) ;
86   }
87   
88     public String JavaDoc getGlobalCache() {
89         return globalCache;
90     }
91
92     public void setGlobalCache(String JavaDoc globalCache) {
93         this.globalCache = globalCache;
94     }
95
96     public String JavaDoc getId() {
97         return id;
98     }
99
100     public void setId(String JavaDoc id) {
101         this.id = id;
102     }
103
104     public List JavaDoc getInitParam() {
105     if(initParam == null) return Constants.EMPTY_LIST ;
106         return initParam;
107     }
108
109     public void setInitParam(List JavaDoc initParam) {
110         this.initParam = initParam;
111     }
112   
113   public void addInitParam(InitParam param) {
114     if(initParam == null) initParam = new ArrayList JavaDoc() ;
115     this.initParam.add(param) ;
116   }
117
118     public List JavaDoc getMessageListener() {
119     if(messageListener == null) return Constants.EMPTY_LIST ;
120         return messageListener;
121     }
122
123     public void setMessageListener(List JavaDoc messageListener) {
124         this.messageListener = messageListener;
125     }
126
127   public void addMessageListener(MessageListener m) {
128     if(messageListener == null) messageListener = new ArrayList JavaDoc() ;
129     this.messageListener.add(m);
130   }
131   
132     public String JavaDoc getPortletClass() {
133         return portletClass;
134     }
135
136     public void setPortletClass(String JavaDoc portletClass) {
137         this.portletClass = portletClass;
138     }
139
140     public PortletInfo getPortletInfo() {
141         return portletInfo;
142     }
143
144     public void setPortletInfo(PortletInfo portletInfo) {
145         this.portletInfo = portletInfo;
146     }
147
148     public String JavaDoc getPortletName() {
149         return portletName;
150     }
151
152     public void setPortletName(String JavaDoc portletName) {
153         this.portletName = portletName;
154     }
155
156     public ExoPortletPreferences getPortletPreferences() {
157         return portletPreferences;
158     }
159
160     public void setPortletPreferences(ExoPortletPreferences portletPreferences) {
161         this.portletPreferences = portletPreferences;
162     }
163
164     public String JavaDoc getResourceBundle() {
165         return resourceBundle;
166     }
167
168     public void setResourceBundle(String JavaDoc resourceBundle) {
169         this.resourceBundle = resourceBundle;
170     }
171
172     public List JavaDoc getSecurityRoleRef() {
173     if(securityRoleRef == null) return Constants.EMPTY_LIST ;
174         return securityRoleRef;
175     }
176
177     public void setSecurityRoleRef(List JavaDoc securityRoleRef) {
178         this.securityRoleRef = securityRoleRef;
179     }
180   
181   public void addSecurityRoleRef(SecurityRoleRef ref) {
182    if(securityRoleRef == null ) securityRoleRef = new ArrayList JavaDoc() ;
183    this.securityRoleRef.add(ref) ;
184   }
185
186     public List JavaDoc getSupportedLocale() {
187     if(supportedLocale == null) return Constants.EMPTY_LIST ;
188         return supportedLocale;
189     }
190
191     public void setSupportedLocale(List JavaDoc supportedLocale) {
192         this.supportedLocale = supportedLocale;
193     }
194     
195   public void addSupportedLocale(String JavaDoc value) {
196    if(supportedLocale == null) supportedLocale = new ArrayList JavaDoc() ;
197    this.supportedLocale.add(value) ;
198   }
199   
200     public List JavaDoc getSupports() {
201     if(supports == null) return Constants.EMPTY_LIST ;
202         return supports;
203     }
204
205     public void setSupports(List JavaDoc supports) {
206         this.supports = supports;
207     }
208   
209   public void addSupports(Supports s) {
210     if(supports == null) this.supports = new ArrayList JavaDoc() ;
211     this.supports.add(s) ;
212   }
213 }
Popular Tags