1
14
15 package com.liferay.portal.model.impl;
16
17 import com.liferay.portal.kernel.job.Scheduler;
18 import com.liferay.portal.kernel.log.Log;
19 import com.liferay.portal.kernel.log.LogFactoryUtil;
20 import com.liferay.portal.kernel.plugin.PluginPackage;
21 import com.liferay.portal.kernel.poller.PollerProcessor;
22 import com.liferay.portal.kernel.pop.MessageListener;
23 import com.liferay.portal.kernel.portlet.ConfigurationAction;
24 import com.liferay.portal.kernel.portlet.FriendlyURLMapper;
25 import com.liferay.portal.kernel.portlet.PortletBag;
26 import com.liferay.portal.kernel.portlet.PortletBagPool;
27 import com.liferay.portal.kernel.portlet.PortletLayoutListener;
28 import com.liferay.portal.kernel.search.Indexer;
29 import com.liferay.portal.kernel.search.OpenSearch;
30 import com.liferay.portal.kernel.servlet.URLEncoder;
31 import com.liferay.portal.kernel.util.ContentTypes;
32 import com.liferay.portal.kernel.util.StringPool;
33 import com.liferay.portal.kernel.util.StringUtil;
34 import com.liferay.portal.kernel.util.Validator;
35 import com.liferay.portal.kernel.xml.QName;
36 import com.liferay.portal.lar.PortletDataHandler;
37 import com.liferay.portal.model.Plugin;
38 import com.liferay.portal.model.PluginSetting;
39 import com.liferay.portal.model.Portlet;
40 import com.liferay.portal.model.PortletApp;
41 import com.liferay.portal.model.PortletConstants;
42 import com.liferay.portal.model.PortletFilter;
43 import com.liferay.portal.model.PortletInfo;
44 import com.liferay.portal.model.PublicRenderParameter;
45 import com.liferay.portal.model.RoleConstants;
46 import com.liferay.portal.model.User;
47 import com.liferay.portal.service.RoleLocalServiceUtil;
48 import com.liferay.portal.service.UserLocalServiceUtil;
49 import com.liferay.portal.util.PortalUtil;
50 import com.liferay.portal.util.PropsValues;
51 import com.liferay.portal.webdav.WebDAVStorage;
52 import com.liferay.portlet.ControlPanelEntry;
53 import com.liferay.portlet.PortletBagImpl;
54 import com.liferay.portlet.PortletQNameUtil;
55 import com.liferay.portlet.social.model.SocialActivityInterpreter;
56 import com.liferay.portlet.social.model.SocialRequestInterpreter;
57
58 import java.util.ArrayList;
59 import java.util.Arrays;
60 import java.util.HashMap;
61 import java.util.HashSet;
62 import java.util.Hashtable;
63 import java.util.Iterator;
64 import java.util.LinkedHashMap;
65 import java.util.List;
66 import java.util.Map;
67 import java.util.Set;
68 import java.util.TreeSet;
69 import java.util.concurrent.ConcurrentHashMap;
70
71 import javax.portlet.PortletMode;
72 import javax.portlet.WindowState;
73
74
79 public class PortletImpl extends PortletModelImpl implements Portlet {
80
81
84 public PortletImpl() {
85 }
86
87
90 public PortletImpl(long companyId, String portletId) {
91 setCompanyId(companyId);
92 setPortletId(portletId);
93 setStrutsPath(portletId);
94 setActive(true);
95 _headerPortalCss = new ArrayList<String>();
96 _headerPortletCss = new ArrayList<String>();
97 _headerPortalJavaScript = new ArrayList<String>();
98 _headerPortletJavaScript = new ArrayList<String>();
99 _footerPortalCss = new ArrayList<String>();
100 _footerPortletCss = new ArrayList<String>();
101 _footerPortalJavaScript = new ArrayList<String>();
102 _footerPortletJavaScript = new ArrayList<String>();
103 _unlinkedRoles = new HashSet<String>();
104 _roleMappers = new LinkedHashMap<String, String>();
105 _initParams = new HashMap<String, String>();
106 _portletModes = new HashMap<String, Set<String>>();
107 _windowStates = new HashMap<String, Set<String>>();
108 _supportedLocales = new HashSet<String>();
109 _portletFilters = new LinkedHashMap<String, PortletFilter>();
110 _processingEvents = new HashSet<QName>();
111 _publishingEvents = new HashSet<QName>();
112 _publicRenderParameters = new HashSet<PublicRenderParameter>();
113 }
114
115
118 public PortletImpl(
119 String portletId, PluginPackage pluginPackage,
120 PluginSetting pluginSetting, long companyId, long timestamp,
121 String icon, String virtualPath, String strutsPath, String portletName,
122 String displayName, String portletClass,
123 String configurationActionClass, String indexerClass,
124 String openSearchClass, String schedulerClass, String portletURLClass,
125 String friendlyURLMapperClass, String urlEncoderClass,
126 String portletDataHandlerClass, String portletLayoutListenerClass,
127 String pollerProcessorClass, String popMessageListenerClass,
128 String socialActivityInterpreterClass,
129 String socialRequestInterpreterClass, String webDAVStorageToken,
130 String webDAVStorageClass, String controlPanelEntryCategory,
131 double controlPanelEntryWeight, String controlPanelClass,
132 String defaultPreferences, String preferencesValidator,
133 boolean preferencesCompanyWide, boolean preferencesUniquePerLayout,
134 boolean preferencesOwnedByGroup, boolean useDefaultTemplate,
135 boolean showPortletAccessDenied, boolean showPortletInactive,
136 boolean actionURLRedirect, boolean restoreCurrentView,
137 boolean maximizeEdit, boolean maximizeHelp, boolean popUpPrint,
138 boolean layoutCacheable, boolean instanceable, boolean scopeable,
139 String userPrincipalStrategy, boolean privateRequestAttributes,
140 boolean privateSessionAttributes, int renderWeight, boolean ajaxable,
141 List<String> headerPortalCss, List<String> headerPortletCss,
142 List<String> headerPortalJavaScript,
143 List<String> headerPortletJavaScript, List<String> footerPortalCss,
144 List<String> footerPortletCss, List<String> footerPortalJavaScript,
145 List<String> footerPortletJavaScript, String cssClassWrapper,
146 String facebookIntegration, boolean addDefaultResource, String roles,
147 Set<String> unlinkedRoles, Map<String, String> roleMappers,
148 boolean system, boolean active, boolean include,
149 Map<String, String> initParams, Integer expCache,
150 Map<String, Set<String>> portletModes,
151 Map<String, Set<String>> windowStates, Set<String> supportedLocales,
152 String resourceBundle, PortletInfo portletInfo,
153 Map<String, PortletFilter> portletFilters, Set<QName> processingEvents,
154 Set<QName> publishingEvents,
155 Set<PublicRenderParameter> publicRenderParameters,
156 PortletApp portletApp) {
157
158 setPortletId(portletId);
159 _pluginPackage = pluginPackage;
160 _defaultPluginSetting = pluginSetting;
161 setCompanyId(companyId);
162 _timestamp = timestamp;
163 _icon = icon;
164 _virtualPath = virtualPath;
165 _strutsPath = strutsPath;
166 _portletName = portletName;
167 _displayName = displayName;
168 _portletClass = portletClass;
169 _configurationActionClass = configurationActionClass;
170 _indexerClass = indexerClass;
171 _openSearchClass = openSearchClass;
172 _schedulerClass = schedulerClass;
173 _portletURLClass = portletURLClass;
174 _friendlyURLMapperClass = friendlyURLMapperClass;
175 _urlEncoderClass = urlEncoderClass;
176 _portletDataHandlerClass = portletDataHandlerClass;
177 _portletLayoutListenerClass = portletLayoutListenerClass;
178 _pollerProcessorClass = pollerProcessorClass;
179 _popMessageListenerClass = popMessageListenerClass;
180 _socialActivityInterpreterClass = socialActivityInterpreterClass;
181 _socialRequestInterpreterClass = socialRequestInterpreterClass;
182 _webDAVStorageToken = webDAVStorageToken;
183 _webDAVStorageClass = webDAVStorageClass;
184 _controlPanelEntryCategory = controlPanelEntryCategory;
185 _controlPanelEntryWeight = controlPanelEntryWeight;
186 _controlPanelEntryClass = controlPanelClass;
187 _defaultPreferences = defaultPreferences;
188 _preferencesValidator = preferencesValidator;
189 _preferencesCompanyWide = preferencesCompanyWide;
190 _preferencesUniquePerLayout = preferencesUniquePerLayout;
191 _preferencesOwnedByGroup = preferencesOwnedByGroup;
192 _useDefaultTemplate = useDefaultTemplate;
193 _showPortletAccessDenied = showPortletAccessDenied;
194 _showPortletInactive = showPortletInactive;
195 _actionURLRedirect = actionURLRedirect;
196 _restoreCurrentView = restoreCurrentView;
197 _maximizeEdit = maximizeEdit;
198 _maximizeHelp = maximizeHelp;
199 _popUpPrint = popUpPrint;
200 _layoutCacheable = layoutCacheable;
201 _instanceable = instanceable;
202 _scopeable = scopeable;
203 _userPrincipalStrategy = userPrincipalStrategy;
204 _privateRequestAttributes = privateRequestAttributes;
205 _privateSessionAttributes = privateSessionAttributes;
206 _renderWeight = renderWeight;
207 _ajaxable = ajaxable;
208 _headerPortalCss = headerPortalCss;
209 _headerPortletCss = headerPortletCss;
210 _headerPortalJavaScript = headerPortalJavaScript;
211 _headerPortletJavaScript = headerPortletJavaScript;
212 _footerPortalCss = footerPortalCss;
213 _footerPortletCss = footerPortletCss;
214 _footerPortalJavaScript = footerPortalJavaScript;
215 _footerPortletJavaScript = footerPortletJavaScript;
216 _cssClassWrapper = cssClassWrapper;
217 _facebookIntegration = facebookIntegration;
218 _scopeable = scopeable;
219 _addDefaultResource = addDefaultResource;
220 setRoles(roles);
221 _unlinkedRoles = unlinkedRoles;
222 _roleMappers = roleMappers;
223 _system = system;
224 setActive(active);
225 _include = include;
226 _initParams = initParams;
227 _expCache = expCache;
228 _portletModes = portletModes;
229 _windowStates = windowStates;
230 _supportedLocales = supportedLocales;
231 _resourceBundle = resourceBundle;
232 _portletInfo = portletInfo;
233 _portletFilters = portletFilters;
234 setProcessingEvents(processingEvents);
235 setPublishingEvents(publishingEvents);
236 setPublicRenderParameters(publicRenderParameters);
237 _portletApp = portletApp;
238
239 if (_instanceable) {
240 _clonedInstances = new Hashtable<String, Portlet>();
241 }
242 }
243
244
249 public String getRootPortletId() {
250 return PortletConstants.getRootPortletId(getPortletId());
251 }
252
253
258 public String getInstanceId() {
259 return PortletConstants.getInstanceId(getPortletId());
260 }
261
262
267 public String getPluginId() {
268 return getRootPortletId();
269 }
270
271
276 public String getPluginType() {
277 return Plugin.TYPE_PORTLET;
278 }
279
280
285 public PluginPackage getPluginPackage() {
286 return _pluginPackage;
287 }
288
289
294 public void setPluginPackage(PluginPackage pluginPackage) {
295 _pluginPackage = pluginPackage;
296 }
297
298
303 public PluginSetting getDefaultPluginSetting() {
304 return _defaultPluginSetting;
305 }
306
307
312 public void setDefaultPluginSetting(PluginSetting pluginSetting) {
313 _defaultPluginSetting = pluginSetting;
314 }
315
316
321 public long getTimestamp() {
322 return _timestamp;
323 }
324
325
330 public void setTimestamp(long timestamp) {
331 _timestamp = timestamp;
332 }
333
334
339 public String getIcon() {
340 return _icon;
341 }
342
343
348 public void setIcon(String icon) {
349 _icon = icon;
350 }
351
352
357 public String getVirtualPath() {
358 return _virtualPath;
359 }
360
361
366 public void setVirtualPath(String virtualPath) {
367 if (_portletApp.isWARFile() && Validator.isNull(virtualPath)) {
368 virtualPath = PropsValues.PORTLET_VIRTUAL_PATH;
369 }
370
371 _virtualPath = virtualPath;
372 }
373
374
379 public String getStrutsPath() {
380 return _strutsPath;
381 }
382
383
388 public void setStrutsPath(String strutsPath) {
389 _strutsPath = strutsPath;
390 }
391
392
397 public String getPortletName() {
398 return _portletName;
399 }
400
401
406 public void setPortletName(String portletName) {
407 _portletName = portletName;
408 }
409
410
415 public String getDisplayName() {
416 return _displayName;
417 }
418
419
424 public void setDisplayName(String displayName) {
425 _displayName = displayName;
426 }
427
428
433 public String getPortletClass() {
434 return _portletClass;
435 }
436
437
442 public void setPortletClass(String portletClass) {
443 _portletClass = portletClass;
444 }
445
446
451 public String getConfigurationActionClass() {
452 return _configurationActionClass;
453 }
454
455
461 public void setConfigurationActionClass(String configurationActionClass) {
462 _configurationActionClass = configurationActionClass;
463 }
464
465
470 public ConfigurationAction getConfigurationActionInstance() {
471 if (Validator.isNull(getConfigurationActionClass())) {
472 return null;
473 }
474
475 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
476
477 return portletBag.getConfigurationActionInstance();
478 }
479
480
485 public String getIndexerClass() {
486 return _indexerClass;
487 }
488
489
494 public void setIndexerClass(String indexerClass) {
495 _indexerClass = indexerClass;
496 }
497
498
503 public Indexer getIndexerInstance() {
504 if (Validator.isNull(getIndexerClass())) {
505 return null;
506 }
507
508 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
509
510 return portletBag.getIndexerInstance();
511 }
512
513
518 public String getOpenSearchClass() {
519 return _openSearchClass;
520 }
521
522
527 public void setOpenSearchClass(String openSearchClass) {
528 _openSearchClass = openSearchClass;
529 }
530
531
536 public OpenSearch getOpenSearchInstance() {
537 if (Validator.isNull(getOpenSearchClass())) {
538 return null;
539 }
540
541 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
542
543 return portletBag.getOpenSearchInstance();
544 }
545
546
551 public String getSchedulerClass() {
552 return _schedulerClass;
553 }
554
555
560 public void setSchedulerClass(String schedulerClass) {
561 _schedulerClass = schedulerClass;
562 }
563
564
569 public Scheduler getSchedulerInstance() {
570 if (Validator.isNull(getSchedulerClass())) {
571 return null;
572 }
573
574 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
575
576 return portletBag.getSchedulerInstance();
577 }
578
579
584 public String getPortletURLClass() {
585 return _portletURLClass;
586 }
587
588
593 public void setPortletURLClass(String portletURLClass) {
594 _portletURLClass = portletURLClass;
595 }
596
597
602 public String getFriendlyURLMapperClass() {
603 return _friendlyURLMapperClass;
604 }
605
606
612 public void setFriendlyURLMapperClass(String friendlyURLMapperClass) {
613 _friendlyURLMapperClass = friendlyURLMapperClass;
614 }
615
616
621 public FriendlyURLMapper getFriendlyURLMapperInstance() {
622 if (Validator.isNull(getFriendlyURLMapperClass())) {
623 return null;
624 }
625
626 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
627
628 return portletBag.getFriendlyURLMapperInstance();
629 }
630
631
636 public String getURLEncoderClass() {
637 return _urlEncoderClass;
638 }
639
640
645 public void setURLEncoderClass(String urlEncoderClass) {
646 _urlEncoderClass = urlEncoderClass;
647 }
648
649
654 public URLEncoder getURLEncoderInstance() {
655 if (Validator.isNull(getURLEncoderClass())) {
656 return null;
657 }
658
659 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
660
661 return portletBag.getURLEncoderInstance();
662 }
663
664
669 public String getPortletDataHandlerClass() {
670 return _portletDataHandlerClass;
671 }
672
673
679 public void setPortletDataHandlerClass(String portletDataHandlerClass) {
680 _portletDataHandlerClass = portletDataHandlerClass;
681 }
682
683
688 public PortletDataHandler getPortletDataHandlerInstance() {
689 if (Validator.isNull(getPortletDataHandlerClass())) {
690 return null;
691 }
692
693 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
694 getRootPortletId());
695
696 return portletBagImpl.getPortletDataHandlerInstance();
697 }
698
699
704 public String getPortletLayoutListenerClass() {
705 return _portletLayoutListenerClass;
706 }
707
708
714 public void setPortletLayoutListenerClass(
715 String portletLayoutListenerClass) {
716
717 _portletLayoutListenerClass = portletLayoutListenerClass;
718 }
719
720
725 public PortletLayoutListener getPortletLayoutListenerInstance() {
726 if (Validator.isNull(getPortletLayoutListenerClass())) {
727 return null;
728 }
729
730 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
731
732 return portletBag.getPortletLayoutListenerInstance();
733 }
734
735
740 public String getPollerProcessorClass() {
741 return _pollerProcessorClass;
742 }
743
744
750 public void setPollerProcessorClass(String pollerProcessorClass) {
751 _pollerProcessorClass = pollerProcessorClass;
752 }
753
754
759 public PollerProcessor getPollerProcessorInstance() {
760 if (Validator.isNull(getPollerProcessorClass())) {
761 return null;
762 }
763
764 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
765
766 return portletBag.getPollerProcessorInstance();
767 }
768
769
774 public String getPopMessageListenerClass() {
775 return _popMessageListenerClass;
776 }
777
778
784 public void setPopMessageListenerClass(String popMessageListenerClass) {
785 _popMessageListenerClass = popMessageListenerClass;
786 }
787
788
793 public MessageListener getPopMessageListenerInstance() {
794 if (Validator.isNull(getPopMessageListenerClass())) {
795 return null;
796 }
797
798 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
799
800 return portletBag.getPopMessageListenerInstance();
801 }
802
803
808 public String getSocialActivityInterpreterClass() {
809 return _socialActivityInterpreterClass;
810 }
811
812
818 public void setSocialActivityInterpreterClass(
819 String socialActivityInterpreterClass) {
820
821 _socialActivityInterpreterClass = socialActivityInterpreterClass;
822 }
823
824
830 public SocialActivityInterpreter getSocialActivityInterpreterInstance() {
831 if (Validator.isNull(getSocialActivityInterpreterClass())) {
832 return null;
833 }
834
835 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
836 getRootPortletId());
837
838 return portletBagImpl.getSocialActivityInterpreterInstance();
839 }
840
841
846 public String getSocialRequestInterpreterClass() {
847 return _socialRequestInterpreterClass;
848 }
849
850
856 public void setSocialRequestInterpreterClass(
857 String socialRequestInterpreterClass) {
858
859 _socialRequestInterpreterClass = socialRequestInterpreterClass;
860 }
861
862
868 public SocialRequestInterpreter getSocialRequestInterpreterInstance() {
869 if (Validator.isNull(getSocialRequestInterpreterClass())) {
870 return null;
871 }
872
873 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
874 getRootPortletId());
875
876 return portletBagImpl.getSocialRequestInterpreterInstance();
877 }
878
879
884 public String getWebDAVStorageToken() {
885 return _webDAVStorageToken;
886 }
887
888
894 public void setWebDAVStorageToken(String webDAVStorageToken) {
895 _webDAVStorageToken = webDAVStorageToken;
896 }
897
898
903 public String getWebDAVStorageClass() {
904 return _webDAVStorageClass;
905 }
906
907
913 public void setWebDAVStorageClass(String webDAVStorageClass) {
914 _webDAVStorageClass = webDAVStorageClass;
915 }
916
917
922 public WebDAVStorage getWebDAVStorageInstance() {
923 if (Validator.isNull(getWebDAVStorageClass())) {
924 return null;
925 }
926
927 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
928 getRootPortletId());
929
930 return portletBagImpl.getWebDAVStorageInstance();
931 }
932
933
940 public String getControlPanelEntryCategory() {
941 return _controlPanelEntryCategory;
942 }
943
944
951 public void setControlPanelEntryCategory(String controlPanelEntryCategory) {
952 _controlPanelEntryCategory = controlPanelEntryCategory;
953 }
954
955
962 public double getControlPanelEntryWeight() {
963 return _controlPanelEntryWeight;
964 }
965
966
974 public void setControlPanelEntryWeight(double controlPanelEntryWeight) {
975 _controlPanelEntryWeight = controlPanelEntryWeight;
976 }
977
978
985 public String getControlPanelEntryClass() {
986 return _controlPanelEntryClass;
987 }
988
989
996 public void setControlPanelEntryClass(String controlPanelEntryClass) {
997 _controlPanelEntryClass = controlPanelEntryClass;
998 }
999
1000
1007 public ControlPanelEntry getControlPanelEntryInstance() {
1008 if (Validator.isNull(getControlPanelEntryClass())) {
1009 return null;
1010 }
1011
1012 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
1013 getRootPortletId());
1014
1015 return portletBagImpl.getControlPanelEntryInstance();
1016 }
1017
1018
1023 public String getDefaultPreferences() {
1024 if (Validator.isNull(_defaultPreferences)) {
1025 return PortletConstants.DEFAULT_PREFERENCES;
1026 }
1027 else {
1028 return _defaultPreferences;
1029 }
1030 }
1031
1032
1037 public void setDefaultPreferences(String defaultPreferences) {
1038 _defaultPreferences = defaultPreferences;
1039 }
1040
1041
1046 public String getPreferencesValidator() {
1047 return _preferencesValidator;
1048 }
1049
1050
1056 public void setPreferencesValidator(String preferencesValidator) {
1057 if (preferencesValidator != null) {
1058
1059
1062 _preferencesValidator = preferencesValidator.trim();
1063 }
1064 else {
1065 _preferencesValidator = null;
1066 }
1067 }
1068
1069
1074 public boolean getPreferencesCompanyWide() {
1075 return _preferencesCompanyWide;
1076 }
1077
1078
1083 public boolean isPreferencesCompanyWide() {
1084 return _preferencesCompanyWide;
1085 }
1086
1087
1093 public void setPreferencesCompanyWide(boolean preferencesCompanyWide) {
1094 _preferencesCompanyWide = preferencesCompanyWide;
1095 }
1096
1097
1102 public boolean getPreferencesUniquePerLayout() {
1103 return _preferencesUniquePerLayout;
1104 }
1105
1106
1111 public boolean isPreferencesUniquePerLayout() {
1112 return _preferencesUniquePerLayout;
1113 }
1114
1115
1121 public void setPreferencesUniquePerLayout(
1122 boolean preferencesUniquePerLayout) {
1123
1124 _preferencesUniquePerLayout = preferencesUniquePerLayout;
1125 }
1126
1127
1136 public boolean getPreferencesOwnedByGroup() {
1137 return _preferencesOwnedByGroup;
1138 }
1139
1140
1149 public boolean isPreferencesOwnedByGroup() {
1150 return _preferencesOwnedByGroup;
1151 }
1152
1153
1162 public void setPreferencesOwnedByGroup(boolean preferencesOwnedByGroup) {
1163 _preferencesOwnedByGroup = preferencesOwnedByGroup;
1164 }
1165
1166
1171 public boolean getUseDefaultTemplate() {
1172 return _useDefaultTemplate;
1173 }
1174
1175
1180 public boolean isUseDefaultTemplate() {
1181 return _useDefaultTemplate;
1182 }
1183
1184
1190 public void setUseDefaultTemplate(boolean useDefaultTemplate) {
1191 _useDefaultTemplate = useDefaultTemplate;
1192 }
1193
1194
1201 public boolean getShowPortletAccessDenied() {
1202 return _showPortletAccessDenied;
1203 }
1204
1205
1212 public boolean isShowPortletAccessDenied() {
1213 return _showPortletAccessDenied;
1214 }
1215
1216
1223 public void setShowPortletAccessDenied(boolean showPortletAccessDenied) {
1224 _showPortletAccessDenied = showPortletAccessDenied;
1225 }
1226
1227
1232 public boolean getShowPortletInactive() {
1233 return _showPortletInactive;
1234 }
1235
1236
1241 public boolean isShowPortletInactive() {
1242 return _showPortletInactive;
1243 }
1244
1245
1251 public void setShowPortletInactive(boolean showPortletInactive) {
1252 _showPortletInactive = showPortletInactive;
1253 }
1254
1255
1262 public boolean getActionURLRedirect() {
1263 return _actionURLRedirect;
1264 }
1265
1266
1273 public boolean isActionURLRedirect() {
1274 return _actionURLRedirect;
1275 }
1276
1277
1284 public void setActionURLRedirect(boolean actionURLRedirect) {
1285 _actionURLRedirect = actionURLRedirect;
1286 }
1287
1288
1295 public boolean getRestoreCurrentView() {
1296 return _restoreCurrentView;
1297 }
1298
1299
1306 public boolean isRestoreCurrentView() {
1307 return _restoreCurrentView;
1308 }
1309
1310
1317 public void setRestoreCurrentView(boolean restoreCurrentView) {
1318 _restoreCurrentView = restoreCurrentView;
1319 }
1320
1321
1328 public boolean getMaximizeEdit() {
1329 return _maximizeEdit;
1330 }
1331
1332
1339 public boolean isMaximizeEdit() {
1340 return _maximizeEdit;
1341 }
1342
1343
1350 public void setMaximizeEdit(boolean maximizeEdit) {
1351 _maximizeEdit = maximizeEdit;
1352 }
1353
1354
1361 public boolean getMaximizeHelp() {
1362 return _maximizeHelp;
1363 }
1364
1365
1372 public boolean isMaximizeHelp() {
1373 return _maximizeHelp;
1374 }
1375
1376
1383 public void setMaximizeHelp(boolean maximizeHelp) {
1384 _maximizeHelp = maximizeHelp;
1385 }
1386
1387
1394 public boolean getPopUpPrint() {
1395 return _popUpPrint;
1396 }
1397
1398
1405 public boolean isPopUpPrint() {
1406 return _popUpPrint;
1407 }
1408
1409
1416 public void setPopUpPrint(boolean popUpPrint) {
1417 _popUpPrint = popUpPrint;
1418 }
1419
1420
1425 public boolean getLayoutCacheable() {
1426 return _layoutCacheable;
1427 }
1428
1429
1434 public boolean isLayoutCacheable() {
1435 return _layoutCacheable;
1436 }
1437
1438
1444 public void setLayoutCacheable(boolean layoutCacheable) {
1445 _layoutCacheable = layoutCacheable;
1446 }
1447
1448
1453 public boolean getInstanceable() {
1454 return _instanceable;
1455 }
1456
1457
1462 public boolean isInstanceable() {
1463 return _instanceable;
1464 }
1465
1466
1472 public void setInstanceable(boolean instanceable) {
1473 _instanceable = instanceable;
1474 }
1475
1476
1481 public boolean getScopeable() {
1482 return _scopeable;
1483 }
1484
1485
1490 public boolean isScopeable() {
1491 return _scopeable;
1492 }
1493
1494
1500 public void setScopeable(boolean scopeable) {
1501 _scopeable = scopeable;
1502 }
1503
1504
1509 public String getUserPrincipalStrategy() {
1510 return _userPrincipalStrategy;
1511 }
1512
1513
1518 public void setUserPrincipalStrategy(String userPrincipalStrategy) {
1519 if (Validator.isNotNull(userPrincipalStrategy)) {
1520 _userPrincipalStrategy = userPrincipalStrategy;
1521 }
1522 }
1523
1524
1531 public boolean getPrivateRequestAttributes() {
1532 return _privateRequestAttributes;
1533 }
1534
1535
1542 public boolean isPrivateRequestAttributes() {
1543 return _privateRequestAttributes;
1544 }
1545
1546
1554 public void setPrivateRequestAttributes(boolean privateRequestAttributes) {
1555 _privateRequestAttributes = privateRequestAttributes;
1556 }
1557
1558
1565 public boolean getPrivateSessionAttributes() {
1566 return _privateSessionAttributes;
1567 }
1568
1569
1576 public boolean isPrivateSessionAttributes() {
1577 return _privateSessionAttributes;
1578 }
1579
1580
1587 public void setPrivateSessionAttributes(boolean privateSessionAttributes) {
1588 _privateSessionAttributes = privateSessionAttributes;
1589 }
1590
1591
1596 public int getRenderWeight() {
1597 return _renderWeight;
1598 }
1599
1600
1605 public void setRenderWeight(int renderWeight) {
1606 _renderWeight = renderWeight;
1607 }
1608
1609
1614 public boolean getAjaxable() {
1615 return _ajaxable;
1616 }
1617
1618
1623 public boolean isAjaxable() {
1624 return _ajaxable;
1625 }
1626
1627
1633 public void setAjaxable(boolean ajaxable) {
1634 _ajaxable = ajaxable;
1635 }
1636
1637
1644 public List<String> getHeaderPortalCss() {
1645 return _headerPortalCss;
1646 }
1647
1648
1655 public void setHeaderPortalCss(List<String> headerPortalCss) {
1656 _headerPortalCss = headerPortalCss;
1657 }
1658
1659
1666 public List<String> getHeaderPortletCss() {
1667 return _headerPortletCss;
1668 }
1669
1670
1677 public void setHeaderPortletCss(List<String> headerPortletCss) {
1678 _headerPortletCss = headerPortletCss;
1679 }
1680
1681
1688 public List<String> getHeaderPortalJavaScript() {
1689 return _headerPortalJavaScript;
1690 }
1691
1692
1700 public void setHeaderPortalJavaScript(List<String> headerPortalJavaScript) {
1701 _headerPortalJavaScript = headerPortalJavaScript;
1702 }
1703
1704
1711 public List<String> getHeaderPortletJavaScript() {
1712 return _headerPortletJavaScript;
1713 }
1714
1715
1723 public void setHeaderPortletJavaScript(
1724 List<String> headerPortletJavaScript) {
1725
1726 _headerPortletJavaScript = headerPortletJavaScript;
1727 }
1728
1729
1736 public List<String> getFooterPortalCss() {
1737 return _footerPortalCss;
1738 }
1739
1740
1747 public void setFooterPortalCss(List<String> footerPortalCss) {
1748 _footerPortalCss = footerPortalCss;
1749 }
1750
1751
1758 public List<String> getFooterPortletCss() {
1759 return _footerPortletCss;
1760 }
1761
1762
1769 public void setFooterPortletCss(List<String> footerPortletCss) {
1770 _footerPortletCss = footerPortletCss;
1771 }
1772
1773
1780 public List<String> getFooterPortalJavaScript() {
1781 return _footerPortalJavaScript;
1782 }
1783
1784
1792 public void setFooterPortalJavaScript(List<String> footerPortalJavaScript) {
1793 _footerPortalJavaScript = footerPortalJavaScript;
1794 }
1795
1796
1803 public List<String> getFooterPortletJavaScript() {
1804 return _footerPortletJavaScript;
1805 }
1806
1807
1815 public void setFooterPortletJavaScript(
1816 List<String> footerPortletJavaScript) {
1817
1818 _footerPortletJavaScript = footerPortletJavaScript;
1819 }
1820
1821
1828 public String getCssClassWrapper() {
1829 return _cssClassWrapper;
1830 }
1831
1832
1839 public void setCssClassWrapper(String cssClassWrapper) {
1840 _cssClassWrapper = cssClassWrapper;
1841 }
1842
1843
1848 public String getFacebookIntegration() {
1849 return _facebookIntegration;
1850 }
1851
1852
1857 public void setFacebookIntegration(String facebookIntegration) {
1858 if (Validator.isNotNull(facebookIntegration)) {
1859 _facebookIntegration = facebookIntegration;
1860 }
1861 }
1862
1863
1868 public boolean getAddDefaultResource() {
1869 return _addDefaultResource;
1870 }
1871
1872
1877 public boolean isAddDefaultResource() {
1878 return _addDefaultResource;
1879 }
1880
1881
1887 public void setAddDefaultResource(boolean addDefaultResource) {
1888 _addDefaultResource = addDefaultResource;
1889 }
1890
1891
1896 public void setRoles(String roles) {
1897 _rolesArray = StringUtil.split(roles);
1898
1899 super.setRoles(roles);
1900 }
1901
1902
1907 public String[] getRolesArray() {
1908 return _rolesArray;
1909 }
1910
1911
1916 public void setRolesArray(String[] rolesArray) {
1917 _rolesArray = rolesArray;
1918
1919 super.setRoles(StringUtil.merge(rolesArray));
1920 }
1921
1922
1927 public Set<String> getUnlinkedRoles() {
1928 return _unlinkedRoles;
1929 }
1930
1931
1936 public void setUnlinkedRoles(Set<String> unlinkedRoles) {
1937 _unlinkedRoles = unlinkedRoles;
1938 }
1939
1940
1945 public Map<String, String> getRoleMappers() {
1946 return _roleMappers;
1947 }
1948
1949
1954 public void setRoleMappers(Map<String, String> roleMappers) {
1955 _roleMappers = roleMappers;
1956 }
1957
1958
1962 public void linkRoles() {
1963 List<String> linkedRoles = new ArrayList<String>();
1964
1965 Iterator<String> itr = _unlinkedRoles.iterator();
1966
1967 while (itr.hasNext()) {
1968 String unlinkedRole = itr.next();
1969
1970 String roleLink = _roleMappers.get(unlinkedRole);
1971
1972 if (Validator.isNotNull(roleLink)) {
1973 if (_log.isDebugEnabled()) {
1974 _log.debug(
1975 "Linking role for portlet [" + getPortletId() +
1976 "] with role-name [" + unlinkedRole +
1977 "] to role-link [" + roleLink + "]");
1978 }
1979
1980 linkedRoles.add(roleLink);
1981 }
1982 else {
1983 _log.error(
1984 "Unable to link role for portlet [" + getPortletId() +
1985 "] with role-name [" + unlinkedRole +
1986 "] because role-link is null");
1987 }
1988 }
1989
1990 String[] array = linkedRoles.toArray(new String[linkedRoles.size()]);
1991
1992 Arrays.sort(array);
1993
1994 setRolesArray(array);
1995 }
1996
1997
2002 public boolean hasRoleWithName(String roleName) {
2003 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2004 return false;
2005 }
2006
2007 for (int i = 0; i < _rolesArray.length; i++) {
2008 if (_rolesArray[i].equalsIgnoreCase(roleName)) {
2009 return true;
2010 }
2011 }
2012
2013 return false;
2014 }
2015
2016
2023 public boolean hasAddPortletPermission(long userId) {
2024 try {
2025 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2026 return true;
2027 }
2028 else if (RoleLocalServiceUtil.hasUserRoles(
2029 userId, getCompanyId(), _rolesArray, true)) {
2030
2031 return true;
2032 }
2033 else if (RoleLocalServiceUtil.hasUserRole(
2034 userId, getCompanyId(), RoleConstants.ADMINISTRATOR,
2035 true)) {
2036
2037 return true;
2038 }
2039 else {
2040 User user = UserLocalServiceUtil.getUserById(userId);
2041
2042 if (user.isDefaultUser() &&
2043 hasRoleWithName(RoleConstants.GUEST)) {
2044
2045 return true;
2046 }
2047 }
2048 }
2049 catch (Exception e) {
2050 _log.error(e);
2051 }
2052
2053 return false;
2054 }
2055
2056
2063 public boolean getSystem() {
2064 return _system;
2065 }
2066
2067
2074 public boolean isSystem() {
2075 return _system;
2076 }
2077
2078
2085 public void setSystem(boolean system) {
2086 _system = system;
2087 }
2088
2089
2096 public boolean getInclude() {
2097 return _include;
2098 }
2099
2100
2107 public boolean isInclude() {
2108 return _include;
2109 }
2110
2111
2118 public void setInclude(boolean include) {
2119 _include = include;
2120 }
2121
2122
2127 public boolean getReady() {
2128 return isReady();
2129 }
2130
2131
2136 public boolean isReady() {
2137 Boolean ready = _readyMap.get(getRootPortletId());
2138
2139 if (ready == null) {
2140 return true;
2141 }
2142 else {
2143 return ready;
2144 }
2145 }
2146
2147
2152 public void setReady(boolean ready) {
2153 _readyMap.put(getRootPortletId(), ready);
2154 }
2155
2156
2161 public Map<String, String> getInitParams() {
2162 return _initParams;
2163 }
2164
2165
2170 public void setInitParams(Map<String, String> initParams) {
2171 _initParams = initParams;
2172 }
2173
2174
2179 public Integer getExpCache() {
2180 return _expCache;
2181 }
2182
2183
2188 public void setExpCache(Integer expCache) {
2189 _expCache = expCache;
2190 }
2191
2192
2197 public Map<String, Set<String>> getPortletModes() {
2198 return _portletModes;
2199 }
2200
2201
2206 public void setPortletModes(Map<String, Set<String>> portletModes) {
2207 _portletModes = portletModes;
2208 }
2209
2210
2217 public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
2218 if (mimeType == null) {
2219 mimeType = ContentTypes.TEXT_HTML;
2220 }
2221
2222 Set<String> mimeTypePortletModes = _portletModes.get(mimeType);
2223
2224 if (mimeTypePortletModes == null) {
2225 return false;
2226 }
2227
2228 if (mimeTypePortletModes.contains(portletMode.toString())) {
2229 return true;
2230 }
2231 else {
2232 return false;
2233 }
2234 }
2235
2236
2241 public Set<String> getAllPortletModes() {
2242 Set<String> allPortletModes = new TreeSet<String>();
2243
2244 Iterator<Map.Entry <String, Set<String>>> itr1 =
2245 _portletModes.entrySet().iterator();
2246
2247 while (itr1.hasNext()) {
2248 Map.Entry<String, Set<String>> entry = itr1.next();
2249
2250 Set<String> mimeTypePortletModes = entry.getValue();
2251
2252 Iterator<String> itr2 = mimeTypePortletModes.iterator();
2253
2254 while (itr2.hasNext()) {
2255 String portletMode = itr2.next();
2256
2257 allPortletModes.add(portletMode);
2258 }
2259 }
2260
2261 return allPortletModes;
2262 }
2263
2264
2269 public boolean hasMultipleMimeTypes() {
2270 if (_portletModes.size() > 1) {
2271 return true;
2272 }
2273 else {
2274 return false;
2275 }
2276 }
2277
2278
2283 public Map<String, Set<String>> getWindowStates() {
2284 return _windowStates;
2285 }
2286
2287
2292 public void setWindowStates(Map<String, Set<String>> windowStates) {
2293 _windowStates = windowStates;
2294 }
2295
2296
2303 public boolean hasWindowState(String mimeType, WindowState windowState) {
2304 if (mimeType == null) {
2305 mimeType = ContentTypes.TEXT_HTML;
2306 }
2307
2308 Set<String> mimeTypeWindowStates = _windowStates.get(mimeType);
2309
2310 if (mimeTypeWindowStates == null) {
2311 return false;
2312 }
2313
2314 if (mimeTypeWindowStates.contains(windowState.toString())) {
2315 return true;
2316 }
2317 else {
2318 return false;
2319 }
2320 }
2321
2322
2327 public Set<String> getAllWindowStates() {
2328 Set<String> allWindowStates = new TreeSet<String>();
2329
2330 Iterator<Map.Entry <String, Set<String>>> itr1 =
2331 _windowStates.entrySet().iterator();
2332
2333 while (itr1.hasNext()) {
2334 Map.Entry<String, Set<String>> entry = itr1.next();
2335
2336 Set<String> mimeTypeWindowStates = entry.getValue();
2337
2338 Iterator<String> itr2 = mimeTypeWindowStates.iterator();
2339
2340 while (itr2.hasNext()) {
2341 String windowState = itr2.next();
2342
2343 allWindowStates.add(windowState);
2344 }
2345 }
2346
2347 return allWindowStates;
2348 }
2349
2350
2355 public Set<String> getSupportedLocales() {
2356 return _supportedLocales;
2357 }
2358
2359
2364 public void setSupportedLocales(Set<String> supportedLocales) {
2365 _supportedLocales = supportedLocales;
2366 }
2367
2368
2373 public String getResourceBundle() {
2374 return _resourceBundle;
2375 }
2376
2377
2382 public void setResourceBundle(String resourceBundle) {
2383 _resourceBundle = resourceBundle;
2384 }
2385
2386
2391 public PortletInfo getPortletInfo() {
2392 return _portletInfo;
2393 }
2394
2395
2400 public void setPortletInfo(PortletInfo portletInfo) {
2401 _portletInfo = portletInfo;
2402 }
2403
2404
2409 public Map<String, PortletFilter> getPortletFilters() {
2410 return _portletFilters;
2411 }
2412
2413
2418 public void setPortletFilters(Map<String, PortletFilter> portletFilters) {
2419 _portletFilters = portletFilters;
2420 }
2421
2422
2425 public void addProcessingEvent(QName processingEvent) {
2426 _processingEvents.add(processingEvent);
2427 _processingEventsByQName.put(
2428 PortletQNameUtil.getKey(processingEvent), processingEvent);
2429 }
2430
2431
2438 public QName getProcessingEvent(String uri, String localPart) {
2439 return _processingEventsByQName.get(
2440 PortletQNameUtil.getKey(uri, localPart));
2441 }
2442
2443
2448 public Set<QName> getProcessingEvents() {
2449 return _processingEvents;
2450 }
2451
2452
2457 public void setProcessingEvents(Set<QName> processingEvents) {
2458 for (QName processingEvent : processingEvents) {
2459 addProcessingEvent(processingEvent);
2460 }
2461 }
2462
2463
2466 public void addPublishingEvent(QName publishingEvent) {
2467 _publishingEvents.add(publishingEvent);
2468 }
2469
2470
2475 public Set<QName> getPublishingEvents() {
2476 return _publishingEvents;
2477 }
2478
2479
2484 public void setPublishingEvents(Set<QName> publishingEvents) {
2485 for (QName publishingEvent : publishingEvents) {
2486 addPublishingEvent(publishingEvent);
2487 }
2488 }
2489
2490
2495 public void addPublicRenderParameter(
2496 PublicRenderParameter publicRenderParameter) {
2497
2498 _publicRenderParameters.add(publicRenderParameter);
2499 _publicRenderParametersByIdentifier.put(
2500 publicRenderParameter.getIdentifier(), publicRenderParameter);
2501 _publicRenderParametersByQName.put(
2502 PortletQNameUtil.getKey(publicRenderParameter.getQName()),
2503 publicRenderParameter);
2504 }
2505
2506
2511 public PublicRenderParameter getPublicRenderParameter(String identifier) {
2512 return _publicRenderParametersByIdentifier.get(identifier);
2513 }
2514
2515
2522 public PublicRenderParameter getPublicRenderParameter(
2523 String uri, String localPart) {
2524
2525 return _publicRenderParametersByQName.get(
2526 PortletQNameUtil.getKey(uri, localPart));
2527 }
2528
2529
2534 public Set<PublicRenderParameter> getPublicRenderParameters() {
2535 return _publicRenderParameters;
2536 }
2537
2538
2544 public void setPublicRenderParameters(
2545 Set<PublicRenderParameter> publicRenderParameters) {
2546
2547 for (PublicRenderParameter publicRenderParameter :
2548 publicRenderParameters) {
2549
2550 addPublicRenderParameter(publicRenderParameter);
2551 }
2552 }
2553
2554
2559 public String getContextPath() {
2560 String virtualPath = getVirtualPath();
2561
2562 if (Validator.isNotNull(virtualPath)) {
2563 return virtualPath;
2564 }
2565
2566 if (_portletApp.isWARFile()) {
2567 return StringPool.SLASH.concat(_portletApp.getServletContextName());
2568 }
2569 else {
2570 return PortalUtil.getPathContext();
2571 }
2572 }
2573
2574
2579 public PortletApp getPortletApp() {
2580 return _portletApp;
2581 }
2582
2583
2588 public void setPortletApp(PortletApp portletApp) {
2589 _portletApp = portletApp;
2590
2591 _portletApp.addPortlet(this);
2592 }
2593
2594
2600 public Portlet getClonedInstance(String portletId) {
2601 if (_clonedInstances == null) {
2602
2603
2605 return null;
2606 }
2607
2608 Portlet clonedInstance = _clonedInstances.get(portletId);
2609
2610 if (clonedInstance == null) {
2611 clonedInstance = (Portlet)clone();
2612
2613 clonedInstance.setPortletId(portletId);
2614
2615
2622 }
2624
2625 return clonedInstance;
2626 }
2627
2628
2633 public boolean getStatic() {
2634 return _staticPortlet;
2635 }
2636
2637
2642 public boolean isStatic() {
2643 return _staticPortlet;
2644 }
2645
2646
2652 public void setStatic(boolean staticPortlet) {
2653 _staticPortlet = staticPortlet;
2654 }
2655
2656
2663 public boolean getStaticStart() {
2664 return _staticPortletStart;
2665 }
2666
2667
2674 public boolean isStaticStart() {
2675 return _staticPortletStart;
2676 }
2677
2678
2685 public void setStaticStart(boolean staticPortletStart) {
2686 _staticPortletStart = staticPortletStart;
2687 }
2688
2689
2696 public boolean getStaticEnd() {
2697 return !_staticPortletStart;
2698 }
2699
2700
2707 public boolean isStaticEnd() {
2708 return !_staticPortletStart;
2709 }
2710
2711
2716 public boolean getUndeployedPortlet() {
2717 return _undeployedPortlet;
2718 }
2719
2720
2725 public boolean isUndeployedPortlet() {
2726 return _undeployedPortlet;
2727 }
2728
2729
2735 public void setUndeployedPortlet(boolean undeployedPortlet) {
2736 _undeployedPortlet = undeployedPortlet;
2737 }
2738
2739
2744 public Object clone() {
2745 Portlet portlet = new PortletImpl(
2746 getPortletId(), getPluginPackage(), getDefaultPluginSetting(),
2747 getCompanyId(), getTimestamp(), getIcon(), getVirtualPath(),
2748 getStrutsPath(), getPortletName(), getDisplayName(),
2749 getPortletClass(), getConfigurationActionClass(), getIndexerClass(),
2750 getOpenSearchClass(), getSchedulerClass(), getPortletURLClass(),
2751 getFriendlyURLMapperClass(), getURLEncoderClass(),
2752 getPortletDataHandlerClass(), getPortletLayoutListenerClass(),
2753 getPollerProcessorClass(), getPopMessageListenerClass(),
2754 getSocialActivityInterpreterClass(),
2755 getSocialRequestInterpreterClass(), getWebDAVStorageToken(),
2756 getWebDAVStorageClass(), getControlPanelEntryCategory(),
2757 getControlPanelEntryWeight(), getControlPanelEntryClass(),
2758 getDefaultPreferences(), getPreferencesValidator(),
2759 isPreferencesCompanyWide(), isPreferencesUniquePerLayout(),
2760 isPreferencesOwnedByGroup(), isUseDefaultTemplate(),
2761 isShowPortletAccessDenied(), isShowPortletInactive(),
2762 isActionURLRedirect(), isRestoreCurrentView(), isMaximizeEdit(),
2763 isMaximizeHelp(), isPopUpPrint(), isLayoutCacheable(),
2764 isInstanceable(), isScopeable(), getUserPrincipalStrategy(),
2765 isPrivateRequestAttributes(), isPrivateSessionAttributes(),
2766 getRenderWeight(), isAjaxable(), getHeaderPortalCss(),
2767 getHeaderPortletCss(), getHeaderPortalJavaScript(),
2768 getHeaderPortletJavaScript(), getFooterPortalCss(),
2769 getFooterPortletCss(), getFooterPortalJavaScript(),
2770 getFooterPortletJavaScript(), getCssClassWrapper(),
2771 getFacebookIntegration(), isAddDefaultResource(), getRoles(),
2772 getUnlinkedRoles(), getRoleMappers(), isSystem(), isActive(),
2773 isInclude(), getInitParams(), getExpCache(), getPortletModes(),
2774 getWindowStates(), getSupportedLocales(), getResourceBundle(),
2775 getPortletInfo(), getPortletFilters(), getProcessingEvents(),
2776 getPublishingEvents(), getPublicRenderParameters(),
2777 getPortletApp());
2778
2779 portlet.setId(getId());
2780
2781 return portlet;
2782 }
2783
2784
2793 public int compareTo(Portlet portlet) {
2794 return getPortletId().compareTo(portlet.getPortletId());
2795 }
2796
2797
2803 public boolean equals(Object obj) {
2804 Portlet portlet = (Portlet)obj;
2805
2806 return getPortletId().equals(portlet.getPortletId());
2807 }
2808
2809
2812 private static Log _log = LogFactoryUtil.getLog(PortletImpl.class);
2813
2814
2817 private static Map<String, Boolean> _readyMap =
2818 new ConcurrentHashMap<String, Boolean>();
2819
2820
2823 private PluginPackage _pluginPackage;
2824
2825
2828 private PluginSetting _defaultPluginSetting;
2829
2830
2833 private long _timestamp;
2834
2835
2838 private String _icon;
2839
2840
2843 private String _virtualPath;
2844
2845
2848 private String _strutsPath;
2849
2850
2853 private String _portletName;
2854
2855
2858 private String _displayName;
2859
2860
2863 private String _portletClass;
2864
2865
2868 private String _configurationActionClass;
2869
2870
2873 private String _indexerClass;
2874
2875
2878 private String _openSearchClass;
2879
2880
2883 private String _schedulerClass;
2884
2885
2888 private String _portletURLClass;
2889
2890
2893 private String _friendlyURLMapperClass;
2894
2895
2898 private String _urlEncoderClass;
2899
2900
2903 private String _portletDataHandlerClass;
2904
2905
2908 private String _portletLayoutListenerClass;
2909
2910
2913 private String _pollerProcessorClass;
2914
2915
2918 private String _popMessageListenerClass;
2919
2920
2923 private String _socialActivityInterpreterClass;
2924
2925
2928 private String _socialRequestInterpreterClass;
2929
2930
2933 private String _webDAVStorageToken;
2934
2935
2938 private String _webDAVStorageClass;
2939
2940
2943 private String _defaultPreferences;
2944
2945
2948 private String _preferencesValidator;
2949
2950
2953 private boolean _preferencesCompanyWide;
2954
2955
2958 private boolean _preferencesUniquePerLayout = true;
2959
2960
2964 private boolean _preferencesOwnedByGroup = true;
2965
2966
2970 private String _controlPanelEntryCategory;
2971
2972
2976 private double _controlPanelEntryWeight = 100;
2977
2978
2982 private String _controlPanelEntryClass;
2983
2984
2987 private boolean _useDefaultTemplate = true;
2988
2989
2992 private boolean _showPortletAccessDenied =
2993 PropsValues.LAYOUT_SHOW_PORTLET_ACCESS_DENIED;
2994
2995
2998 private boolean _showPortletInactive =
2999 PropsValues.LAYOUT_SHOW_PORTLET_INACTIVE;
3000
3001
3004 private boolean _actionURLRedirect;
3005
3006
3010 private boolean _restoreCurrentView = true;
3011
3012
3016 private boolean _maximizeEdit;
3017
3018
3022 private boolean _maximizeHelp;
3023
3024
3028 private boolean _popUpPrint = true;
3029
3030
3033 private boolean _layoutCacheable;
3034
3035
3038 private boolean _instanceable;
3039
3040
3043 private boolean _scopeable;
3044
3045
3048 private String _userPrincipalStrategy =
3049 PortletConstants.USER_PRINCIPAL_STRATEGY_USER_ID;
3050
3051
3055 private boolean _privateRequestAttributes = true;
3056
3057
3060 private boolean _privateSessionAttributes = true;
3061
3062
3065 private int _renderWeight = 1;
3066
3067
3070 private boolean _ajaxable = true;
3071
3072
3076 private List<String> _headerPortalCss;
3077
3078
3082 private List<String> _headerPortletCss;
3083
3084
3088 private List<String> _headerPortalJavaScript;
3089
3090
3094 private List<String> _headerPortletJavaScript;
3095
3096
3100 private List<String> _footerPortalCss;
3101
3102
3106 private List<String> _footerPortletCss;
3107
3108
3112 private List<String> _footerPortalJavaScript;
3113
3114
3118 private List<String> _footerPortletJavaScript;
3119
3120
3124 private String _cssClassWrapper = StringPool.BLANK;
3125
3126
3129 private String _facebookIntegration =
3130 PortletConstants.FACEBOOK_INTEGRATION_IFRAME;
3131
3132
3135 private boolean _addDefaultResource;
3136
3137
3140 private String[] _rolesArray;
3141
3142
3145 private Set<String> _unlinkedRoles;
3146
3147
3150 private Map<String, String> _roleMappers;
3151
3152
3156 private boolean _system;
3157
3158
3161 private boolean _include = true;
3162
3163
3166 private Map<String, String> _initParams;
3167
3168
3171 private Integer _expCache;
3172
3173
3176 private Map<String, Set<String>> _portletModes;
3177
3178
3181 private Map<String, Set<String>> _windowStates;
3182
3183
3186 private Set<String> _supportedLocales;
3187
3188
3191 private String _resourceBundle;
3192
3193
3196 private PortletInfo _portletInfo;
3197
3198
3201 private Map<String, PortletFilter> _portletFilters;
3202
3203
3206 private Set<QName> _processingEvents = new HashSet<QName>();
3207
3208
3211 private Map<String, QName> _processingEventsByQName =
3212 new HashMap<String, QName>();
3213
3214
3217 private Set<QName> _publishingEvents = new HashSet<QName>();
3218
3219
3222 private Set<PublicRenderParameter> _publicRenderParameters =
3223 new HashSet<PublicRenderParameter>();
3224
3225
3229 private Map<String, PublicRenderParameter>
3230 _publicRenderParametersByIdentifier =
3231 new HashMap<String, PublicRenderParameter>();
3232
3233
3237 private Map<String, PublicRenderParameter>
3238 _publicRenderParametersByQName =
3239 new HashMap<String, PublicRenderParameter>();
3240
3241
3244 private PortletApp _portletApp;
3245
3246
3249 private Map<String, Portlet> _clonedInstances;
3250
3251
3254 private boolean _staticPortlet;
3255
3256
3260 private boolean _staticPortletStart;
3261
3262
3265 private boolean _undeployedPortlet = false;
3266
3267}