1
22
23 package com.liferay.portal.model.impl;
24
25 import com.liferay.portal.kernel.job.Scheduler;
26 import com.liferay.portal.kernel.log.Log;
27 import com.liferay.portal.kernel.log.LogFactoryUtil;
28 import com.liferay.portal.kernel.plugin.PluginPackage;
29 import com.liferay.portal.kernel.poller.PollerProcessor;
30 import com.liferay.portal.kernel.pop.MessageListener;
31 import com.liferay.portal.kernel.portlet.ConfigurationAction;
32 import com.liferay.portal.kernel.portlet.FriendlyURLMapper;
33 import com.liferay.portal.kernel.portlet.PortletBag;
34 import com.liferay.portal.kernel.portlet.PortletBagPool;
35 import com.liferay.portal.kernel.portlet.PortletLayoutListener;
36 import com.liferay.portal.kernel.search.Indexer;
37 import com.liferay.portal.kernel.search.OpenSearch;
38 import com.liferay.portal.kernel.servlet.URLEncoder;
39 import com.liferay.portal.kernel.util.ContentTypes;
40 import com.liferay.portal.kernel.util.InstancePool;
41 import com.liferay.portal.kernel.util.StringPool;
42 import com.liferay.portal.kernel.util.StringUtil;
43 import com.liferay.portal.kernel.util.Validator;
44 import com.liferay.portal.lar.PortletDataHandler;
45 import com.liferay.portal.model.Plugin;
46 import com.liferay.portal.model.PluginSetting;
47 import com.liferay.portal.model.Portlet;
48 import com.liferay.portal.model.PortletApp;
49 import com.liferay.portal.model.PortletConstants;
50 import com.liferay.portal.model.PortletFilter;
51 import com.liferay.portal.model.PortletInfo;
52 import com.liferay.portal.model.PublicRenderParameter;
53 import com.liferay.portal.model.RoleConstants;
54 import com.liferay.portal.model.User;
55 import com.liferay.portal.service.RoleLocalServiceUtil;
56 import com.liferay.portal.service.UserLocalServiceUtil;
57 import com.liferay.portal.util.PortalUtil;
58 import com.liferay.portal.util.PropsValues;
59 import com.liferay.portal.util.QNameUtil;
60 import com.liferay.portlet.PortletBagImpl;
61 import com.liferay.portlet.social.model.SocialActivityInterpreter;
62 import com.liferay.portlet.social.model.SocialRequestInterpreter;
63
64 import java.util.ArrayList;
65 import java.util.Arrays;
66 import java.util.HashMap;
67 import java.util.HashSet;
68 import java.util.Hashtable;
69 import java.util.Iterator;
70 import java.util.LinkedHashMap;
71 import java.util.List;
72 import java.util.Map;
73 import java.util.Set;
74 import java.util.TreeSet;
75
76 import javax.portlet.PortletMode;
77 import javax.portlet.WindowState;
78
79 import javax.xml.namespace.QName;
80
81
86 public class PortletImpl extends PortletModelImpl implements Portlet {
87
88
91 public PortletImpl() {
92 }
93
94
97 public PortletImpl(long companyId, String portletId) {
98 setCompanyId(companyId);
99 setPortletId(portletId);
100 setStrutsPath(portletId);
101 setActive(true);
102 _headerPortalCss = new ArrayList<String>();
103 _headerPortletCss = new ArrayList<String>();
104 _headerPortalJavaScript = new ArrayList<String>();
105 _headerPortletJavaScript = new ArrayList<String>();
106 _footerPortalCss = new ArrayList<String>();
107 _footerPortletCss = new ArrayList<String>();
108 _footerPortalJavaScript = new ArrayList<String>();
109 _footerPortletJavaScript = new ArrayList<String>();
110 _unlinkedRoles = new HashSet<String>();
111 _roleMappers = new LinkedHashMap<String, String>();
112 _initParams = new HashMap<String, String>();
113 _portletModes = new HashMap<String, Set<String>>();
114 _windowStates = new HashMap<String, Set<String>>();
115 _supportedLocales = new HashSet<String>();
116 _portletFilters = new LinkedHashMap<String, PortletFilter>();
117 _processingEvents = new HashSet<QName>();
118 _publishingEvents = new HashSet<QName>();
119 _publicRenderParameters = new HashSet<PublicRenderParameter>();
120 }
121
122
125 public PortletImpl(
126 String portletId, PluginPackage pluginPackage,
127 PluginSetting pluginSetting, long companyId, long timestamp,
128 String icon, String virtualPath, String strutsPath, String portletName,
129 String displayName, String portletClass,
130 String configurationActionClass, String indexerClass,
131 String openSearchClass, String schedulerClass, String portletURLClass,
132 String friendlyURLMapperClass, String urlEncoderClass,
133 String portletDataHandlerClass, String portletLayoutListenerClass,
134 String pollerProcessorClass, String popMessageListenerClass,
135 String socialActivityInterpreterClass,
136 String socialRequestInterpreterClass, String defaultPreferences,
137 String prefsValidator, boolean prefsCompanyWide,
138 boolean prefsUniquePerLayout, boolean prefsOwnedByGroup,
139 boolean useDefaultTemplate, boolean showPortletAccessDenied,
140 boolean showPortletInactive, boolean actionURLRedirect,
141 boolean restoreCurrentView, boolean maximizeEdit, boolean maximizeHelp,
142 boolean popUpPrint, boolean layoutCacheable, boolean instanceable,
143 String userPrincipalStrategy, boolean privateRequestAttributes,
144 boolean privateSessionAttributes, int renderWeight, boolean ajaxable,
145 List<String> headerPortalCss, List<String> headerPortletCss,
146 List<String> headerPortalJavaScript,
147 List<String> headerPortletJavaScript, List<String> footerPortalCss,
148 List<String> footerPortletCss, List<String> footerPortalJavaScript,
149 List<String> footerPortletJavaScript,
150 String cssClassWrapper, String facebookIntegration,
151 boolean addDefaultResource, String roles, Set<String> unlinkedRoles,
152 Map<String, String> roleMappers, boolean system, boolean active,
153 boolean include, Map<String, String> initParams, Integer expCache,
154 Map<String, Set<String>> portletModes,
155 Map<String, Set<String>> windowStates, Set<String> supportedLocales,
156 String resourceBundle, PortletInfo portletInfo,
157 Map<String, PortletFilter> portletFilters, Set<QName> processingEvents,
158 Set<QName> publishingEvents,
159 Set<PublicRenderParameter> publicRenderParameters,
160 PortletApp portletApp) {
161
162 setPortletId(portletId);
163 _pluginPackage = pluginPackage;
164 _defaultPluginSetting = pluginSetting;
165 setCompanyId(companyId);
166 _timestamp = timestamp;
167 _icon = icon;
168 _virtualPath = virtualPath;
169 _strutsPath = strutsPath;
170 _portletName = portletName;
171 _displayName = displayName;
172 _portletClass = portletClass;
173 _configurationActionClass = configurationActionClass;
174 _indexerClass = indexerClass;
175 _openSearchClass = openSearchClass;
176 _schedulerClass = schedulerClass;
177 _portletURLClass = portletURLClass;
178 _friendlyURLMapperClass = friendlyURLMapperClass;
179 _urlEncoderClass = urlEncoderClass;
180 _portletDataHandlerClass = portletDataHandlerClass;
181 _portletLayoutListenerClass = portletLayoutListenerClass;
182 _pollerProcessorClass = pollerProcessorClass;
183 _popMessageListenerClass = popMessageListenerClass;
184 _socialActivityInterpreterClass = socialActivityInterpreterClass;
185 _socialRequestInterpreterClass = socialRequestInterpreterClass;
186 _defaultPreferences = defaultPreferences;
187 _prefsValidator = prefsValidator;
188 _prefsCompanyWide = prefsCompanyWide;
189 _prefsUniquePerLayout = prefsUniquePerLayout;
190 _prefsOwnedByGroup = prefsOwnedByGroup;
191 _useDefaultTemplate = useDefaultTemplate;
192 _showPortletAccessDenied = showPortletAccessDenied;
193 _showPortletInactive = showPortletInactive;
194 _actionURLRedirect = actionURLRedirect;
195 _restoreCurrentView = restoreCurrentView;
196 _maximizeEdit = maximizeEdit;
197 _maximizeHelp = maximizeHelp;
198 _popUpPrint = popUpPrint;
199 _layoutCacheable = layoutCacheable;
200 _instanceable = instanceable;
201 _userPrincipalStrategy = userPrincipalStrategy;
202 _privateRequestAttributes = privateRequestAttributes;
203 _privateSessionAttributes = privateSessionAttributes;
204 _renderWeight = renderWeight;
205 _ajaxable = ajaxable;
206 _headerPortalCss = headerPortalCss;
207 _headerPortletCss = headerPortletCss;
208 _headerPortalJavaScript = headerPortalJavaScript;
209 _headerPortletJavaScript = headerPortletJavaScript;
210 _footerPortalCss = footerPortalCss;
211 _footerPortletCss = footerPortletCss;
212 _footerPortalJavaScript = footerPortalJavaScript;
213 _footerPortletJavaScript = footerPortletJavaScript;
214 _cssClassWrapper = cssClassWrapper;
215 _facebookIntegration = facebookIntegration;
216 _addDefaultResource = addDefaultResource;
217 setRoles(roles);
218 _unlinkedRoles = unlinkedRoles;
219 _roleMappers = roleMappers;
220 _system = system;
221 setActive(active);
222 _include = include;
223 _initParams = initParams;
224 _expCache = expCache;
225 _portletModes = portletModes;
226 _windowStates = windowStates;
227 _supportedLocales = supportedLocales;
228 _resourceBundle = resourceBundle;
229 _portletInfo = portletInfo;
230 _portletFilters = portletFilters;
231 setProcessingEvents(processingEvents);
232 setPublishingEvents(publishingEvents);
233 setPublicRenderParameters(publicRenderParameters);
234 _portletApp = portletApp;
235
236 if (_instanceable) {
237 _clonedInstances = new Hashtable<String, Portlet>();
238 }
239 }
240
241
246 public String getRootPortletId() {
247 return PortletConstants.getRootPortletId(getPortletId());
248 }
249
250
255 public String getInstanceId() {
256 return PortletConstants.getInstanceId(getPortletId());
257 }
258
259
264 public String getPluginId() {
265 return getRootPortletId();
266 }
267
268
273 public String getPluginType() {
274 return Plugin.TYPE_PORTLET;
275 }
276
277
282 public PluginPackage getPluginPackage() {
283 return _pluginPackage;
284 }
285
286
291 public void setPluginPackage(PluginPackage pluginPackage) {
292 _pluginPackage = pluginPackage;
293 }
294
295
300 public PluginSetting getDefaultPluginSetting() {
301 return _defaultPluginSetting;
302 }
303
304
309 public void setDefaultPluginSetting(PluginSetting pluginSetting) {
310 _defaultPluginSetting = pluginSetting;
311 }
312
313
318 public long getTimestamp() {
319 return _timestamp;
320 }
321
322
327 public void setTimestamp(long timestamp) {
328 _timestamp = timestamp;
329 }
330
331
336 public String getIcon() {
337 return _icon;
338 }
339
340
345 public void setIcon(String icon) {
346 _icon = icon;
347 }
348
349
354 public String getVirtualPath() {
355 return _virtualPath;
356 }
357
358
363 public void setVirtualPath(String virtualPath) {
364 if (_portletApp.isWARFile() && Validator.isNull(virtualPath)) {
365 virtualPath = PropsValues.PORTLET_VIRTUAL_PATH;
366 }
367
368 _virtualPath = virtualPath;
369 }
370
371
376 public String getStrutsPath() {
377 return _strutsPath;
378 }
379
380
385 public void setStrutsPath(String strutsPath) {
386 _strutsPath = strutsPath;
387 }
388
389
394 public String getPortletName() {
395 return _portletName;
396 }
397
398
403 public void setPortletName(String portletName) {
404 _portletName = portletName;
405 }
406
407
412 public String getDisplayName() {
413 return _displayName;
414 }
415
416
421 public void setDisplayName(String displayName) {
422 _displayName = displayName;
423 }
424
425
430 public String getPortletClass() {
431 return _portletClass;
432 }
433
434
439 public void setPortletClass(String portletClass) {
440 _portletClass = portletClass;
441 }
442
443
448 public String getConfigurationActionClass() {
449 return _configurationActionClass;
450 }
451
452
458 public void setConfigurationActionClass(String configurationActionClass) {
459 _configurationActionClass = configurationActionClass;
460 }
461
462
467 public ConfigurationAction getConfigurationActionInstance() {
468 if (Validator.isNotNull(getConfigurationActionClass())) {
469 if (_portletApp.isWARFile()) {
470 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
471
472 return portletBag.getConfigurationActionInstance();
473 }
474 else {
475 return (ConfigurationAction)InstancePool.get(
476 getConfigurationActionClass());
477 }
478 }
479
480 return null;
481 }
482
483
488 public String getIndexerClass() {
489 return _indexerClass;
490 }
491
492
497 public void setIndexerClass(String indexerClass) {
498 _indexerClass = indexerClass;
499 }
500
501
506 public Indexer getIndexerInstance() {
507 if (Validator.isNotNull(getIndexerClass())) {
508 if (_portletApp.isWARFile()) {
509 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
510
511 return portletBag.getIndexerInstance();
512 }
513 else {
514 return (Indexer)InstancePool.get(getIndexerClass());
515 }
516 }
517
518 return null;
519 }
520
521
526 public String getOpenSearchClass() {
527 return _openSearchClass;
528 }
529
530
535 public void setOpenSearchClass(String openSearchClass) {
536 _openSearchClass = openSearchClass;
537 }
538
539
544 public OpenSearch getOpenSearchInstance() {
545 if (Validator.isNull(getOpenSearchClass())) {
546 return null;
547 }
548
549 if (_portletApp.isWARFile()) {
550 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
551
552 return portletBag.getOpenSearchInstance();
553 }
554
555 return (OpenSearch)InstancePool.get(getOpenSearchClass());
556 }
557
558
563 public String getSchedulerClass() {
564 return _schedulerClass;
565 }
566
567
572 public void setSchedulerClass(String schedulerClass) {
573 _schedulerClass = schedulerClass;
574 }
575
576
581 public Scheduler getSchedulerInstance() {
582 if (Validator.isNotNull(getSchedulerClass())) {
583 if (_portletApp.isWARFile()) {
584 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
585
586 return portletBag.getSchedulerInstance();
587 }
588 else {
589 return (Scheduler)InstancePool.get(getSchedulerClass());
590 }
591 }
592
593 return null;
594 }
595
596
601 public String getPortletURLClass() {
602 return _portletURLClass;
603 }
604
605
610 public void setPortletURLClass(String portletURLClass) {
611 _portletURLClass = portletURLClass;
612 }
613
614
619 public String getFriendlyURLMapperClass() {
620 return _friendlyURLMapperClass;
621 }
622
623
629 public void setFriendlyURLMapperClass(String friendlyURLMapperClass) {
630 _friendlyURLMapperClass = friendlyURLMapperClass;
631 }
632
633
638 public FriendlyURLMapper getFriendlyURLMapperInstance() {
639 if (Validator.isNotNull(getFriendlyURLMapperClass())) {
640 if (_portletApp.isWARFile()) {
641 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
642
643 return portletBag.getFriendlyURLMapperInstance();
644 }
645 else {
646 return (FriendlyURLMapper)InstancePool.get(
647 getFriendlyURLMapperClass());
648 }
649 }
650
651 return null;
652 }
653
654
659 public String getURLEncoderClass() {
660 return _urlEncoderClass;
661 }
662
663
668 public void setURLEncoderClass(String urlEncoderClass) {
669 _urlEncoderClass = urlEncoderClass;
670 }
671
672
677 public URLEncoder getURLEncoderInstance() {
678 if (Validator.isNotNull(getURLEncoderClass())) {
679 if (_portletApp.isWARFile()) {
680 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
681
682 return portletBag.getURLEncoderInstance();
683 }
684 else {
685 return (URLEncoder)InstancePool.get(getURLEncoderClass());
686 }
687 }
688
689 return null;
690 }
691
692
697 public String getPortletDataHandlerClass() {
698 return _portletDataHandlerClass;
699 }
700
701
707 public void setPortletDataHandlerClass(String portletDataHandlerClass) {
708 _portletDataHandlerClass = portletDataHandlerClass;
709 }
710
711
716 public PortletDataHandler getPortletDataHandlerInstance() {
717 if (Validator.isNotNull(getPortletDataHandlerClass())) {
718 if (_portletApp.isWARFile()) {
719 PortletBagImpl portletBagImpl =
720 (PortletBagImpl)PortletBagPool.get(getRootPortletId());
721
722 return portletBagImpl.getPortletDataHandlerInstance();
723 }
724 else {
725 return (PortletDataHandler)InstancePool.get(
726 getPortletDataHandlerClass());
727 }
728 }
729
730 return null;
731 }
732
733
738 public PortletLayoutListener getPortletLayoutListener() {
739 if (Validator.isNull(getPortletLayoutListenerClass())) {
740 return null;
741 }
742
743 return (PortletLayoutListener)InstancePool.get(
744 getPortletLayoutListenerClass());
745 }
746
747
752 public String getPortletLayoutListenerClass() {
753 return _portletLayoutListenerClass;
754 }
755
756
762 public void setPortletLayoutListenerClass(
763 String portletLayoutListenerClass) {
764
765 _portletLayoutListenerClass = portletLayoutListenerClass;
766 }
767
768
773 public PortletLayoutListener getPortletLayoutListenerInstance() {
774 if (Validator.isNull(getPortletLayoutListenerClass())) {
775 return null;
776 }
777
778 if (_portletApp.isWARFile()) {
779 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
780
781 return portletBag.getPortletLayoutListenerInstance();
782 }
783
784 return (PortletLayoutListener)InstancePool.get(
785 getPortletLayoutListenerClass());
786 }
787
788
793 public String getPollerProcessorClass() {
794 return _pollerProcessorClass;
795 }
796
797
803 public void setPollerProcessorClass(String pollerProcessorClass) {
804 _pollerProcessorClass = pollerProcessorClass;
805 }
806
807
812 public PollerProcessor getPollerProcessorInstance() {
813 if (Validator.isNull(getPollerProcessorClass())) {
814 return null;
815 }
816
817 if (_portletApp.isWARFile()) {
818 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
819
820 return portletBag.getPollerProcessorInstance();
821 }
822
823 return (PollerProcessor)InstancePool.get(getPollerProcessorClass());
824 }
825
826
831 public String getPopMessageListenerClass() {
832 return _popMessageListenerClass;
833 }
834
835
841 public void setPopMessageListenerClass(String popMessageListenerClass) {
842 _popMessageListenerClass = popMessageListenerClass;
843 }
844
845
850 public MessageListener getPopMessageListenerInstance() {
851 if (Validator.isNotNull(getPopMessageListenerClass())) {
852 if (_portletApp.isWARFile()) {
853 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
854
855 return portletBag.getPopMessageListenerInstance();
856 }
857 else {
858 return (MessageListener)InstancePool.get(
859 getPopMessageListenerClass());
860 }
861 }
862
863 return null;
864 }
865
866
872 public String getSocialActivityInterpreterClass() {
873 return _socialActivityInterpreterClass;
874 }
875
876
882 public void setSocialActivityInterpreterClass(
883 String socialActivityInterpreterClass) {
884
885 _socialActivityInterpreterClass = socialActivityInterpreterClass;
886 }
887
888
894 public SocialActivityInterpreter getSocialActivityInterpreterInstance() {
895 if (Validator.isNotNull(getSocialActivityInterpreterClass())) {
896 if (_portletApp.isWARFile()) {
897 PortletBagImpl portletBagImpl =
898 (PortletBagImpl)PortletBagPool.get(getRootPortletId());
899
900 return portletBagImpl.getSocialActivityInterpreterInstance();
901 }
902 else {
903 return (SocialActivityInterpreter)InstancePool.get(
904 getSocialActivityInterpreterClass());
905 }
906 }
907
908 return null;
909 }
910
911
917 public String getSocialRequestInterpreterClass() {
918 return _socialRequestInterpreterClass;
919 }
920
921
927 public void setSocialRequestInterpreterClass(
928 String socialRequestInterpreterClass) {
929
930 _socialRequestInterpreterClass = socialRequestInterpreterClass;
931 }
932
933
939 public SocialRequestInterpreter getSocialRequestInterpreterInstance() {
940 if (Validator.isNotNull(getSocialRequestInterpreterClass())) {
941 if (_portletApp.isWARFile()) {
942 PortletBagImpl portletBag =
943 (PortletBagImpl)PortletBagPool.get(getRootPortletId());
944
945 return portletBag.getSocialRequestInterpreterInstance();
946 }
947 else {
948 return (SocialRequestInterpreter)InstancePool.get(
949 getSocialRequestInterpreterClass());
950 }
951 }
952
953 return null;
954 }
955
956
961 public String getDefaultPreferences() {
962 if (Validator.isNull(_defaultPreferences)) {
963 return PortletConstants.DEFAULT_PREFERENCES;
964 }
965 else {
966 return _defaultPreferences;
967 }
968 }
969
970
975 public void setDefaultPreferences(String defaultPreferences) {
976 _defaultPreferences = defaultPreferences;
977 }
978
979
984 public String getPreferencesValidator() {
985 return _prefsValidator;
986 }
987
988
994 public void setPreferencesValidator(String prefsValidator) {
995 if (prefsValidator != null) {
996
997
1000 _prefsValidator = prefsValidator.trim();
1001 }
1002 else {
1003 _prefsValidator = null;
1004 }
1005 }
1006
1007
1012 public boolean getPreferencesCompanyWide() {
1013 return _prefsCompanyWide;
1014 }
1015
1016
1021 public boolean isPreferencesCompanyWide() {
1022 return _prefsCompanyWide;
1023 }
1024
1025
1031 public void setPreferencesCompanyWide(boolean prefsCompanyWide) {
1032 _prefsCompanyWide = prefsCompanyWide;
1033 }
1034
1035
1040 public boolean getPreferencesUniquePerLayout() {
1041 return _prefsUniquePerLayout;
1042 }
1043
1044
1049 public boolean isPreferencesUniquePerLayout() {
1050 return _prefsUniquePerLayout;
1051 }
1052
1053
1059 public void setPreferencesUniquePerLayout(boolean prefsUniquePerLayout) {
1060 _prefsUniquePerLayout = prefsUniquePerLayout;
1061 }
1062
1063
1072 public boolean getPreferencesOwnedByGroup() {
1073 return _prefsOwnedByGroup;
1074 }
1075
1076
1085 public boolean isPreferencesOwnedByGroup() {
1086 return _prefsOwnedByGroup;
1087 }
1088
1089
1098 public void setPreferencesOwnedByGroup(boolean prefsOwnedByGroup) {
1099 _prefsOwnedByGroup = prefsOwnedByGroup;
1100 }
1101
1102
1107 public boolean getUseDefaultTemplate() {
1108 return _useDefaultTemplate;
1109 }
1110
1111
1116 public boolean isUseDefaultTemplate() {
1117 return _useDefaultTemplate;
1118 }
1119
1120
1126 public void setUseDefaultTemplate(boolean useDefaultTemplate) {
1127 _useDefaultTemplate = useDefaultTemplate;
1128 }
1129
1130
1137 public boolean getShowPortletAccessDenied() {
1138 return _showPortletAccessDenied;
1139 }
1140
1141
1148 public boolean isShowPortletAccessDenied() {
1149 return _showPortletAccessDenied;
1150 }
1151
1152
1159 public void setShowPortletAccessDenied(boolean showPortletAccessDenied) {
1160 _showPortletAccessDenied = showPortletAccessDenied;
1161 }
1162
1163
1168 public boolean getShowPortletInactive() {
1169 return _showPortletInactive;
1170 }
1171
1172
1177 public boolean isShowPortletInactive() {
1178 return _showPortletInactive;
1179 }
1180
1181
1187 public void setShowPortletInactive(boolean showPortletInactive) {
1188 _showPortletInactive = showPortletInactive;
1189 }
1190
1191
1198 public boolean getActionURLRedirect() {
1199 return _actionURLRedirect;
1200 }
1201
1202
1209 public boolean isActionURLRedirect() {
1210 return _actionURLRedirect;
1211 }
1212
1213
1220 public void setActionURLRedirect(boolean actionURLRedirect) {
1221 _actionURLRedirect = actionURLRedirect;
1222 }
1223
1224
1231 public boolean getRestoreCurrentView() {
1232 return _restoreCurrentView;
1233 }
1234
1235
1242 public boolean isRestoreCurrentView() {
1243 return _restoreCurrentView;
1244 }
1245
1246
1253 public void setRestoreCurrentView(boolean restoreCurrentView) {
1254 _restoreCurrentView = restoreCurrentView;
1255 }
1256
1257
1264 public boolean getMaximizeEdit() {
1265 return _maximizeEdit;
1266 }
1267
1268
1275 public boolean isMaximizeEdit() {
1276 return _maximizeEdit;
1277 }
1278
1279
1286 public void setMaximizeEdit(boolean maximizeEdit) {
1287 _maximizeEdit = maximizeEdit;
1288 }
1289
1290
1297 public boolean getMaximizeHelp() {
1298 return _maximizeHelp;
1299 }
1300
1301
1308 public boolean isMaximizeHelp() {
1309 return _maximizeHelp;
1310 }
1311
1312
1319 public void setMaximizeHelp(boolean maximizeHelp) {
1320 _maximizeHelp = maximizeHelp;
1321 }
1322
1323
1330 public boolean getPopUpPrint() {
1331 return _popUpPrint;
1332 }
1333
1334
1341 public boolean isPopUpPrint() {
1342 return _popUpPrint;
1343 }
1344
1345
1352 public void setPopUpPrint(boolean popUpPrint) {
1353 _popUpPrint = popUpPrint;
1354 }
1355
1356
1361 public boolean getLayoutCacheable() {
1362 return _layoutCacheable;
1363 }
1364
1365
1370 public boolean isLayoutCacheable() {
1371 return _layoutCacheable;
1372 }
1373
1374
1380 public void setLayoutCacheable(boolean layoutCacheable) {
1381 _layoutCacheable = layoutCacheable;
1382 }
1383
1384
1389 public boolean getInstanceable() {
1390 return _instanceable;
1391 }
1392
1393
1398 public boolean isInstanceable() {
1399 return _instanceable;
1400 }
1401
1402
1408 public void setInstanceable(boolean instanceable) {
1409 _instanceable = instanceable;
1410 }
1411
1412
1417 public String getUserPrincipalStrategy() {
1418 return _userPrincipalStrategy;
1419 }
1420
1421
1426 public void setUserPrincipalStrategy(String userPrincipalStrategy) {
1427 if (Validator.isNotNull(userPrincipalStrategy)) {
1428 _userPrincipalStrategy = userPrincipalStrategy;
1429 }
1430 }
1431
1432
1439 public boolean getPrivateRequestAttributes() {
1440 return _privateRequestAttributes;
1441 }
1442
1443
1450 public boolean isPrivateRequestAttributes() {
1451 return _privateRequestAttributes;
1452 }
1453
1454
1462 public void setPrivateRequestAttributes(boolean privateRequestAttributes) {
1463 _privateRequestAttributes = privateRequestAttributes;
1464 }
1465
1466
1473 public boolean getPrivateSessionAttributes() {
1474 return _privateSessionAttributes;
1475 }
1476
1477
1484 public boolean isPrivateSessionAttributes() {
1485 return _privateSessionAttributes;
1486 }
1487
1488
1495 public void setPrivateSessionAttributes(boolean privateSessionAttributes) {
1496 _privateSessionAttributes = privateSessionAttributes;
1497 }
1498
1499
1504 public int getRenderWeight() {
1505 return _renderWeight;
1506 }
1507
1508
1513 public void setRenderWeight(int renderWeight) {
1514 _renderWeight = renderWeight;
1515 }
1516
1517
1522 public boolean getAjaxable() {
1523 return _ajaxable;
1524 }
1525
1526
1531 public boolean isAjaxable() {
1532 return _ajaxable;
1533 }
1534
1535
1541 public void setAjaxable(boolean ajaxable) {
1542 _ajaxable = ajaxable;
1543 }
1544
1545
1552 public List<String> getHeaderPortalCss() {
1553 return _headerPortalCss;
1554 }
1555
1556
1563 public void setHeaderPortalCss(List<String> headerPortalCss) {
1564 _headerPortalCss = headerPortalCss;
1565 }
1566
1567
1574 public List<String> getHeaderPortletCss() {
1575 return _headerPortletCss;
1576 }
1577
1578
1585 public void setHeaderPortletCss(List<String> headerPortletCss) {
1586 _headerPortletCss = headerPortletCss;
1587 }
1588
1589
1596 public List<String> getHeaderPortalJavaScript() {
1597 return _headerPortalJavaScript;
1598 }
1599
1600
1608 public void setHeaderPortalJavaScript(List<String> headerPortalJavaScript) {
1609 _headerPortalJavaScript = headerPortalJavaScript;
1610 }
1611
1612
1619 public List<String> getHeaderPortletJavaScript() {
1620 return _headerPortletJavaScript;
1621 }
1622
1623
1631 public void setHeaderPortletJavaScript(
1632 List<String> headerPortletJavaScript) {
1633
1634 _headerPortletJavaScript = headerPortletJavaScript;
1635 }
1636
1637
1644 public List<String> getFooterPortalCss() {
1645 return _footerPortalCss;
1646 }
1647
1648
1655 public void setFooterPortalCss(List<String> footerPortalCss) {
1656 _footerPortalCss = footerPortalCss;
1657 }
1658
1659
1666 public List<String> getFooterPortletCss() {
1667 return _footerPortletCss;
1668 }
1669
1670
1677 public void setFooterPortletCss(List<String> footerPortletCss) {
1678 _footerPortletCss = footerPortletCss;
1679 }
1680
1681
1688 public List<String> getFooterPortalJavaScript() {
1689 return _footerPortalJavaScript;
1690 }
1691
1692
1700 public void setFooterPortalJavaScript(List<String> footerPortalJavaScript) {
1701 _footerPortalJavaScript = footerPortalJavaScript;
1702 }
1703
1704
1711 public List<String> getFooterPortletJavaScript() {
1712 return _footerPortletJavaScript;
1713 }
1714
1715
1723 public void setFooterPortletJavaScript(
1724 List<String> footerPortletJavaScript) {
1725
1726 _footerPortletJavaScript = footerPortletJavaScript;
1727 }
1728
1729
1736 public String getCssClassWrapper() {
1737 return _cssClassWrapper;
1738 }
1739
1740
1747 public void setCssClassWrapper(String cssClassWrapper) {
1748 _cssClassWrapper = cssClassWrapper;
1749 }
1750
1751
1756 public String getFacebookIntegration() {
1757 return _facebookIntegration;
1758 }
1759
1760
1765 public void setFacebookIntegration(String facebookIntegration) {
1766 if (Validator.isNotNull(facebookIntegration)) {
1767 _facebookIntegration = facebookIntegration;
1768 }
1769 }
1770
1771
1777 public boolean getAddDefaultResource() {
1778 return _addDefaultResource;
1779 }
1780
1781
1787 public boolean isAddDefaultResource() {
1788 return _addDefaultResource;
1789 }
1790
1791
1797 public void setAddDefaultResource(boolean addDefaultResource) {
1798 _addDefaultResource = addDefaultResource;
1799 }
1800
1801
1806 public void setRoles(String roles) {
1807 _rolesArray = StringUtil.split(roles);
1808
1809 super.setRoles(roles);
1810 }
1811
1812
1817 public String[] getRolesArray() {
1818 return _rolesArray;
1819 }
1820
1821
1826 public void setRolesArray(String[] rolesArray) {
1827 _rolesArray = rolesArray;
1828
1829 super.setRoles(StringUtil.merge(rolesArray));
1830 }
1831
1832
1837 public Set<String> getUnlinkedRoles() {
1838 return _unlinkedRoles;
1839 }
1840
1841
1846 public void setUnlinkedRoles(Set<String> unlinkedRoles) {
1847 _unlinkedRoles = unlinkedRoles;
1848 }
1849
1850
1855 public Map<String, String> getRoleMappers() {
1856 return _roleMappers;
1857 }
1858
1859
1864 public void setRoleMappers(Map<String, String> roleMappers) {
1865 _roleMappers = roleMappers;
1866 }
1867
1868
1872 public void linkRoles() {
1873 List<String> linkedRoles = new ArrayList<String>();
1874
1875 Iterator<String> itr = _unlinkedRoles.iterator();
1876
1877 while (itr.hasNext()) {
1878 String unlinkedRole = itr.next();
1879
1880 String roleLink = _roleMappers.get(unlinkedRole);
1881
1882 if (Validator.isNotNull(roleLink)) {
1883 if (_log.isDebugEnabled()) {
1884 _log.debug(
1885 "Linking role for portlet [" + getPortletId() +
1886 "] with role-name [" + unlinkedRole +
1887 "] to role-link [" + roleLink + "]");
1888 }
1889
1890 linkedRoles.add(roleLink);
1891 }
1892 else {
1893 _log.error(
1894 "Unable to link role for portlet [" + getPortletId() +
1895 "] with role-name [" + unlinkedRole +
1896 "] because role-link is null");
1897 }
1898 }
1899
1900 String[] array = linkedRoles.toArray(new String[linkedRoles.size()]);
1901
1902 Arrays.sort(array);
1903
1904 setRolesArray(array);
1905 }
1906
1907
1912 public boolean hasRoleWithName(String roleName) {
1913 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
1914 return false;
1915 }
1916
1917 for (int i = 0; i < _rolesArray.length; i++) {
1918 if (_rolesArray[i].equalsIgnoreCase(roleName)) {
1919 return true;
1920 }
1921 }
1922
1923 return false;
1924 }
1925
1926
1933 public boolean hasAddPortletPermission(long userId) {
1934 try {
1935 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
1936 return true;
1937 }
1938 else if (RoleLocalServiceUtil.hasUserRoles(
1939 userId, getCompanyId(), _rolesArray, true)) {
1940
1941 return true;
1942 }
1943 else if (RoleLocalServiceUtil.hasUserRole(
1944 userId, getCompanyId(), RoleConstants.ADMINISTRATOR,
1945 true)) {
1946
1947 return true;
1948 }
1949 else {
1950 User user = UserLocalServiceUtil.getUserById(userId);
1951
1952 if (user.isDefaultUser() &&
1953 hasRoleWithName(RoleConstants.GUEST)) {
1954
1955 return true;
1956 }
1957 }
1958 }
1959 catch (Exception e) {
1960 _log.error(e);
1961 }
1962
1963 return false;
1964 }
1965
1966
1973 public boolean getSystem() {
1974 return _system;
1975 }
1976
1977
1984 public boolean isSystem() {
1985 return _system;
1986 }
1987
1988
1995 public void setSystem(boolean system) {
1996 _system = system;
1997 }
1998
1999
2006 public boolean getInclude() {
2007 return _include;
2008 }
2009
2010
2017 public boolean isInclude() {
2018 return _include;
2019 }
2020
2021
2028 public void setInclude(boolean include) {
2029 _include = include;
2030 }
2031
2032
2037 public Map<String, String> getInitParams() {
2038 return _initParams;
2039 }
2040
2041
2046 public void setInitParams(Map<String, String> initParams) {
2047 _initParams = initParams;
2048 }
2049
2050
2055 public Integer getExpCache() {
2056 return _expCache;
2057 }
2058
2059
2064 public void setExpCache(Integer expCache) {
2065 _expCache = expCache;
2066 }
2067
2068
2073 public Map<String, Set<String>> getPortletModes() {
2074 return _portletModes;
2075 }
2076
2077
2082 public void setPortletModes(Map<String, Set<String>> portletModes) {
2083 _portletModes = portletModes;
2084 }
2085
2086
2093 public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
2094 if (mimeType == null) {
2095 mimeType = ContentTypes.TEXT_HTML;
2096 }
2097
2098 Set<String> mimeTypePortletModes = _portletModes.get(mimeType);
2099
2100 if (mimeTypePortletModes == null) {
2101 return false;
2102 }
2103
2104 if (mimeTypePortletModes.contains(portletMode.toString())) {
2105 return true;
2106 }
2107 else {
2108 return false;
2109 }
2110 }
2111
2112
2117 public Set<String> getAllPortletModes() {
2118 Set<String> allPortletModes = new TreeSet<String>();
2119
2120 Iterator<Map.Entry <String, Set<String>>> itr1 =
2121 _portletModes.entrySet().iterator();
2122
2123 while (itr1.hasNext()) {
2124 Map.Entry<String, Set<String>> entry = itr1.next();
2125
2126 Set<String> mimeTypePortletModes = entry.getValue();
2127
2128 Iterator<String> itr2 = mimeTypePortletModes.iterator();
2129
2130 while (itr2.hasNext()) {
2131 String portletMode = itr2.next();
2132
2133 allPortletModes.add(portletMode);
2134 }
2135 }
2136
2137 return allPortletModes;
2138 }
2139
2140
2145 public boolean hasMultipleMimeTypes() {
2146 if (_portletModes.size() > 1) {
2147 return true;
2148 }
2149 else {
2150 return false;
2151 }
2152 }
2153
2154
2159 public Map<String, Set<String>> getWindowStates() {
2160 return _windowStates;
2161 }
2162
2163
2168 public void setWindowStates(Map<String, Set<String>> windowStates) {
2169 _windowStates = windowStates;
2170 }
2171
2172
2179 public boolean hasWindowState(String mimeType, WindowState windowState) {
2180 if (mimeType == null) {
2181 mimeType = ContentTypes.TEXT_HTML;
2182 }
2183
2184 Set<String> mimeTypeWindowStates = _windowStates.get(mimeType);
2185
2186 if (mimeTypeWindowStates == null) {
2187 return false;
2188 }
2189
2190 if (mimeTypeWindowStates.contains(windowState.toString())) {
2191 return true;
2192 }
2193 else {
2194 return false;
2195 }
2196 }
2197
2198
2203 public Set<String> getAllWindowStates() {
2204 Set<String> allWindowStates = new TreeSet<String>();
2205
2206 Iterator<Map.Entry <String, Set<String>>> itr1 =
2207 _windowStates.entrySet().iterator();
2208
2209 while (itr1.hasNext()) {
2210 Map.Entry<String, Set<String>> entry = itr1.next();
2211
2212 Set<String> mimeTypeWindowStates = entry.getValue();
2213
2214 Iterator<String> itr2 = mimeTypeWindowStates.iterator();
2215
2216 while (itr2.hasNext()) {
2217 String windowState = itr2.next();
2218
2219 allWindowStates.add(windowState);
2220 }
2221 }
2222
2223 return allWindowStates;
2224 }
2225
2226
2231 public Set<String> getSupportedLocales() {
2232 return _supportedLocales;
2233 }
2234
2235
2240 public void setSupportedLocales(Set<String> supportedLocales) {
2241 _supportedLocales = supportedLocales;
2242 }
2243
2244
2249 public String getResourceBundle() {
2250 return _resourceBundle;
2251 }
2252
2253
2258 public void setResourceBundle(String resourceBundle) {
2259 _resourceBundle = resourceBundle;
2260 }
2261
2262
2267 public PortletInfo getPortletInfo() {
2268 return _portletInfo;
2269 }
2270
2271
2276 public void setPortletInfo(PortletInfo portletInfo) {
2277 _portletInfo = portletInfo;
2278 }
2279
2280
2285 public Map<String, PortletFilter> getPortletFilters() {
2286 return _portletFilters;
2287 }
2288
2289
2294 public void setPortletFilters(Map<String, PortletFilter> portletFilters) {
2295 _portletFilters = portletFilters;
2296 }
2297
2298
2301 public void addProcessingEvent(QName processingEvent) {
2302 _processingEvents.add(processingEvent);
2303 _processingEventsByQName.put(
2304 QNameUtil.getKey(processingEvent), processingEvent);
2305 }
2306
2307
2314 public QName getProcessingEvent(String uri, String localPart) {
2315 return _processingEventsByQName.get(
2316 QNameUtil.getKey(uri, localPart));
2317 }
2318
2319
2324 public Set<QName> getProcessingEvents() {
2325 return _processingEvents;
2326 }
2327
2328
2333 public void setProcessingEvents(Set<QName> processingEvents) {
2334 for (QName processingEvent : processingEvents) {
2335 addProcessingEvent(processingEvent);
2336 }
2337 }
2338
2339
2342 public void addPublishingEvent(QName publishingEvent) {
2343 _publishingEvents.add(publishingEvent);
2344 }
2345
2346
2351 public Set<QName> getPublishingEvents() {
2352 return _publishingEvents;
2353 }
2354
2355
2360 public void setPublishingEvents(Set<QName> publishingEvents) {
2361 for (QName publishingEvent : publishingEvents) {
2362 addPublishingEvent(publishingEvent);
2363 }
2364 }
2365
2366
2371 public void addPublicRenderParameter(
2372 PublicRenderParameter publicRenderParameter) {
2373
2374 _publicRenderParameters.add(publicRenderParameter);
2375 _publicRenderParametersByIdentifier.put(
2376 publicRenderParameter.getIdentifier(), publicRenderParameter);
2377 _publicRenderParametersByQName.put(
2378 QNameUtil.getKey(publicRenderParameter.getQName()),
2379 publicRenderParameter);
2380 }
2381
2382
2387 public PublicRenderParameter getPublicRenderParameter(String identifier) {
2388 return _publicRenderParametersByIdentifier.get(identifier);
2389 }
2390
2391
2398 public PublicRenderParameter getPublicRenderParameter(
2399 String uri, String localPart) {
2400
2401 return _publicRenderParametersByQName.get(
2402 QNameUtil.getKey(uri, localPart));
2403 }
2404
2405
2410 public Set<PublicRenderParameter> getPublicRenderParameters() {
2411 return _publicRenderParameters;
2412 }
2413
2414
2420 public void setPublicRenderParameters(
2421 Set<PublicRenderParameter> publicRenderParameters) {
2422
2423 for (PublicRenderParameter publicRenderParameter :
2424 publicRenderParameters) {
2425
2426 addPublicRenderParameter(publicRenderParameter);
2427 }
2428 }
2429
2430
2435 public String getContextPath() {
2436 String virtualPath = getVirtualPath();
2437
2438 if (Validator.isNotNull(virtualPath)) {
2439 return virtualPath;
2440 }
2441
2442 if (_portletApp.isWARFile()) {
2443 StringBuilder sb = new StringBuilder();
2444
2445 sb.append(StringPool.SLASH);
2446 sb.append(_portletApp.getServletContextName());
2447
2448 return sb.toString();
2449 }
2450 else {
2451 return PortalUtil.getPathContext();
2452 }
2453 }
2454
2455
2460 public PortletApp getPortletApp() {
2461 return _portletApp;
2462 }
2463
2464
2469 public void setPortletApp(PortletApp portletApp) {
2470 _portletApp = portletApp;
2471 }
2472
2473
2479 public Portlet getClonedInstance(String portletId) {
2480 if (_clonedInstances == null) {
2481
2482
2484 return null;
2485 }
2486
2487 Portlet clonedInstance = _clonedInstances.get(portletId);
2488
2489 if (clonedInstance == null) {
2490 clonedInstance = (Portlet)clone();
2491
2492 clonedInstance.setPortletId(portletId);
2493
2494
2501 }
2503
2504 return clonedInstance;
2505 }
2506
2507
2513 public boolean getStatic() {
2514 return _staticPortlet;
2515 }
2516
2517
2523 public boolean isStatic() {
2524 return _staticPortlet;
2525 }
2526
2527
2533 public void setStatic(boolean staticPortlet) {
2534 _staticPortlet = staticPortlet;
2535 }
2536
2537
2544 public boolean getStaticStart() {
2545 return _staticPortletStart;
2546 }
2547
2548
2555 public boolean isStaticStart() {
2556 return _staticPortletStart;
2557 }
2558
2559
2566 public void setStaticStart(boolean staticPortletStart) {
2567 _staticPortletStart = staticPortletStart;
2568 }
2569
2570
2577 public boolean getStaticEnd() {
2578 return !_staticPortletStart;
2579 }
2580
2581
2588 public boolean isStaticEnd() {
2589 return !_staticPortletStart;
2590 }
2591
2592
2597 public boolean getUndeployedPortlet() {
2598 return _undeployedPortlet;
2599 }
2600
2601
2606 public boolean isUndeployedPortlet() {
2607 return _undeployedPortlet;
2608 }
2609
2610
2616 public void setUndeployedPortlet(boolean undeployedPortlet) {
2617 _undeployedPortlet = undeployedPortlet;
2618 }
2619
2620
2625 public Object clone() {
2626 Portlet portlet = new PortletImpl(
2627 getPortletId(), getPluginPackage(), getDefaultPluginSetting(),
2628 getCompanyId(), getTimestamp(), getIcon(), getVirtualPath(),
2629 getStrutsPath(), getPortletName(), getDisplayName(),
2630 getPortletClass(), getConfigurationActionClass(), getIndexerClass(),
2631 getOpenSearchClass(), getSchedulerClass(), getPortletURLClass(),
2632 getFriendlyURLMapperClass(), getURLEncoderClass(),
2633 getPortletDataHandlerClass(), getPortletLayoutListenerClass(),
2634 getPollerProcessorClass(), getPopMessageListenerClass(),
2635 getSocialActivityInterpreterClass(),
2636 getSocialRequestInterpreterClass(), getDefaultPreferences(),
2637 getPreferencesValidator(), isPreferencesCompanyWide(),
2638 isPreferencesUniquePerLayout(), isPreferencesOwnedByGroup(),
2639 isUseDefaultTemplate(), isShowPortletAccessDenied(),
2640 isShowPortletInactive(), isActionURLRedirect(),
2641 isRestoreCurrentView(), isMaximizeEdit(), isMaximizeHelp(),
2642 isPopUpPrint(), isLayoutCacheable(), isInstanceable(),
2643 getUserPrincipalStrategy(), isPrivateRequestAttributes(),
2644 isPrivateSessionAttributes(), getRenderWeight(), isAjaxable(),
2645 getHeaderPortalCss(), getHeaderPortletCss(),
2646 getHeaderPortalJavaScript(), getHeaderPortletJavaScript(),
2647 getFooterPortalCss(), getFooterPortletCss(),
2648 getFooterPortalJavaScript(), getFooterPortletJavaScript(),
2649 getCssClassWrapper(), getFacebookIntegration(),
2650 isAddDefaultResource(), getRoles(), getUnlinkedRoles(),
2651 getRoleMappers(), isSystem(), isActive(), isInclude(),
2652 getInitParams(), getExpCache(), getPortletModes(),
2653 getWindowStates(), getSupportedLocales(), getResourceBundle(),
2654 getPortletInfo(), getPortletFilters(), getProcessingEvents(),
2655 getPublishingEvents(), getPublicRenderParameters(),
2656 getPortletApp());
2657
2658 portlet.setId(getId());
2659
2660 return portlet;
2661 }
2662
2663
2672 public int compareTo(Portlet portlet) {
2673 return getPortletId().compareTo(portlet.getPortletId());
2674 }
2675
2676
2682 public boolean equals(Object obj) {
2683 Portlet portlet = (Portlet)obj;
2684
2685 return getPortletId().equals(portlet.getPortletId());
2686 }
2687
2688
2691 private static Log _log = LogFactoryUtil.getLog(PortletImpl.class);
2692
2693
2696 private PluginPackage _pluginPackage;
2697
2698
2701 private PluginSetting _defaultPluginSetting;
2702
2703
2706 private long _timestamp;
2707
2708
2711 private String _icon;
2712
2713
2716 private String _virtualPath;
2717
2718
2721 private String _strutsPath;
2722
2723
2726 private String _portletName;
2727
2728
2731 private String _displayName;
2732
2733
2736 private String _portletClass;
2737
2738
2741 private String _configurationActionClass;
2742
2743
2746 private String _indexerClass;
2747
2748
2751 private String _openSearchClass;
2752
2753
2756 private String _schedulerClass;
2757
2758
2761 private String _portletURLClass;
2762
2763
2766 private String _friendlyURLMapperClass;
2767
2768
2771 private String _urlEncoderClass;
2772
2773
2776 private String _portletDataHandlerClass;
2777
2778
2781 private String _portletLayoutListenerClass;
2782
2783
2786 private String _pollerProcessorClass;
2787
2788
2791 private String _popMessageListenerClass;
2792
2793
2796 private String _socialActivityInterpreterClass;
2797
2798
2801 private String _socialRequestInterpreterClass;
2802
2803
2806 private String _defaultPreferences;
2807
2808
2811 private String _prefsValidator;
2812
2813
2816 private boolean _prefsCompanyWide;
2817
2818
2821 private boolean _prefsUniquePerLayout = true;
2822
2823
2827 private boolean _prefsOwnedByGroup = true;
2828
2829
2832 private boolean _useDefaultTemplate = true;
2833
2834
2837 private boolean _showPortletAccessDenied =
2838 PropsValues.LAYOUT_SHOW_PORTLET_ACCESS_DENIED;
2839
2840
2843 private boolean _showPortletInactive =
2844 PropsValues.LAYOUT_SHOW_PORTLET_INACTIVE;
2845
2846
2849 private boolean _actionURLRedirect;
2850
2851
2855 private boolean _restoreCurrentView = true;
2856
2857
2861 private boolean _maximizeEdit;
2862
2863
2867 private boolean _maximizeHelp;
2868
2869
2873 private boolean _popUpPrint = true;
2874
2875
2878 private boolean _layoutCacheable;
2879
2880
2883 private boolean _instanceable;
2884
2885
2888 private String _userPrincipalStrategy =
2889 PortletConstants.USER_PRINCIPAL_STRATEGY_USER_ID;
2890
2891
2895 private boolean _privateRequestAttributes = true;
2896
2897
2900 private boolean _privateSessionAttributes = true;
2901
2902
2905 private int _renderWeight = 1;
2906
2907
2910 private boolean _ajaxable = true;
2911
2912
2916 private List<String> _headerPortalCss;
2917
2918
2922 private List<String> _headerPortletCss;
2923
2924
2928 private List<String> _headerPortalJavaScript;
2929
2930
2934 private List<String> _headerPortletJavaScript;
2935
2936
2940 private List<String> _footerPortalCss;
2941
2942
2946 private List<String> _footerPortletCss;
2947
2948
2952 private List<String> _footerPortalJavaScript;
2953
2954
2958 private List<String> _footerPortletJavaScript;
2959
2960
2964 private String _cssClassWrapper = StringPool.BLANK;
2965
2966
2969 private String _facebookIntegration =
2970 PortletConstants.FACEBOOK_INTEGRATION_IFRAME;
2971
2972
2975 private boolean _addDefaultResource;
2976
2977
2980 private String[] _rolesArray;
2981
2982
2985 private Set<String> _unlinkedRoles;
2986
2987
2990 private Map<String, String> _roleMappers;
2991
2992
2996 private boolean _system;
2997
2998
3001 private boolean _include = true;
3002
3003
3006 private Map<String, String> _initParams;
3007
3008
3011 private Integer _expCache;
3012
3013
3016 private Map<String, Set<String>> _portletModes;
3017
3018
3021 private Map<String, Set<String>> _windowStates;
3022
3023
3026 private Set<String> _supportedLocales;
3027
3028
3031 private String _resourceBundle;
3032
3033
3036 private PortletInfo _portletInfo;
3037
3038
3041 private Map<String, PortletFilter> _portletFilters;
3042
3043
3046 private Set<QName> _processingEvents = new HashSet<QName>();
3047
3048
3051 private Map<String, QName> _processingEventsByQName =
3052 new HashMap<String, QName>();
3053
3054
3057 private Set<QName> _publishingEvents = new HashSet<QName>();
3058
3059
3062 private Set<PublicRenderParameter> _publicRenderParameters =
3063 new HashSet<PublicRenderParameter>();
3064
3065
3069 private Map<String, PublicRenderParameter>
3070 _publicRenderParametersByIdentifier =
3071 new HashMap<String, PublicRenderParameter>();
3072
3073
3077 private Map<String, PublicRenderParameter>
3078 _publicRenderParametersByQName =
3079 new HashMap<String, PublicRenderParameter>();
3080
3081
3084 private PortletApp _portletApp;
3085
3086
3089 private Map<String, Portlet> _clonedInstances;
3090
3091
3094 private boolean _staticPortlet;
3095
3096
3100 private boolean _staticPortletStart;
3101
3102
3105 private boolean _undeployedPortlet = false;
3106
3107}