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