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.pop.MessageListener;
30 import com.liferay.portal.kernel.portlet.ConfigurationAction;
31 import com.liferay.portal.kernel.portlet.FriendlyURLMapper;
32 import com.liferay.portal.kernel.portlet.PortletBag;
33 import com.liferay.portal.kernel.portlet.PortletBagPool;
34 import com.liferay.portal.kernel.portlet.PortletLayoutListener;
35 import com.liferay.portal.kernel.search.Indexer;
36 import com.liferay.portal.kernel.search.OpenSearch;
37 import com.liferay.portal.kernel.servlet.URLEncoder;
38 import com.liferay.portal.kernel.util.ContentTypes;
39 import com.liferay.portal.kernel.util.InstancePool;
40 import com.liferay.portal.kernel.util.StringPool;
41 import com.liferay.portal.kernel.util.StringUtil;
42 import com.liferay.portal.kernel.util.Validator;
43 import com.liferay.portal.kernel.xml.QName;
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.webdav.WebDAVStorage;
60 import com.liferay.portlet.ControlPanelEntry;
61 import com.liferay.portlet.PortletBagImpl;
62 import com.liferay.portlet.PortletQNameUtil;
63 import com.liferay.portlet.social.model.SocialActivityInterpreter;
64 import com.liferay.portlet.social.model.SocialRequestInterpreter;
65
66 import java.util.ArrayList;
67 import java.util.Arrays;
68 import java.util.HashMap;
69 import java.util.HashSet;
70 import java.util.Hashtable;
71 import java.util.Iterator;
72 import java.util.LinkedHashMap;
73 import java.util.List;
74 import java.util.Map;
75 import java.util.Set;
76 import java.util.TreeSet;
77
78 import javax.portlet.PortletMode;
79
80
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 _supportedLocales = new HashSet<String>();
115 _portletFilters = new LinkedHashMap<String, PortletFilter>();
116 _processingEvents = new HashSet<QName>();
117 _publishingEvents = new HashSet<QName>();
118 _publicRenderParameters = new HashSet<PublicRenderParameter>();
119 }
120
121
124 public PortletImpl(
125 String portletId, PluginPackage pluginPackage,
126 PluginSetting pluginSetting, long companyId, long timestamp,
127 String icon, String virtualPath, String strutsPath, String portletName,
128 String displayName, String portletClass,
129 String configurationActionClass, String indexerClass,
130 String openSearchClass, String schedulerClass, String portletURLClass,
131 String friendlyURLMapperClass, String urlEncoderClass,
132 String portletDataHandlerClass, String portletLayoutListenerClass,
133 String popMessageListenerClass, String socialActivityInterpreterClass,
134 String socialRequestInterpreterClass, String webDAVStorageToken,
135 String webDAVStorageClass, String controlPanelEntryCategory,
136 double controlPanelEntryWeight, String controlPanelClass,
137 String defaultPreferences, String preferencesValidator,
138 boolean preferencesCompanyWide, boolean preferencesUniquePerLayout,
139 boolean preferencesOwnedByGroup, boolean useDefaultTemplate,
140 boolean showPortletAccessDenied, boolean showPortletInactive,
141 boolean actionURLRedirect, boolean restoreCurrentView,
142 boolean maximizeEdit, boolean maximizeHelp, boolean popUpPrint,
143 boolean layoutCacheable, boolean instanceable, boolean scopeable,
144 String userPrincipalStrategy, boolean privateRequestAttributes,
145 boolean privateSessionAttributes, int renderWeight, boolean ajaxable,
146 List<String> headerPortalCss, List<String> headerPortletCss,
147 List<String> headerPortalJavaScript,
148 List<String> headerPortletJavaScript, List<String> footerPortalCss,
149 List<String> footerPortletCss, List<String> footerPortalJavaScript,
150 List<String> footerPortletJavaScript, String cssClassWrapper,
151 String facebookIntegration, boolean addDefaultResource, String roles,
152 Set<String> unlinkedRoles, Map<String, String> roleMappers,
153 boolean system, boolean active, boolean include,
154 Map<String, String> initParams, Integer expCache,
155 Map<String, Set<String>> portletModes, Set<String> supportedLocales,
156 String resourceBundle, PortletInfo portletInfo,
157 Map<String, PortletFilter> portletFilters, Set<QName> processingEvents,
158 Set<QName> publishingEvents,
159 Set<PublicRenderParameter> publicRenderParameters, boolean remote,
160 String remoteConsumerId, String remoteProducerEntityId,
161 String remotePortletHandle, String remotePortletId,
162 PortletApp portletApp) {
163
164 setPortletId(portletId);
165 _pluginPackage = pluginPackage;
166 _defaultPluginSetting = pluginSetting;
167 setCompanyId(companyId);
168 _timestamp = timestamp;
169 _icon = icon;
170 _virtualPath = virtualPath;
171 _strutsPath = strutsPath;
172 _portletName = portletName;
173 _displayName = displayName;
174 _portletClass = portletClass;
175 _configurationActionClass = configurationActionClass;
176 _indexerClass = indexerClass;
177 _openSearchClass = openSearchClass;
178 _schedulerClass = schedulerClass;
179 _portletURLClass = portletURLClass;
180 _friendlyURLMapperClass = friendlyURLMapperClass;
181 _urlEncoderClass = urlEncoderClass;
182 _portletDataHandlerClass = portletDataHandlerClass;
183 _portletLayoutListenerClass = portletLayoutListenerClass;
184 _popMessageListenerClass = popMessageListenerClass;
185 _socialActivityInterpreterClass = socialActivityInterpreterClass;
186 _socialRequestInterpreterClass = socialRequestInterpreterClass;
187 _webDAVStorageToken = webDAVStorageToken;
188 _webDAVStorageClass = webDAVStorageClass;
189 _controlPanelEntryCategory = controlPanelEntryCategory;
190 _controlPanelEntryWeight = controlPanelEntryWeight;
191 _controlPanelEntryClass = controlPanelClass;
192 _defaultPreferences = defaultPreferences;
193 _preferencesValidator = preferencesValidator;
194 _preferencesCompanyWide = preferencesCompanyWide;
195 _preferencesUniquePerLayout = preferencesUniquePerLayout;
196 _preferencesOwnedByGroup = preferencesOwnedByGroup;
197 _useDefaultTemplate = useDefaultTemplate;
198 _showPortletAccessDenied = showPortletAccessDenied;
199 _showPortletInactive = showPortletInactive;
200 _actionURLRedirect = actionURLRedirect;
201 _restoreCurrentView = restoreCurrentView;
202 _maximizeEdit = maximizeEdit;
203 _maximizeHelp = maximizeHelp;
204 _popUpPrint = popUpPrint;
205 _layoutCacheable = layoutCacheable;
206 _instanceable = instanceable;
207 _scopeable = scopeable;
208 _userPrincipalStrategy = userPrincipalStrategy;
209 _privateRequestAttributes = privateRequestAttributes;
210 _privateSessionAttributes = privateSessionAttributes;
211 _renderWeight = renderWeight;
212 _ajaxable = ajaxable;
213 _headerPortalCss = headerPortalCss;
214 _headerPortletCss = headerPortletCss;
215 _headerPortalJavaScript = headerPortalJavaScript;
216 _headerPortletJavaScript = headerPortletJavaScript;
217 _footerPortalCss = footerPortalCss;
218 _footerPortletCss = footerPortletCss;
219 _footerPortalJavaScript = footerPortalJavaScript;
220 _footerPortletJavaScript = footerPortletJavaScript;
221 _cssClassWrapper = cssClassWrapper;
222 _facebookIntegration = facebookIntegration;
223 _scopeable = scopeable;
224 _addDefaultResource = addDefaultResource;
225 setRoles(roles);
226 _unlinkedRoles = unlinkedRoles;
227 _roleMappers = roleMappers;
228 _system = system;
229 setActive(active);
230 _include = include;
231 _initParams = initParams;
232 _expCache = expCache;
233 _portletModes = portletModes;
234 _supportedLocales = supportedLocales;
235 _resourceBundle = resourceBundle;
236 _portletInfo = portletInfo;
237 _portletFilters = portletFilters;
238 setProcessingEvents(processingEvents);
239 setPublishingEvents(publishingEvents);
240 setPublicRenderParameters(publicRenderParameters);
241 _remote = remote;
242 _remoteConsumerId = remoteConsumerId;
243 _remoteProducerEntityId = remoteProducerEntityId;
244 _remotePortletHandle = remotePortletHandle;
245 _remotePortletId = remotePortletId;
246 _portletApp = portletApp;
247
248 if (_instanceable) {
249 _clonedInstances = new Hashtable<String, Portlet>();
250 }
251 }
252
253
258 public String getRootPortletId() {
259 return PortletConstants.getRootPortletId(getPortletId());
260 }
261
262
267 public String getInstanceId() {
268 return PortletConstants.getInstanceId(getPortletId());
269 }
270
271
276 public String getPluginId() {
277 return getRootPortletId();
278 }
279
280
285 public String getPluginType() {
286 return Plugin.TYPE_PORTLET;
287 }
288
289
294 public PluginPackage getPluginPackage() {
295 return _pluginPackage;
296 }
297
298
303 public void setPluginPackage(PluginPackage pluginPackage) {
304 _pluginPackage = pluginPackage;
305 }
306
307
312 public PluginSetting getDefaultPluginSetting() {
313 return _defaultPluginSetting;
314 }
315
316
321 public void setDefaultPluginSetting(PluginSetting pluginSetting) {
322 _defaultPluginSetting = pluginSetting;
323 }
324
325
330 public long getTimestamp() {
331 return _timestamp;
332 }
333
334
339 public void setTimestamp(long timestamp) {
340 _timestamp = timestamp;
341 }
342
343
348 public String getIcon() {
349 return _icon;
350 }
351
352
357 public void setIcon(String icon) {
358 _icon = icon;
359 }
360
361
366 public String getVirtualPath() {
367 return _virtualPath;
368 }
369
370
375 public void setVirtualPath(String virtualPath) {
376 if (_portletApp.isWARFile() && Validator.isNull(virtualPath)) {
377 virtualPath = PropsValues.PORTLET_VIRTUAL_PATH;
378 }
379
380 _virtualPath = virtualPath;
381 }
382
383
388 public String getStrutsPath() {
389 return _strutsPath;
390 }
391
392
397 public void setStrutsPath(String strutsPath) {
398 _strutsPath = strutsPath;
399 }
400
401
406 public String getPortletName() {
407 return _portletName;
408 }
409
410
415 public void setPortletName(String portletName) {
416 _portletName = portletName;
417 }
418
419
424 public String getDisplayName() {
425 return _displayName;
426 }
427
428
433 public void setDisplayName(String displayName) {
434 _displayName = displayName;
435 }
436
437
442 public String getPortletClass() {
443 return _portletClass;
444 }
445
446
451 public void setPortletClass(String portletClass) {
452 _portletClass = portletClass;
453 }
454
455
460 public String getConfigurationActionClass() {
461 return _configurationActionClass;
462 }
463
464
470 public void setConfigurationActionClass(String configurationActionClass) {
471 _configurationActionClass = configurationActionClass;
472 }
473
474
479 public ConfigurationAction getConfigurationActionInstance() {
480 if (Validator.isNull(getConfigurationActionClass())) {
481 return null;
482 }
483
484 if (_portletApp.isWARFile()) {
485 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
486
487 return portletBag.getConfigurationActionInstance();
488 }
489
490 return (ConfigurationAction)InstancePool.get(
491 getConfigurationActionClass());
492 }
493
494
499 public String getIndexerClass() {
500 return _indexerClass;
501 }
502
503
508 public void setIndexerClass(String indexerClass) {
509 _indexerClass = indexerClass;
510 }
511
512
517 public Indexer getIndexerInstance() {
518 if (Validator.isNull(getIndexerClass())) {
519 return null;
520 }
521
522 if (_portletApp.isWARFile()) {
523 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
524
525 return portletBag.getIndexerInstance();
526 }
527
528 return (Indexer)InstancePool.get(getIndexerClass());
529 }
530
531
536 public String getOpenSearchClass() {
537 return _openSearchClass;
538 }
539
540
546 public void setOpenSearchClass(String openSearchClass) {
547 _openSearchClass = openSearchClass;
548 }
549
550
555 public OpenSearch getOpenSearchInstance() {
556 if (Validator.isNull(getOpenSearchClass())) {
557 return null;
558 }
559
560 if (_portletApp.isWARFile()) {
561 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
562
563 return portletBag.getOpenSearchInstance();
564 }
565
566 return (OpenSearch)InstancePool.get(getOpenSearchClass());
567 }
568
569
574 public String getSchedulerClass() {
575 return _schedulerClass;
576 }
577
578
584 public void setSchedulerClass(String schedulerClass) {
585 _schedulerClass = schedulerClass;
586 }
587
588
593 public Scheduler getSchedulerInstance() {
594 if (Validator.isNull(getSchedulerClass())) {
595 return null;
596 }
597
598 if (_portletApp.isWARFile()) {
599 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
600
601 return portletBag.getSchedulerInstance();
602 }
603
604 return (Scheduler)InstancePool.get(getSchedulerClass());
605 }
606
607
612 public String getPortletURLClass() {
613 return _portletURLClass;
614 }
615
616
622 public void setPortletURLClass(String portletURLClass) {
623 _portletURLClass = portletURLClass;
624 }
625
626
631 public String getFriendlyURLMapperClass() {
632 return _friendlyURLMapperClass;
633 }
634
635
641 public void setFriendlyURLMapperClass(String friendlyURLMapperClass) {
642 _friendlyURLMapperClass = friendlyURLMapperClass;
643 }
644
645
650 public FriendlyURLMapper getFriendlyURLMapperInstance() {
651 if (Validator.isNull(getFriendlyURLMapperClass())) {
652 return null;
653 }
654
655 if (_portletApp.isWARFile()) {
656 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
657
658 return portletBag.getFriendlyURLMapperInstance();
659 }
660
661 return (FriendlyURLMapper)InstancePool.get(getFriendlyURLMapperClass());
662 }
663
664
669 public String getURLEncoderClass() {
670 return _urlEncoderClass;
671 }
672
673
679 public void setURLEncoderClass(String urlEncoderClass) {
680 _urlEncoderClass = urlEncoderClass;
681 }
682
683
688 public URLEncoder getURLEncoderInstance() {
689 if (Validator.isNull(getURLEncoderClass())) {
690 return null;
691 }
692
693 if (_portletApp.isWARFile()) {
694 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
695
696 return portletBag.getURLEncoderInstance();
697 }
698
699 return (URLEncoder)InstancePool.get(getURLEncoderClass());
700 }
701
702
707 public String getPortletDataHandlerClass() {
708 return _portletDataHandlerClass;
709 }
710
711
717 public void setPortletDataHandlerClass(String portletDataHandlerClass) {
718 _portletDataHandlerClass = portletDataHandlerClass;
719 }
720
721
726 public PortletDataHandler getPortletDataHandlerInstance() {
727 if (Validator.isNull(getPortletDataHandlerClass())) {
728 return null;
729 }
730
731 if (_portletApp.isWARFile()) {
732 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
733 getRootPortletId());
734
735 return portletBagImpl.getPortletDataHandlerInstance();
736 }
737
738 return (PortletDataHandler)InstancePool.get(
739 getPortletDataHandlerClass());
740 }
741
742
747 public PortletLayoutListener getPortletLayoutListener() {
748 if (Validator.isNull(getPortletLayoutListenerClass())) {
749 return null;
750 }
751
752 return (PortletLayoutListener)InstancePool.get(
753 getPortletLayoutListenerClass());
754 }
755
756
761 public String getPortletLayoutListenerClass() {
762 return _portletLayoutListenerClass;
763 }
764
765
771 public void setPortletLayoutListenerClass(
772 String portletLayoutListenerClass) {
773
774 _portletLayoutListenerClass = portletLayoutListenerClass;
775 }
776
777
782 public String getPopMessageListenerClass() {
783 return _popMessageListenerClass;
784 }
785
786
792 public void setPopMessageListenerClass(String popMessageListenerClass) {
793 _popMessageListenerClass = popMessageListenerClass;
794 }
795
796
801 public MessageListener getPopMessageListenerInstance() {
802 if (Validator.isNull(getPopMessageListenerClass())) {
803 return null;
804 }
805
806 if (_portletApp.isWARFile()) {
807 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
808
809 return portletBag.getPopMessageListenerInstance();
810 }
811
812 return (MessageListener)InstancePool.get(getPopMessageListenerClass());
813 }
814
815
821 public String getSocialActivityInterpreterClass() {
822 return _socialActivityInterpreterClass;
823 }
824
825
831 public void setSocialActivityInterpreterClass(
832 String socialActivityInterpreterClass) {
833
834 _socialActivityInterpreterClass = socialActivityInterpreterClass;
835 }
836
837
843 public SocialActivityInterpreter getSocialActivityInterpreterInstance() {
844 if (Validator.isNull(getSocialActivityInterpreterClass())) {
845 return null;
846 }
847
848 if (_portletApp.isWARFile()) {
849 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
850 getRootPortletId());
851
852 return portletBagImpl.getSocialActivityInterpreterInstance();
853 }
854
855 return (SocialActivityInterpreter)InstancePool.get(
856 getSocialActivityInterpreterClass());
857 }
858
859
865 public String getSocialRequestInterpreterClass() {
866 return _socialRequestInterpreterClass;
867 }
868
869
875 public void setSocialRequestInterpreterClass(
876 String socialRequestInterpreterClass) {
877
878 _socialRequestInterpreterClass = socialRequestInterpreterClass;
879 }
880
881
887 public SocialRequestInterpreter getSocialRequestInterpreterInstance() {
888 if (Validator.isNull(getSocialRequestInterpreterClass())) {
889 return null;
890 }
891
892 if (_portletApp.isWARFile()) {
893 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
894 getRootPortletId());
895
896 return portletBagImpl.getSocialRequestInterpreterInstance();
897 }
898
899 return (SocialRequestInterpreter)InstancePool.get(
900 getSocialRequestInterpreterClass());
901 }
902
903
908 public String getWebDAVStorageToken() {
909 return _webDAVStorageToken;
910 }
911
912
918 public void setWebDAVStorageToken(String webDAVStorageToken) {
919 _webDAVStorageToken = webDAVStorageToken;
920 }
921
922
927 public String getWebDAVStorageClass() {
928 return _webDAVStorageClass;
929 }
930
931
937 public void setWebDAVStorageClass(String webDAVStorageClass) {
938 _webDAVStorageClass = webDAVStorageClass;
939 }
940
941
946 public WebDAVStorage getWebDAVStorageInstance() {
947 if (Validator.isNull(getWebDAVStorageClass())) {
948 return null;
949 }
950
951 if (_portletApp.isWARFile()) {
952 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
953 getRootPortletId());
954
955 return portletBagImpl.getWebDAVStorageInstance();
956 }
957
958 return (WebDAVStorage)InstancePool.get(
959 getWebDAVStorageClass());
960 }
961
962
969 public String getControlPanelEntryCategory() {
970 return _controlPanelEntryCategory;
971 }
972
973
980 public void setControlPanelEntryCategory(String controlPanelEntryCategory) {
981 _controlPanelEntryCategory = controlPanelEntryCategory;
982 }
983
984
991 public double getControlPanelEntryWeight() {
992 return _controlPanelEntryWeight;
993 }
994
995
1003 public void setControlPanelEntryWeight(double controlPanelEntryWeight) {
1004 _controlPanelEntryWeight = controlPanelEntryWeight;
1005 }
1006
1007
1014 public String getControlPanelEntryClass() {
1015 return _controlPanelEntryClass;
1016 }
1017
1018
1025 public void setControlPanelEntryClass(String controlPanelEntryClass) {
1026 _controlPanelEntryClass = controlPanelEntryClass;
1027 }
1028
1029
1036 public ControlPanelEntry getControlPanelEntryInstance() {
1037 if (Validator.isNull(getControlPanelEntryClass())) {
1038 return null;
1039 }
1040
1041 if (_portletApp.isWARFile()) {
1042 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
1043 getRootPortletId());
1044
1045 return portletBagImpl.getControlPanelEntryInstance();
1046 }
1047
1048 return (ControlPanelEntry)InstancePool.get(getControlPanelEntryClass());
1049 }
1050
1051
1056 public String getDefaultPreferences() {
1057 if (Validator.isNull(_defaultPreferences)) {
1058 return PortletConstants.DEFAULT_PREFERENCES;
1059 }
1060 else {
1061 return _defaultPreferences;
1062 }
1063 }
1064
1065
1070 public void setDefaultPreferences(String defaultPreferences) {
1071 _defaultPreferences = defaultPreferences;
1072 }
1073
1074
1079 public String getPreferencesValidator() {
1080 return _preferencesValidator;
1081 }
1082
1083
1089 public void setPreferencesValidator(String preferencesValidator) {
1090 if (preferencesValidator != null) {
1091
1092
1095 _preferencesValidator = preferencesValidator.trim();
1096 }
1097 else {
1098 _preferencesValidator = null;
1099 }
1100 }
1101
1102
1107 public boolean getPreferencesCompanyWide() {
1108 return _preferencesCompanyWide;
1109 }
1110
1111
1116 public boolean isPreferencesCompanyWide() {
1117 return _preferencesCompanyWide;
1118 }
1119
1120
1126 public void setPreferencesCompanyWide(boolean preferencesCompanyWide) {
1127 _preferencesCompanyWide = preferencesCompanyWide;
1128 }
1129
1130
1135 public boolean getPreferencesUniquePerLayout() {
1136 return _preferencesUniquePerLayout;
1137 }
1138
1139
1144 public boolean isPreferencesUniquePerLayout() {
1145 return _preferencesUniquePerLayout;
1146 }
1147
1148
1154 public void setPreferencesUniquePerLayout(
1155 boolean preferencesUniquePerLayout) {
1156
1157 _preferencesUniquePerLayout = preferencesUniquePerLayout;
1158 }
1159
1160
1169 public boolean getPreferencesOwnedByGroup() {
1170 return _preferencesOwnedByGroup;
1171 }
1172
1173
1182 public boolean isPreferencesOwnedByGroup() {
1183 return _preferencesOwnedByGroup;
1184 }
1185
1186
1196 public void setPreferencesOwnedByGroup(boolean preferencesOwnedByGroup) {
1197 _preferencesOwnedByGroup = preferencesOwnedByGroup;
1198 }
1199
1200
1205 public boolean getUseDefaultTemplate() {
1206 return _useDefaultTemplate;
1207 }
1208
1209
1214 public boolean isUseDefaultTemplate() {
1215 return _useDefaultTemplate;
1216 }
1217
1218
1224 public void setUseDefaultTemplate(boolean useDefaultTemplate) {
1225 _useDefaultTemplate = useDefaultTemplate;
1226 }
1227
1228
1235 public boolean getShowPortletAccessDenied() {
1236 return _showPortletAccessDenied;
1237 }
1238
1239
1246 public boolean isShowPortletAccessDenied() {
1247 return _showPortletAccessDenied;
1248 }
1249
1250
1257 public void setShowPortletAccessDenied(boolean showPortletAccessDenied) {
1258 _showPortletAccessDenied = showPortletAccessDenied;
1259 }
1260
1261
1266 public boolean getShowPortletInactive() {
1267 return _showPortletInactive;
1268 }
1269
1270
1275 public boolean isShowPortletInactive() {
1276 return _showPortletInactive;
1277 }
1278
1279
1285 public void setShowPortletInactive(boolean showPortletInactive) {
1286 _showPortletInactive = showPortletInactive;
1287 }
1288
1289
1296 public boolean getActionURLRedirect() {
1297 return _actionURLRedirect;
1298 }
1299
1300
1307 public boolean isActionURLRedirect() {
1308 return _actionURLRedirect;
1309 }
1310
1311
1318 public void setActionURLRedirect(boolean actionURLRedirect) {
1319 _actionURLRedirect = actionURLRedirect;
1320 }
1321
1322
1329 public boolean getRestoreCurrentView() {
1330 return _restoreCurrentView;
1331 }
1332
1333
1340 public boolean isRestoreCurrentView() {
1341 return _restoreCurrentView;
1342 }
1343
1344
1351 public void setRestoreCurrentView(boolean restoreCurrentView) {
1352 _restoreCurrentView = restoreCurrentView;
1353 }
1354
1355
1362 public boolean getMaximizeEdit() {
1363 return _maximizeEdit;
1364 }
1365
1366
1373 public boolean isMaximizeEdit() {
1374 return _maximizeEdit;
1375 }
1376
1377
1384 public void setMaximizeEdit(boolean maximizeEdit) {
1385 _maximizeEdit = maximizeEdit;
1386 }
1387
1388
1395 public boolean getMaximizeHelp() {
1396 return _maximizeHelp;
1397 }
1398
1399
1406 public boolean isMaximizeHelp() {
1407 return _maximizeHelp;
1408 }
1409
1410
1417 public void setMaximizeHelp(boolean maximizeHelp) {
1418 _maximizeHelp = maximizeHelp;
1419 }
1420
1421
1428 public boolean getPopUpPrint() {
1429 return _popUpPrint;
1430 }
1431
1432
1439 public boolean isPopUpPrint() {
1440 return _popUpPrint;
1441 }
1442
1443
1450 public void setPopUpPrint(boolean popUpPrint) {
1451 _popUpPrint = popUpPrint;
1452 }
1453
1454
1459 public boolean getLayoutCacheable() {
1460 return _layoutCacheable;
1461 }
1462
1463
1468 public boolean isLayoutCacheable() {
1469 return _layoutCacheable;
1470 }
1471
1472
1478 public void setLayoutCacheable(boolean layoutCacheable) {
1479 _layoutCacheable = layoutCacheable;
1480 }
1481
1482
1487 public boolean getInstanceable() {
1488 return _instanceable;
1489 }
1490
1491
1496 public boolean isInstanceable() {
1497 return _instanceable;
1498 }
1499
1500
1506 public void setInstanceable(boolean instanceable) {
1507 _instanceable = instanceable;
1508 }
1509
1510
1515 public boolean getScopeable() {
1516 return _scopeable;
1517 }
1518
1519
1524 public boolean isScopeable() {
1525 return _scopeable;
1526 }
1527
1528
1534 public void setScopeable(boolean scopeable) {
1535 _scopeable = scopeable;
1536 }
1537
1538
1543 public String getUserPrincipalStrategy() {
1544 return _userPrincipalStrategy;
1545 }
1546
1547
1553 public void setUserPrincipalStrategy(String userPrincipalStrategy) {
1554 if (Validator.isNotNull(userPrincipalStrategy)) {
1555 _userPrincipalStrategy = userPrincipalStrategy;
1556 }
1557 }
1558
1559
1566 public boolean getPrivateRequestAttributes() {
1567 return _privateRequestAttributes;
1568 }
1569
1570
1577 public boolean isPrivateRequestAttributes() {
1578 return _privateRequestAttributes;
1579 }
1580
1581
1589 public void setPrivateRequestAttributes(boolean privateRequestAttributes) {
1590 _privateRequestAttributes = privateRequestAttributes;
1591 }
1592
1593
1600 public boolean getPrivateSessionAttributes() {
1601 return _privateSessionAttributes;
1602 }
1603
1604
1611 public boolean isPrivateSessionAttributes() {
1612 return _privateSessionAttributes;
1613 }
1614
1615
1622 public void setPrivateSessionAttributes(boolean privateSessionAttributes) {
1623 _privateSessionAttributes = privateSessionAttributes;
1624 }
1625
1626
1631 public int getRenderWeight() {
1632 return _renderWeight;
1633 }
1634
1635
1640 public void setRenderWeight(int renderWeight) {
1641 _renderWeight = renderWeight;
1642 }
1643
1644
1649 public boolean getAjaxable() {
1650 return _ajaxable;
1651 }
1652
1653
1658 public boolean isAjaxable() {
1659 return _ajaxable;
1660 }
1661
1662
1668 public void setAjaxable(boolean ajaxable) {
1669 _ajaxable = ajaxable;
1670 }
1671
1672
1679 public List<String> getHeaderPortalCss() {
1680 return _headerPortalCss;
1681 }
1682
1683
1690 public void setHeaderPortalCss(List<String> headerPortalCss) {
1691 _headerPortalCss = headerPortalCss;
1692 }
1693
1694
1701 public List<String> getHeaderPortletCss() {
1702 return _headerPortletCss;
1703 }
1704
1705
1713 public void setHeaderPortletCss(List<String> headerPortletCss) {
1714 _headerPortletCss = headerPortletCss;
1715 }
1716
1717
1724 public List<String> getHeaderPortalJavaScript() {
1725 return _headerPortalJavaScript;
1726 }
1727
1728
1736 public void setHeaderPortalJavaScript(List<String> headerPortalJavaScript) {
1737 _headerPortalJavaScript = headerPortalJavaScript;
1738 }
1739
1740
1747 public List<String> getHeaderPortletJavaScript() {
1748 return _headerPortletJavaScript;
1749 }
1750
1751
1759 public void setHeaderPortletJavaScript(
1760 List<String> headerPortletJavaScript) {
1761
1762 _headerPortletJavaScript = headerPortletJavaScript;
1763 }
1764
1765
1772 public List<String> getFooterPortalCss() {
1773 return _footerPortalCss;
1774 }
1775
1776
1783 public void setFooterPortalCss(List<String> footerPortalCss) {
1784 _footerPortalCss = footerPortalCss;
1785 }
1786
1787
1794 public List<String> getFooterPortletCss() {
1795 return _footerPortletCss;
1796 }
1797
1798
1806 public void setFooterPortletCss(List<String> footerPortletCss) {
1807 _footerPortletCss = footerPortletCss;
1808 }
1809
1810
1817 public List<String> getFooterPortalJavaScript() {
1818 return _footerPortalJavaScript;
1819 }
1820
1821
1829 public void setFooterPortalJavaScript(List<String> footerPortalJavaScript) {
1830 _footerPortalJavaScript = footerPortalJavaScript;
1831 }
1832
1833
1840 public List<String> getFooterPortletJavaScript() {
1841 return _footerPortletJavaScript;
1842 }
1843
1844
1852 public void setFooterPortletJavaScript(
1853 List<String> footerPortletJavaScript) {
1854
1855 _footerPortletJavaScript = footerPortletJavaScript;
1856 }
1857
1858
1865 public String getCssClassWrapper() {
1866 return _cssClassWrapper;
1867 }
1868
1869
1876 public void setCssClassWrapper(String cssClassWrapper) {
1877 _cssClassWrapper = cssClassWrapper;
1878 }
1879
1880
1885 public String getFacebookIntegration() {
1886 return _facebookIntegration;
1887 }
1888
1889
1895 public void setFacebookIntegration(String facebookIntegration) {
1896 if (Validator.isNotNull(facebookIntegration)) {
1897 _facebookIntegration = facebookIntegration;
1898 }
1899 }
1900
1901
1907 public boolean getAddDefaultResource() {
1908 return _addDefaultResource;
1909 }
1910
1911
1917 public boolean isAddDefaultResource() {
1918 return _addDefaultResource;
1919 }
1920
1921
1927 public void setAddDefaultResource(boolean addDefaultResource) {
1928 _addDefaultResource = addDefaultResource;
1929 }
1930
1931
1936 public void setRoles(String roles) {
1937 _rolesArray = StringUtil.split(roles);
1938
1939 super.setRoles(roles);
1940 }
1941
1942
1947 public String[] getRolesArray() {
1948 return _rolesArray;
1949 }
1950
1951
1956 public void setRolesArray(String[] rolesArray) {
1957 _rolesArray = rolesArray;
1958
1959 super.setRoles(StringUtil.merge(rolesArray));
1960 }
1961
1962
1967 public Set<String> getUnlinkedRoles() {
1968 return _unlinkedRoles;
1969 }
1970
1971
1976 public void setUnlinkedRoles(Set<String> unlinkedRoles) {
1977 _unlinkedRoles = unlinkedRoles;
1978 }
1979
1980
1985 public Map<String, String> getRoleMappers() {
1986 return _roleMappers;
1987 }
1988
1989
1994 public void setRoleMappers(Map<String, String> roleMappers) {
1995 _roleMappers = roleMappers;
1996 }
1997
1998
2002 public void linkRoles() {
2003 List<String> linkedRoles = new ArrayList<String>();
2004
2005 Iterator<String> itr = _unlinkedRoles.iterator();
2006
2007 while (itr.hasNext()) {
2008 String unlinkedRole = itr.next();
2009
2010 String roleLink = _roleMappers.get(unlinkedRole);
2011
2012 if (Validator.isNotNull(roleLink)) {
2013 if (_log.isDebugEnabled()) {
2014 _log.debug(
2015 "Linking role for portlet [" + getPortletId() +
2016 "] with role-name [" + unlinkedRole +
2017 "] to role-link [" + roleLink + "]");
2018 }
2019
2020 linkedRoles.add(roleLink);
2021 }
2022 else {
2023 _log.error(
2024 "Unable to link role for portlet [" + getPortletId() +
2025 "] with role-name [" + unlinkedRole +
2026 "] because role-link is null");
2027 }
2028 }
2029
2030 String[] array = linkedRoles.toArray(new String[linkedRoles.size()]);
2031
2032 Arrays.sort(array);
2033
2034 setRolesArray(array);
2035 }
2036
2037
2042 public boolean hasRoleWithName(String roleName) {
2043 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2044 return false;
2045 }
2046
2047 for (int i = 0; i < _rolesArray.length; i++) {
2048 if (_rolesArray[i].equalsIgnoreCase(roleName)) {
2049 return true;
2050 }
2051 }
2052
2053 return false;
2054 }
2055
2056
2063 public boolean hasAddPortletPermission(long userId) {
2064 try {
2065 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2066 return true;
2067 }
2068 else if (RoleLocalServiceUtil.hasUserRoles(
2069 userId, getCompanyId(), _rolesArray, true)) {
2070
2071 return true;
2072 }
2073 else if (RoleLocalServiceUtil.hasUserRole(
2074 userId, getCompanyId(), RoleConstants.ADMINISTRATOR,
2075 true)) {
2076
2077 return true;
2078 }
2079 else {
2080 User user = UserLocalServiceUtil.getUserById(userId);
2081
2082 if (user.isDefaultUser() &&
2083 hasRoleWithName(RoleConstants.GUEST)) {
2084
2085 return true;
2086 }
2087 }
2088 }
2089 catch (Exception e) {
2090 _log.error(e);
2091 }
2092
2093 return false;
2094 }
2095
2096
2103 public boolean getSystem() {
2104 return _system;
2105 }
2106
2107
2114 public boolean isSystem() {
2115 return _system;
2116 }
2117
2118
2125 public void setSystem(boolean system) {
2126 _system = system;
2127 }
2128
2129
2136 public boolean getInclude() {
2137 return _include;
2138 }
2139
2140
2147 public boolean isInclude() {
2148 return _include;
2149 }
2150
2151
2158 public void setInclude(boolean include) {
2159 _include = include;
2160 }
2161
2162
2167 public Map<String, String> getInitParams() {
2168 return _initParams;
2169 }
2170
2171
2176 public void setInitParams(Map<String, String> initParams) {
2177 _initParams = initParams;
2178 }
2179
2180
2185 public Integer getExpCache() {
2186 return _expCache;
2187 }
2188
2189
2194 public void setExpCache(Integer expCache) {
2195 _expCache = expCache;
2196 }
2197
2198
2203 public Map<String, Set<String>> getPortletModes() {
2204 return _portletModes;
2205 }
2206
2207
2212 public void setPortletModes(Map<String, Set<String>> portletModes) {
2213 _portletModes = portletModes;
2214 }
2215
2216
2223 public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
2224 if (mimeType == null) {
2225 mimeType = ContentTypes.TEXT_HTML;
2226 }
2227
2228 Set<String> mimeTypeModes = _portletModes.get(mimeType);
2229
2230 if (mimeTypeModes == null) {
2231 return false;
2232 }
2233
2234 if (mimeTypeModes.contains(portletMode.toString())) {
2235 return true;
2236 }
2237 else {
2238 return false;
2239 }
2240 }
2241
2242
2247 public Set<String> getAllPortletModes() {
2248 Set<String> allPortletModes = new TreeSet<String>();
2249
2250 Iterator<Map.Entry <String, Set<String>>> itr1 =
2251 _portletModes.entrySet().iterator();
2252
2253 while (itr1.hasNext()) {
2254 Map.Entry<String, Set<String>> entry = itr1.next();
2255
2256 Set<String> mimeTypeModes = entry.getValue();
2257
2258 Iterator<String> itr2 = mimeTypeModes.iterator();
2259
2260 while (itr2.hasNext()) {
2261 String portletMode = itr2.next();
2262
2263 allPortletModes.add(portletMode);
2264 }
2265 }
2266
2267 return allPortletModes;
2268 }
2269
2270
2275 public boolean hasMultipleMimeTypes() {
2276 if (_portletModes.size() > 1) {
2277 return true;
2278 }
2279 else {
2280 return false;
2281 }
2282 }
2283
2284
2289 public Set<String> getSupportedLocales() {
2290 return _supportedLocales;
2291 }
2292
2293
2298 public void setSupportedLocales(Set<String> supportedLocales) {
2299 _supportedLocales = supportedLocales;
2300 }
2301
2302
2307 public String getResourceBundle() {
2308 return _resourceBundle;
2309 }
2310
2311
2316 public void setResourceBundle(String resourceBundle) {
2317 _resourceBundle = resourceBundle;
2318 }
2319
2320
2325 public PortletInfo getPortletInfo() {
2326 return _portletInfo;
2327 }
2328
2329
2334 public void setPortletInfo(PortletInfo portletInfo) {
2335 _portletInfo = portletInfo;
2336 }
2337
2338
2343 public Map<String, PortletFilter> getPortletFilters() {
2344 return _portletFilters;
2345 }
2346
2347
2352 public void setPortletFilters(Map<String, PortletFilter> portletFilters) {
2353 _portletFilters = portletFilters;
2354 }
2355
2356
2361 public void addProcessingEvent(QName processingEvent) {
2362 _processingEvents.add(processingEvent);
2363 _processingEventsByQName.put(
2364 PortletQNameUtil.getKey(processingEvent), processingEvent);
2365 }
2366
2367
2374 public QName getProcessingEvent(String uri, String localPart) {
2375 return _processingEventsByQName.get(
2376 PortletQNameUtil.getKey(uri, localPart));
2377 }
2378
2379
2384 public Set<QName> getProcessingEvents() {
2385 return _processingEvents;
2386 }
2387
2388
2394 public void setProcessingEvents(Set<QName> processingEvents) {
2395 for (QName processingEvent : processingEvents) {
2396 addProcessingEvent(processingEvent);
2397 }
2398 }
2399
2400
2405 public void addPublishingEvent(QName publishingEvent) {
2406 _publishingEvents.add(publishingEvent);
2407 }
2408
2409
2414 public Set<QName> getPublishingEvents() {
2415 return _publishingEvents;
2416 }
2417
2418
2424 public void setPublishingEvents(Set<QName> publishingEvents) {
2425 for (QName publishingEvent : publishingEvents) {
2426 addPublishingEvent(publishingEvent);
2427 }
2428 }
2429
2430
2435 public void addPublicRenderParameter(
2436 PublicRenderParameter publicRenderParameter) {
2437
2438 _publicRenderParameters.add(publicRenderParameter);
2439 _publicRenderParametersByIdentifier.put(
2440 publicRenderParameter.getIdentifier(), publicRenderParameter);
2441 _publicRenderParametersByQName.put(
2442 PortletQNameUtil.getKey(publicRenderParameter.getQName()),
2443 publicRenderParameter);
2444 }
2445
2446
2451 public PublicRenderParameter getPublicRenderParameter(String identifier) {
2452 return _publicRenderParametersByIdentifier.get(identifier);
2453 }
2454
2455
2462 public PublicRenderParameter getPublicRenderParameter(
2463 String uri, String localPart) {
2464
2465 return _publicRenderParametersByQName.get(
2466 PortletQNameUtil.getKey(uri, localPart));
2467 }
2468
2469
2474 public Set<PublicRenderParameter> getPublicRenderParameters() {
2475 return _publicRenderParameters;
2476 }
2477
2478
2484 public void setPublicRenderParameters(
2485 Set<PublicRenderParameter> publicRenderParameters) {
2486
2487 for (PublicRenderParameter publicRenderParameter :
2488 publicRenderParameters) {
2489
2490 addPublicRenderParameter(publicRenderParameter);
2491 }
2492 }
2493
2494
2499 public boolean isRemote() {
2500 return _remote;
2501 }
2502
2503
2508 public void setRemote(boolean remote) {
2509 _remote = remote;
2510 }
2511
2512
2517 public String getRemoteConsumerId() {
2518 return _remoteConsumerId;
2519 }
2520
2521
2526 public void setRemoteConsumerId(String remoteConsumerId) {
2527 _remoteConsumerId = remoteConsumerId;
2528 }
2529
2530
2535 public String getRemoteProducerEntityId() {
2536 return _remoteProducerEntityId;
2537 }
2538
2539
2545 public void setRemoteProducerEntityId(String remoteProducerEntityId) {
2546 _remoteProducerEntityId = remoteProducerEntityId;
2547 }
2548
2549
2554 public String getRemotePortletHandle() {
2555 return _remotePortletHandle;
2556 }
2557
2558
2563 public void setRemotePortletHandle(String remotePortletHandle) {
2564 _remotePortletHandle = remotePortletHandle;
2565 }
2566
2567
2572 public String getRemotePortletId() {
2573 return _remotePortletId;
2574 }
2575
2576
2581 public void setRemotePortletId(String remotePortletId) {
2582 _remotePortletId = remotePortletId;
2583 }
2584
2585
2590 public String getContextPath() {
2591 String virtualPath = getVirtualPath();
2592
2593 if (Validator.isNotNull(virtualPath)) {
2594 return virtualPath;
2595 }
2596
2597 if (_portletApp.isWARFile()) {
2598 StringBuilder sb = new StringBuilder();
2599
2600 sb.append(StringPool.SLASH);
2601 sb.append(_portletApp.getServletContextName());
2602
2603 return sb.toString();
2604 }
2605 else {
2606 return PortalUtil.getPathContext();
2607 }
2608 }
2609
2610
2615 public PortletApp getPortletApp() {
2616 return _portletApp;
2617 }
2618
2619
2624 public void setPortletApp(PortletApp portletApp) {
2625 _portletApp = portletApp;
2626 }
2627
2628
2634 public Portlet getClonedInstance(String portletId) {
2635 if (_clonedInstances == null) {
2636
2637
2639 return null;
2640 }
2641
2642 Portlet clonedInstance = _clonedInstances.get(portletId);
2643
2644 if (clonedInstance == null) {
2645 clonedInstance = (Portlet)clone();
2646
2647 clonedInstance.setPortletId(portletId);
2648
2649
2656 }
2658
2659 return clonedInstance;
2660 }
2661
2662
2668 public boolean getStatic() {
2669 return _staticPortlet;
2670 }
2671
2672
2678 public boolean isStatic() {
2679 return _staticPortlet;
2680 }
2681
2682
2688 public void setStatic(boolean staticPortlet) {
2689 _staticPortlet = staticPortlet;
2690 }
2691
2692
2699 public boolean getStaticStart() {
2700 return _staticPortletStart;
2701 }
2702
2703
2710 public boolean isStaticStart() {
2711 return _staticPortletStart;
2712 }
2713
2714
2721 public void setStaticStart(boolean staticPortletStart) {
2722 _staticPortletStart = staticPortletStart;
2723 }
2724
2725
2732 public boolean getStaticEnd() {
2733 return !_staticPortletStart;
2734 }
2735
2736
2743 public boolean isStaticEnd() {
2744 return !_staticPortletStart;
2745 }
2746
2747
2753 public boolean getUndeployedPortlet() {
2754 return _undeployedPortlet;
2755 }
2756
2757
2763 public boolean isUndeployedPortlet() {
2764 return _undeployedPortlet;
2765 }
2766
2767
2773 public void setUndeployedPortlet(boolean undeployedPortlet) {
2774 _undeployedPortlet = undeployedPortlet;
2775 }
2776
2777
2782 public Object clone() {
2783 return new PortletImpl(
2784 getPortletId(), getPluginPackage(), getDefaultPluginSetting(),
2785 getCompanyId(), getTimestamp(), getIcon(), getVirtualPath(),
2786 getStrutsPath(), getPortletName(), getDisplayName(),
2787 getPortletClass(), getConfigurationActionClass(), getIndexerClass(),
2788 getOpenSearchClass(), getSchedulerClass(), getPortletURLClass(),
2789 getFriendlyURLMapperClass(), getURLEncoderClass(),
2790 getPortletDataHandlerClass(), getPortletLayoutListenerClass(),
2791 getPopMessageListenerClass(), getSocialActivityInterpreterClass(),
2792 getSocialRequestInterpreterClass(), getWebDAVStorageToken(),
2793 getWebDAVStorageClass(), getControlPanelEntryCategory(),
2794 getControlPanelEntryWeight(), getControlPanelEntryClass(),
2795 getDefaultPreferences(), getPreferencesValidator(),
2796 isPreferencesCompanyWide(), isPreferencesUniquePerLayout(),
2797 isPreferencesOwnedByGroup(), isUseDefaultTemplate(),
2798 isShowPortletAccessDenied(), isShowPortletInactive(),
2799 isActionURLRedirect(), isRestoreCurrentView(), isMaximizeEdit(),
2800 isMaximizeHelp(), isPopUpPrint(), isLayoutCacheable(),
2801 isInstanceable(), isScopeable(), getUserPrincipalStrategy(),
2802 isPrivateRequestAttributes(), isPrivateSessionAttributes(),
2803 getRenderWeight(), isAjaxable(), getHeaderPortalCss(),
2804 getHeaderPortletCss(), getHeaderPortalJavaScript(),
2805 getHeaderPortletJavaScript(), getFooterPortalCss(),
2806 getFooterPortletCss(), getFooterPortalJavaScript(),
2807 getFooterPortletJavaScript(), getCssClassWrapper(),
2808 getFacebookIntegration(), isAddDefaultResource(), getRoles(),
2809 getUnlinkedRoles(), getRoleMappers(), isSystem(), isActive(),
2810 isInclude(), getInitParams(), getExpCache(), getPortletModes(),
2811 getSupportedLocales(), getResourceBundle(), getPortletInfo(),
2812 getPortletFilters(), getProcessingEvents(), getPublishingEvents(),
2813 getPublicRenderParameters(), isRemote(), getRemoteConsumerId(),
2814 getRemoteProducerEntityId(), getRemotePortletHandle(),
2815 getRemotePortletId(), getPortletApp());
2816 }
2817
2818
2827 public int compareTo(Object obj) {
2828 Portlet portlet = (Portlet)obj;
2829
2830 return getPortletId().compareTo(portlet.getPortletId());
2831 }
2832
2833
2839 public boolean equals(Object obj) {
2840 Portlet portlet = (Portlet)obj;
2841
2842 return getPortletId().equals(portlet.getPortletId());
2843 }
2844
2845
2848 private static Log _log = LogFactoryUtil.getLog(PortletImpl.class);
2849
2850
2853 private PluginPackage _pluginPackage;
2854
2855
2858 private PluginSetting _defaultPluginSetting;
2859
2860
2863 private long _timestamp;
2864
2865
2868 private String _icon;
2869
2870
2873 private String _virtualPath;
2874
2875
2878 private String _strutsPath;
2879
2880
2883 private String _portletName;
2884
2885
2888 private String _displayName;
2889
2890
2893 private String _portletClass;
2894
2895
2898 private String _configurationActionClass;
2899
2900
2903 private String _indexerClass;
2904
2905
2908 private String _openSearchClass;
2909
2910
2913 private String _schedulerClass;
2914
2915
2918 private String _portletURLClass;
2919
2920
2923 private String _friendlyURLMapperClass;
2924
2925
2928 private String _urlEncoderClass;
2929
2930
2933 private String _portletDataHandlerClass;
2934
2935
2938 private String _portletLayoutListenerClass;
2939
2940
2943 private String _popMessageListenerClass;
2944
2945
2948 private String _socialActivityInterpreterClass;
2949
2950
2953 private String _socialRequestInterpreterClass;
2954
2955
2958 private String _webDAVStorageToken;
2959
2960
2963 private String _webDAVStorageClass;
2964
2965
2968 private String _defaultPreferences;
2969
2970
2973 private String _preferencesValidator;
2974
2975
2978 private boolean _preferencesCompanyWide;
2979
2980
2983 private boolean _preferencesUniquePerLayout = true;
2984
2985
2989 private boolean _preferencesOwnedByGroup = true;
2990
2991
2995 private String _controlPanelEntryCategory;
2996
2997
3001 private double _controlPanelEntryWeight = 100;
3002
3003
3007 private String _controlPanelEntryClass;
3008
3009
3012 private boolean _useDefaultTemplate = true;
3013
3014
3017 private boolean _showPortletAccessDenied =
3018 PropsValues.LAYOUT_SHOW_PORTLET_ACCESS_DENIED;
3019
3020
3023 private boolean _showPortletInactive =
3024 PropsValues.LAYOUT_SHOW_PORTLET_INACTIVE;
3025
3026
3029 private boolean _actionURLRedirect;
3030
3031
3035 private boolean _restoreCurrentView = true;
3036
3037
3041 private boolean _maximizeEdit;
3042
3043
3047 private boolean _maximizeHelp;
3048
3049
3053 private boolean _popUpPrint = true;
3054
3055
3058 private boolean _layoutCacheable;
3059
3060
3063 private boolean _instanceable;
3064
3065
3068 private boolean _scopeable;
3069
3070
3073 private String _userPrincipalStrategy =
3074 PortletConstants.USER_PRINCIPAL_STRATEGY_USER_ID;
3075
3076
3080 private boolean _privateRequestAttributes = true;
3081
3082
3085 private boolean _privateSessionAttributes = true;
3086
3087
3090 private int _renderWeight = 1;
3091
3092
3095 private boolean _ajaxable = true;
3096
3097
3101 private List<String> _headerPortalCss;
3102
3103
3107 private List<String> _headerPortletCss;
3108
3109
3113 private List<String> _headerPortalJavaScript;
3114
3115
3119 private List<String> _headerPortletJavaScript;
3120
3121
3125 private List<String> _footerPortalCss;
3126
3127
3131 private List<String> _footerPortletCss;
3132
3133
3137 private List<String> _footerPortalJavaScript;
3138
3139
3143 private List<String> _footerPortletJavaScript;
3144
3145
3149 private String _cssClassWrapper = StringPool.BLANK;
3150
3151
3154 private String _facebookIntegration =
3155 PortletConstants.FACEBOOK_INTEGRATION_IFRAME;
3156
3157
3160 private boolean _addDefaultResource;
3161
3162
3165 private String[] _rolesArray;
3166
3167
3170 private Set<String> _unlinkedRoles;
3171
3172
3175 private Map<String, String> _roleMappers;
3176
3177
3181 private boolean _system;
3182
3183
3186 private boolean _include = true;
3187
3188
3191 private Map<String, String> _initParams;
3192
3193
3196 private Integer _expCache;
3197
3198
3201 private Map<String, Set<String>> _portletModes;
3202
3203
3206 private Set<String> _supportedLocales;
3207
3208
3211 private String _resourceBundle;
3212
3213
3216 private PortletInfo _portletInfo;
3217
3218
3221 private Map<String, PortletFilter> _portletFilters;
3222
3223
3226 private Set<QName> _processingEvents = new HashSet<QName>();
3227
3228
3231 private Map<String, QName> _processingEventsByQName =
3232 new HashMap<String, QName>();
3233
3234
3237 private Set<QName> _publishingEvents = new HashSet<QName>();
3238
3239
3242 private Set<PublicRenderParameter> _publicRenderParameters =
3243 new HashSet<PublicRenderParameter>();
3244
3245
3249 private Map<String, PublicRenderParameter>
3250 _publicRenderParametersByIdentifier =
3251 new HashMap<String, PublicRenderParameter>();
3252
3253
3257 private Map<String, PublicRenderParameter>
3258 _publicRenderParametersByQName =
3259 new HashMap<String, PublicRenderParameter>();
3260
3261
3264 private boolean _remote = false;
3265
3266
3269 private String _remoteConsumerId;
3270
3271
3274 private String _remoteProducerEntityId;
3275
3276
3279 private String _remotePortletHandle;
3280
3281
3284 private String _remotePortletId;
3285
3286
3289 private PortletApp _portletApp;
3290
3291
3294 private Map<String, Portlet> _clonedInstances;
3295
3296
3299 private boolean _staticPortlet;
3300
3301
3305 private boolean _staticPortletStart;
3306
3307
3310 private boolean _undeployedPortlet = false;
3311
3312}