1
19
20 package com.liferay.portal.model.impl;
21
22 import com.liferay.portal.kernel.job.Scheduler;
23 import com.liferay.portal.kernel.log.Log;
24 import com.liferay.portal.kernel.log.LogFactoryUtil;
25 import com.liferay.portal.kernel.plugin.PluginPackage;
26 import com.liferay.portal.kernel.poller.PollerProcessor;
27 import com.liferay.portal.kernel.pop.MessageListener;
28 import com.liferay.portal.kernel.portlet.ConfigurationAction;
29 import com.liferay.portal.kernel.portlet.FriendlyURLMapper;
30 import com.liferay.portal.kernel.portlet.PortletBag;
31 import com.liferay.portal.kernel.portlet.PortletBagPool;
32 import com.liferay.portal.kernel.portlet.PortletLayoutListener;
33 import com.liferay.portal.kernel.search.Indexer;
34 import com.liferay.portal.kernel.search.OpenSearch;
35 import com.liferay.portal.kernel.servlet.URLEncoder;
36 import com.liferay.portal.kernel.util.ContentTypes;
37 import com.liferay.portal.kernel.util.InstancePool;
38 import com.liferay.portal.kernel.util.StringPool;
39 import com.liferay.portal.kernel.util.StringUtil;
40 import com.liferay.portal.kernel.util.Validator;
41 import com.liferay.portal.kernel.xml.QName;
42 import com.liferay.portal.lar.PortletDataHandler;
43 import com.liferay.portal.model.Plugin;
44 import com.liferay.portal.model.PluginSetting;
45 import com.liferay.portal.model.Portlet;
46 import com.liferay.portal.model.PortletApp;
47 import com.liferay.portal.model.PortletConstants;
48 import com.liferay.portal.model.PortletFilter;
49 import com.liferay.portal.model.PortletInfo;
50 import com.liferay.portal.model.PublicRenderParameter;
51 import com.liferay.portal.model.RoleConstants;
52 import com.liferay.portal.model.User;
53 import com.liferay.portal.service.RoleLocalServiceUtil;
54 import com.liferay.portal.service.UserLocalServiceUtil;
55 import com.liferay.portal.util.PortalUtil;
56 import com.liferay.portal.util.PropsValues;
57 import com.liferay.portal.webdav.WebDAVStorage;
58 import com.liferay.portlet.ControlPanelEntry;
59 import com.liferay.portlet.PortletBagImpl;
60 import com.liferay.portlet.PortletQNameUtil;
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
78
84 public class PortletImpl extends PortletModelImpl implements Portlet {
85
86
89 public PortletImpl() {
90 }
91
92
95 public PortletImpl(long companyId, String portletId) {
96 setCompanyId(companyId);
97 setPortletId(portletId);
98 setStrutsPath(portletId);
99 setActive(true);
100 _headerPortalCss = new ArrayList<String>();
101 _headerPortletCss = new ArrayList<String>();
102 _headerPortalJavaScript = new ArrayList<String>();
103 _headerPortletJavaScript = new ArrayList<String>();
104 _footerPortalCss = new ArrayList<String>();
105 _footerPortletCss = new ArrayList<String>();
106 _footerPortalJavaScript = new ArrayList<String>();
107 _footerPortletJavaScript = new ArrayList<String>();
108 _unlinkedRoles = new HashSet<String>();
109 _roleMappers = new LinkedHashMap<String, String>();
110 _initParams = new HashMap<String, String>();
111 _portletModes = new HashMap<String, Set<String>>();
112 _supportedLocales = new HashSet<String>();
113 _portletFilters = new LinkedHashMap<String, PortletFilter>();
114 _processingEvents = new HashSet<QName>();
115 _publishingEvents = new HashSet<QName>();
116 _publicRenderParameters = new HashSet<PublicRenderParameter>();
117 }
118
119
122 public PortletImpl(
123 String portletId, PluginPackage pluginPackage,
124 PluginSetting pluginSetting, long companyId, long timestamp,
125 String icon, String virtualPath, String strutsPath, String portletName,
126 String displayName, String portletClass,
127 String configurationActionClass, String indexerClass,
128 String openSearchClass, String schedulerClass, String portletURLClass,
129 String friendlyURLMapperClass, String urlEncoderClass,
130 String portletDataHandlerClass, String portletLayoutListenerClass,
131 String pollerProcessorClass, String popMessageListenerClass,
132 String socialActivityInterpreterClass,
133 String socialRequestInterpreterClass, String webDAVStorageToken,
134 String webDAVStorageClass, String controlPanelEntryCategory,
135 double controlPanelEntryWeight, String controlPanelClass,
136 String defaultPreferences, String preferencesValidator,
137 boolean preferencesCompanyWide, boolean preferencesUniquePerLayout,
138 boolean preferencesOwnedByGroup, boolean useDefaultTemplate,
139 boolean showPortletAccessDenied, boolean showPortletInactive,
140 boolean actionURLRedirect, boolean restoreCurrentView,
141 boolean maximizeEdit, boolean maximizeHelp, boolean popUpPrint,
142 boolean layoutCacheable, boolean instanceable, boolean scopeable,
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, String cssClassWrapper,
150 String facebookIntegration, boolean addDefaultResource, String roles,
151 Set<String> unlinkedRoles, Map<String, String> roleMappers,
152 boolean system, boolean active, boolean include,
153 Map<String, String> initParams, Integer expCache,
154 Map<String, Set<String>> portletModes, Set<String> supportedLocales,
155 String resourceBundle, PortletInfo portletInfo,
156 Map<String, PortletFilter> portletFilters, Set<QName> processingEvents,
157 Set<QName> publishingEvents,
158 Set<PublicRenderParameter> publicRenderParameters, boolean remote,
159 String remoteConsumerId, String remoteProducerEntityId,
160 String remotePortletHandle, String remotePortletId,
161 PortletApp portletApp) {
162
163 setPortletId(portletId);
164 _pluginPackage = pluginPackage;
165 _defaultPluginSetting = pluginSetting;
166 setCompanyId(companyId);
167 _timestamp = timestamp;
168 _icon = icon;
169 _virtualPath = virtualPath;
170 _strutsPath = strutsPath;
171 _portletName = portletName;
172 _displayName = displayName;
173 _portletClass = portletClass;
174 _configurationActionClass = configurationActionClass;
175 _indexerClass = indexerClass;
176 _openSearchClass = openSearchClass;
177 _schedulerClass = schedulerClass;
178 _portletURLClass = portletURLClass;
179 _friendlyURLMapperClass = friendlyURLMapperClass;
180 _urlEncoderClass = urlEncoderClass;
181 _portletDataHandlerClass = portletDataHandlerClass;
182 _portletLayoutListenerClass = portletLayoutListenerClass;
183 _pollerProcessorClass = pollerProcessorClass;
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 PortletLayoutListener getPortletLayoutListenerInstance() {
783 if (Validator.isNull(getPortletLayoutListenerClass())) {
784 return null;
785 }
786
787 if (_portletApp.isWARFile()) {
788 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
789
790 return portletBag.getPortletLayoutListenerInstance();
791 }
792
793 return (PortletLayoutListener)InstancePool.get(
794 getPortletLayoutListenerClass());
795 }
796
797
802 public String getPollerProcessorClass() {
803 return _pollerProcessorClass;
804 }
805
806
812 public void setPollerProcessorClass(String pollerProcessorClass) {
813 _pollerProcessorClass = pollerProcessorClass;
814 }
815
816
821 public PollerProcessor getPollerProcessorInstance() {
822 if (Validator.isNull(getPollerProcessorClass())) {
823 return null;
824 }
825
826 if (_portletApp.isWARFile()) {
827 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
828
829 return portletBag.getPollerProcessorInstance();
830 }
831
832 return (PollerProcessor)InstancePool.get(getPollerProcessorClass());
833 }
834
835
840 public String getPopMessageListenerClass() {
841 return _popMessageListenerClass;
842 }
843
844
850 public void setPopMessageListenerClass(String popMessageListenerClass) {
851 _popMessageListenerClass = popMessageListenerClass;
852 }
853
854
859 public MessageListener getPopMessageListenerInstance() {
860 if (Validator.isNull(getPopMessageListenerClass())) {
861 return null;
862 }
863
864 if (_portletApp.isWARFile()) {
865 PortletBag portletBag = PortletBagPool.get(getRootPortletId());
866
867 return portletBag.getPopMessageListenerInstance();
868 }
869
870 return (MessageListener)InstancePool.get(getPopMessageListenerClass());
871 }
872
873
879 public String getSocialActivityInterpreterClass() {
880 return _socialActivityInterpreterClass;
881 }
882
883
889 public void setSocialActivityInterpreterClass(
890 String socialActivityInterpreterClass) {
891
892 _socialActivityInterpreterClass = socialActivityInterpreterClass;
893 }
894
895
901 public SocialActivityInterpreter getSocialActivityInterpreterInstance() {
902 if (Validator.isNull(getSocialActivityInterpreterClass())) {
903 return null;
904 }
905
906 if (_portletApp.isWARFile()) {
907 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
908 getRootPortletId());
909
910 return portletBagImpl.getSocialActivityInterpreterInstance();
911 }
912
913 return (SocialActivityInterpreter)InstancePool.get(
914 getSocialActivityInterpreterClass());
915 }
916
917
923 public String getSocialRequestInterpreterClass() {
924 return _socialRequestInterpreterClass;
925 }
926
927
933 public void setSocialRequestInterpreterClass(
934 String socialRequestInterpreterClass) {
935
936 _socialRequestInterpreterClass = socialRequestInterpreterClass;
937 }
938
939
945 public SocialRequestInterpreter getSocialRequestInterpreterInstance() {
946 if (Validator.isNull(getSocialRequestInterpreterClass())) {
947 return null;
948 }
949
950 if (_portletApp.isWARFile()) {
951 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
952 getRootPortletId());
953
954 return portletBagImpl.getSocialRequestInterpreterInstance();
955 }
956
957 return (SocialRequestInterpreter)InstancePool.get(
958 getSocialRequestInterpreterClass());
959 }
960
961
966 public String getWebDAVStorageToken() {
967 return _webDAVStorageToken;
968 }
969
970
976 public void setWebDAVStorageToken(String webDAVStorageToken) {
977 _webDAVStorageToken = webDAVStorageToken;
978 }
979
980
985 public String getWebDAVStorageClass() {
986 return _webDAVStorageClass;
987 }
988
989
995 public void setWebDAVStorageClass(String webDAVStorageClass) {
996 _webDAVStorageClass = webDAVStorageClass;
997 }
998
999
1004 public WebDAVStorage getWebDAVStorageInstance() {
1005 if (Validator.isNull(getWebDAVStorageClass())) {
1006 return null;
1007 }
1008
1009 if (_portletApp.isWARFile()) {
1010 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
1011 getRootPortletId());
1012
1013 return portletBagImpl.getWebDAVStorageInstance();
1014 }
1015
1016 return (WebDAVStorage)InstancePool.get(
1017 getWebDAVStorageClass());
1018 }
1019
1020
1027 public String getControlPanelEntryCategory() {
1028 return _controlPanelEntryCategory;
1029 }
1030
1031
1038 public void setControlPanelEntryCategory(String controlPanelEntryCategory) {
1039 _controlPanelEntryCategory = controlPanelEntryCategory;
1040 }
1041
1042
1049 public double getControlPanelEntryWeight() {
1050 return _controlPanelEntryWeight;
1051 }
1052
1053
1061 public void setControlPanelEntryWeight(double controlPanelEntryWeight) {
1062 _controlPanelEntryWeight = controlPanelEntryWeight;
1063 }
1064
1065
1072 public String getControlPanelEntryClass() {
1073 return _controlPanelEntryClass;
1074 }
1075
1076
1083 public void setControlPanelEntryClass(String controlPanelEntryClass) {
1084 _controlPanelEntryClass = controlPanelEntryClass;
1085 }
1086
1087
1094 public ControlPanelEntry getControlPanelEntryInstance() {
1095 if (Validator.isNull(getControlPanelEntryClass())) {
1096 return null;
1097 }
1098
1099 if (_portletApp.isWARFile()) {
1100 PortletBagImpl portletBagImpl = (PortletBagImpl)PortletBagPool.get(
1101 getRootPortletId());
1102
1103 return portletBagImpl.getControlPanelEntryInstance();
1104 }
1105
1106 return (ControlPanelEntry)InstancePool.get(getControlPanelEntryClass());
1107 }
1108
1109
1114 public String getDefaultPreferences() {
1115 if (Validator.isNull(_defaultPreferences)) {
1116 return PortletConstants.DEFAULT_PREFERENCES;
1117 }
1118 else {
1119 return _defaultPreferences;
1120 }
1121 }
1122
1123
1128 public void setDefaultPreferences(String defaultPreferences) {
1129 _defaultPreferences = defaultPreferences;
1130 }
1131
1132
1137 public String getPreferencesValidator() {
1138 return _preferencesValidator;
1139 }
1140
1141
1147 public void setPreferencesValidator(String preferencesValidator) {
1148 if (preferencesValidator != null) {
1149
1150
1153 _preferencesValidator = preferencesValidator.trim();
1154 }
1155 else {
1156 _preferencesValidator = null;
1157 }
1158 }
1159
1160
1165 public boolean getPreferencesCompanyWide() {
1166 return _preferencesCompanyWide;
1167 }
1168
1169
1174 public boolean isPreferencesCompanyWide() {
1175 return _preferencesCompanyWide;
1176 }
1177
1178
1184 public void setPreferencesCompanyWide(boolean preferencesCompanyWide) {
1185 _preferencesCompanyWide = preferencesCompanyWide;
1186 }
1187
1188
1193 public boolean getPreferencesUniquePerLayout() {
1194 return _preferencesUniquePerLayout;
1195 }
1196
1197
1202 public boolean isPreferencesUniquePerLayout() {
1203 return _preferencesUniquePerLayout;
1204 }
1205
1206
1212 public void setPreferencesUniquePerLayout(
1213 boolean preferencesUniquePerLayout) {
1214
1215 _preferencesUniquePerLayout = preferencesUniquePerLayout;
1216 }
1217
1218
1227 public boolean getPreferencesOwnedByGroup() {
1228 return _preferencesOwnedByGroup;
1229 }
1230
1231
1240 public boolean isPreferencesOwnedByGroup() {
1241 return _preferencesOwnedByGroup;
1242 }
1243
1244
1254 public void setPreferencesOwnedByGroup(boolean preferencesOwnedByGroup) {
1255 _preferencesOwnedByGroup = preferencesOwnedByGroup;
1256 }
1257
1258
1263 public boolean getUseDefaultTemplate() {
1264 return _useDefaultTemplate;
1265 }
1266
1267
1272 public boolean isUseDefaultTemplate() {
1273 return _useDefaultTemplate;
1274 }
1275
1276
1282 public void setUseDefaultTemplate(boolean useDefaultTemplate) {
1283 _useDefaultTemplate = useDefaultTemplate;
1284 }
1285
1286
1293 public boolean getShowPortletAccessDenied() {
1294 return _showPortletAccessDenied;
1295 }
1296
1297
1304 public boolean isShowPortletAccessDenied() {
1305 return _showPortletAccessDenied;
1306 }
1307
1308
1315 public void setShowPortletAccessDenied(boolean showPortletAccessDenied) {
1316 _showPortletAccessDenied = showPortletAccessDenied;
1317 }
1318
1319
1324 public boolean getShowPortletInactive() {
1325 return _showPortletInactive;
1326 }
1327
1328
1333 public boolean isShowPortletInactive() {
1334 return _showPortletInactive;
1335 }
1336
1337
1343 public void setShowPortletInactive(boolean showPortletInactive) {
1344 _showPortletInactive = showPortletInactive;
1345 }
1346
1347
1354 public boolean getActionURLRedirect() {
1355 return _actionURLRedirect;
1356 }
1357
1358
1365 public boolean isActionURLRedirect() {
1366 return _actionURLRedirect;
1367 }
1368
1369
1376 public void setActionURLRedirect(boolean actionURLRedirect) {
1377 _actionURLRedirect = actionURLRedirect;
1378 }
1379
1380
1387 public boolean getRestoreCurrentView() {
1388 return _restoreCurrentView;
1389 }
1390
1391
1398 public boolean isRestoreCurrentView() {
1399 return _restoreCurrentView;
1400 }
1401
1402
1409 public void setRestoreCurrentView(boolean restoreCurrentView) {
1410 _restoreCurrentView = restoreCurrentView;
1411 }
1412
1413
1420 public boolean getMaximizeEdit() {
1421 return _maximizeEdit;
1422 }
1423
1424
1431 public boolean isMaximizeEdit() {
1432 return _maximizeEdit;
1433 }
1434
1435
1442 public void setMaximizeEdit(boolean maximizeEdit) {
1443 _maximizeEdit = maximizeEdit;
1444 }
1445
1446
1453 public boolean getMaximizeHelp() {
1454 return _maximizeHelp;
1455 }
1456
1457
1464 public boolean isMaximizeHelp() {
1465 return _maximizeHelp;
1466 }
1467
1468
1475 public void setMaximizeHelp(boolean maximizeHelp) {
1476 _maximizeHelp = maximizeHelp;
1477 }
1478
1479
1486 public boolean getPopUpPrint() {
1487 return _popUpPrint;
1488 }
1489
1490
1497 public boolean isPopUpPrint() {
1498 return _popUpPrint;
1499 }
1500
1501
1508 public void setPopUpPrint(boolean popUpPrint) {
1509 _popUpPrint = popUpPrint;
1510 }
1511
1512
1517 public boolean getLayoutCacheable() {
1518 return _layoutCacheable;
1519 }
1520
1521
1526 public boolean isLayoutCacheable() {
1527 return _layoutCacheable;
1528 }
1529
1530
1536 public void setLayoutCacheable(boolean layoutCacheable) {
1537 _layoutCacheable = layoutCacheable;
1538 }
1539
1540
1545 public boolean getInstanceable() {
1546 return _instanceable;
1547 }
1548
1549
1554 public boolean isInstanceable() {
1555 return _instanceable;
1556 }
1557
1558
1564 public void setInstanceable(boolean instanceable) {
1565 _instanceable = instanceable;
1566 }
1567
1568
1573 public boolean getScopeable() {
1574 return _scopeable;
1575 }
1576
1577
1582 public boolean isScopeable() {
1583 return _scopeable;
1584 }
1585
1586
1592 public void setScopeable(boolean scopeable) {
1593 _scopeable = scopeable;
1594 }
1595
1596
1601 public String getUserPrincipalStrategy() {
1602 return _userPrincipalStrategy;
1603 }
1604
1605
1611 public void setUserPrincipalStrategy(String userPrincipalStrategy) {
1612 if (Validator.isNotNull(userPrincipalStrategy)) {
1613 _userPrincipalStrategy = userPrincipalStrategy;
1614 }
1615 }
1616
1617
1624 public boolean getPrivateRequestAttributes() {
1625 return _privateRequestAttributes;
1626 }
1627
1628
1635 public boolean isPrivateRequestAttributes() {
1636 return _privateRequestAttributes;
1637 }
1638
1639
1647 public void setPrivateRequestAttributes(boolean privateRequestAttributes) {
1648 _privateRequestAttributes = privateRequestAttributes;
1649 }
1650
1651
1658 public boolean getPrivateSessionAttributes() {
1659 return _privateSessionAttributes;
1660 }
1661
1662
1669 public boolean isPrivateSessionAttributes() {
1670 return _privateSessionAttributes;
1671 }
1672
1673
1680 public void setPrivateSessionAttributes(boolean privateSessionAttributes) {
1681 _privateSessionAttributes = privateSessionAttributes;
1682 }
1683
1684
1689 public int getRenderWeight() {
1690 return _renderWeight;
1691 }
1692
1693
1698 public void setRenderWeight(int renderWeight) {
1699 _renderWeight = renderWeight;
1700 }
1701
1702
1707 public boolean getAjaxable() {
1708 return _ajaxable;
1709 }
1710
1711
1716 public boolean isAjaxable() {
1717 return _ajaxable;
1718 }
1719
1720
1726 public void setAjaxable(boolean ajaxable) {
1727 _ajaxable = ajaxable;
1728 }
1729
1730
1737 public List<String> getHeaderPortalCss() {
1738 return _headerPortalCss;
1739 }
1740
1741
1748 public void setHeaderPortalCss(List<String> headerPortalCss) {
1749 _headerPortalCss = headerPortalCss;
1750 }
1751
1752
1759 public List<String> getHeaderPortletCss() {
1760 return _headerPortletCss;
1761 }
1762
1763
1771 public void setHeaderPortletCss(List<String> headerPortletCss) {
1772 _headerPortletCss = headerPortletCss;
1773 }
1774
1775
1782 public List<String> getHeaderPortalJavaScript() {
1783 return _headerPortalJavaScript;
1784 }
1785
1786
1794 public void setHeaderPortalJavaScript(List<String> headerPortalJavaScript) {
1795 _headerPortalJavaScript = headerPortalJavaScript;
1796 }
1797
1798
1805 public List<String> getHeaderPortletJavaScript() {
1806 return _headerPortletJavaScript;
1807 }
1808
1809
1817 public void setHeaderPortletJavaScript(
1818 List<String> headerPortletJavaScript) {
1819
1820 _headerPortletJavaScript = headerPortletJavaScript;
1821 }
1822
1823
1830 public List<String> getFooterPortalCss() {
1831 return _footerPortalCss;
1832 }
1833
1834
1841 public void setFooterPortalCss(List<String> footerPortalCss) {
1842 _footerPortalCss = footerPortalCss;
1843 }
1844
1845
1852 public List<String> getFooterPortletCss() {
1853 return _footerPortletCss;
1854 }
1855
1856
1864 public void setFooterPortletCss(List<String> footerPortletCss) {
1865 _footerPortletCss = footerPortletCss;
1866 }
1867
1868
1875 public List<String> getFooterPortalJavaScript() {
1876 return _footerPortalJavaScript;
1877 }
1878
1879
1887 public void setFooterPortalJavaScript(List<String> footerPortalJavaScript) {
1888 _footerPortalJavaScript = footerPortalJavaScript;
1889 }
1890
1891
1898 public List<String> getFooterPortletJavaScript() {
1899 return _footerPortletJavaScript;
1900 }
1901
1902
1910 public void setFooterPortletJavaScript(
1911 List<String> footerPortletJavaScript) {
1912
1913 _footerPortletJavaScript = footerPortletJavaScript;
1914 }
1915
1916
1923 public String getCssClassWrapper() {
1924 return _cssClassWrapper;
1925 }
1926
1927
1934 public void setCssClassWrapper(String cssClassWrapper) {
1935 _cssClassWrapper = cssClassWrapper;
1936 }
1937
1938
1943 public String getFacebookIntegration() {
1944 return _facebookIntegration;
1945 }
1946
1947
1953 public void setFacebookIntegration(String facebookIntegration) {
1954 if (Validator.isNotNull(facebookIntegration)) {
1955 _facebookIntegration = facebookIntegration;
1956 }
1957 }
1958
1959
1965 public boolean getAddDefaultResource() {
1966 return _addDefaultResource;
1967 }
1968
1969
1975 public boolean isAddDefaultResource() {
1976 return _addDefaultResource;
1977 }
1978
1979
1985 public void setAddDefaultResource(boolean addDefaultResource) {
1986 _addDefaultResource = addDefaultResource;
1987 }
1988
1989
1994 public void setRoles(String roles) {
1995 _rolesArray = StringUtil.split(roles);
1996
1997 super.setRoles(roles);
1998 }
1999
2000
2005 public String[] getRolesArray() {
2006 return _rolesArray;
2007 }
2008
2009
2014 public void setRolesArray(String[] rolesArray) {
2015 _rolesArray = rolesArray;
2016
2017 super.setRoles(StringUtil.merge(rolesArray));
2018 }
2019
2020
2025 public Set<String> getUnlinkedRoles() {
2026 return _unlinkedRoles;
2027 }
2028
2029
2034 public void setUnlinkedRoles(Set<String> unlinkedRoles) {
2035 _unlinkedRoles = unlinkedRoles;
2036 }
2037
2038
2043 public Map<String, String> getRoleMappers() {
2044 return _roleMappers;
2045 }
2046
2047
2052 public void setRoleMappers(Map<String, String> roleMappers) {
2053 _roleMappers = roleMappers;
2054 }
2055
2056
2060 public void linkRoles() {
2061 List<String> linkedRoles = new ArrayList<String>();
2062
2063 Iterator<String> itr = _unlinkedRoles.iterator();
2064
2065 while (itr.hasNext()) {
2066 String unlinkedRole = itr.next();
2067
2068 String roleLink = _roleMappers.get(unlinkedRole);
2069
2070 if (Validator.isNotNull(roleLink)) {
2071 if (_log.isDebugEnabled()) {
2072 _log.debug(
2073 "Linking role for portlet [" + getPortletId() +
2074 "] with role-name [" + unlinkedRole +
2075 "] to role-link [" + roleLink + "]");
2076 }
2077
2078 linkedRoles.add(roleLink);
2079 }
2080 else {
2081 _log.error(
2082 "Unable to link role for portlet [" + getPortletId() +
2083 "] with role-name [" + unlinkedRole +
2084 "] because role-link is null");
2085 }
2086 }
2087
2088 String[] array = linkedRoles.toArray(new String[linkedRoles.size()]);
2089
2090 Arrays.sort(array);
2091
2092 setRolesArray(array);
2093 }
2094
2095
2100 public boolean hasRoleWithName(String roleName) {
2101 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2102 return false;
2103 }
2104
2105 for (int i = 0; i < _rolesArray.length; i++) {
2106 if (_rolesArray[i].equalsIgnoreCase(roleName)) {
2107 return true;
2108 }
2109 }
2110
2111 return false;
2112 }
2113
2114
2121 public boolean hasAddPortletPermission(long userId) {
2122 try {
2123 if ((_rolesArray == null) || (_rolesArray.length == 0)) {
2124 return true;
2125 }
2126 else if (RoleLocalServiceUtil.hasUserRoles(
2127 userId, getCompanyId(), _rolesArray, true)) {
2128
2129 return true;
2130 }
2131 else if (RoleLocalServiceUtil.hasUserRole(
2132 userId, getCompanyId(), RoleConstants.ADMINISTRATOR,
2133 true)) {
2134
2135 return true;
2136 }
2137 else {
2138 User user = UserLocalServiceUtil.getUserById(userId);
2139
2140 if (user.isDefaultUser() &&
2141 hasRoleWithName(RoleConstants.GUEST)) {
2142
2143 return true;
2144 }
2145 }
2146 }
2147 catch (Exception e) {
2148 _log.error(e);
2149 }
2150
2151 return false;
2152 }
2153
2154
2161 public boolean getSystem() {
2162 return _system;
2163 }
2164
2165
2172 public boolean isSystem() {
2173 return _system;
2174 }
2175
2176
2183 public void setSystem(boolean system) {
2184 _system = system;
2185 }
2186
2187
2194 public boolean getInclude() {
2195 return _include;
2196 }
2197
2198
2205 public boolean isInclude() {
2206 return _include;
2207 }
2208
2209
2216 public void setInclude(boolean include) {
2217 _include = include;
2218 }
2219
2220
2225 public Map<String, String> getInitParams() {
2226 return _initParams;
2227 }
2228
2229
2234 public void setInitParams(Map<String, String> initParams) {
2235 _initParams = initParams;
2236 }
2237
2238
2243 public Integer getExpCache() {
2244 return _expCache;
2245 }
2246
2247
2252 public void setExpCache(Integer expCache) {
2253 _expCache = expCache;
2254 }
2255
2256
2261 public Map<String, Set<String>> getPortletModes() {
2262 return _portletModes;
2263 }
2264
2265
2270 public void setPortletModes(Map<String, Set<String>> portletModes) {
2271 _portletModes = portletModes;
2272 }
2273
2274
2281 public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
2282 if (mimeType == null) {
2283 mimeType = ContentTypes.TEXT_HTML;
2284 }
2285
2286 Set<String> mimeTypeModes = _portletModes.get(mimeType);
2287
2288 if (mimeTypeModes == null) {
2289 return false;
2290 }
2291
2292 if (mimeTypeModes.contains(portletMode.toString())) {
2293 return true;
2294 }
2295 else {
2296 return false;
2297 }
2298 }
2299
2300
2305 public Set<String> getAllPortletModes() {
2306 Set<String> allPortletModes = new TreeSet<String>();
2307
2308 Iterator<Map.Entry <String, Set<String>>> itr1 =
2309 _portletModes.entrySet().iterator();
2310
2311 while (itr1.hasNext()) {
2312 Map.Entry<String, Set<String>> entry = itr1.next();
2313
2314 Set<String> mimeTypeModes = entry.getValue();
2315
2316 Iterator<String> itr2 = mimeTypeModes.iterator();
2317
2318 while (itr2.hasNext()) {
2319 String portletMode = itr2.next();
2320
2321 allPortletModes.add(portletMode);
2322 }
2323 }
2324
2325 return allPortletModes;
2326 }
2327
2328
2333 public boolean hasMultipleMimeTypes() {
2334 if (_portletModes.size() > 1) {
2335 return true;
2336 }
2337 else {
2338 return false;
2339 }
2340 }
2341
2342
2347 public Set<String> getSupportedLocales() {
2348 return _supportedLocales;
2349 }
2350
2351
2356 public void setSupportedLocales(Set<String> supportedLocales) {
2357 _supportedLocales = supportedLocales;
2358 }
2359
2360
2365 public String getResourceBundle() {
2366 return _resourceBundle;
2367 }
2368
2369
2374 public void setResourceBundle(String resourceBundle) {
2375 _resourceBundle = resourceBundle;
2376 }
2377
2378
2383 public PortletInfo getPortletInfo() {
2384 return _portletInfo;
2385 }
2386
2387
2392 public void setPortletInfo(PortletInfo portletInfo) {
2393 _portletInfo = portletInfo;
2394 }
2395
2396
2401 public Map<String, PortletFilter> getPortletFilters() {
2402 return _portletFilters;
2403 }
2404
2405
2410 public void setPortletFilters(Map<String, PortletFilter> portletFilters) {
2411 _portletFilters = portletFilters;
2412 }
2413
2414
2419 public void addProcessingEvent(QName processingEvent) {
2420 _processingEvents.add(processingEvent);
2421 _processingEventsByQName.put(
2422 PortletQNameUtil.getKey(processingEvent), processingEvent);
2423 }
2424
2425
2432 public QName getProcessingEvent(String uri, String localPart) {
2433 return _processingEventsByQName.get(
2434 PortletQNameUtil.getKey(uri, localPart));
2435 }
2436
2437
2442 public Set<QName> getProcessingEvents() {
2443 return _processingEvents;
2444 }
2445
2446
2452 public void setProcessingEvents(Set<QName> processingEvents) {
2453 for (QName processingEvent : processingEvents) {
2454 addProcessingEvent(processingEvent);
2455 }
2456 }
2457
2458
2463 public void addPublishingEvent(QName publishingEvent) {
2464 _publishingEvents.add(publishingEvent);
2465 }
2466
2467
2472 public Set<QName> getPublishingEvents() {
2473 return _publishingEvents;
2474 }
2475
2476
2482 public void setPublishingEvents(Set<QName> publishingEvents) {
2483 for (QName publishingEvent : publishingEvents) {
2484 addPublishingEvent(publishingEvent);
2485 }
2486 }
2487
2488
2493 public void addPublicRenderParameter(
2494 PublicRenderParameter publicRenderParameter) {
2495
2496 _publicRenderParameters.add(publicRenderParameter);
2497 _publicRenderParametersByIdentifier.put(
2498 publicRenderParameter.getIdentifier(), publicRenderParameter);
2499 _publicRenderParametersByQName.put(
2500 PortletQNameUtil.getKey(publicRenderParameter.getQName()),
2501 publicRenderParameter);
2502 }
2503
2504
2509 public PublicRenderParameter getPublicRenderParameter(String identifier) {
2510 return _publicRenderParametersByIdentifier.get(identifier);
2511 }
2512
2513
2520 public PublicRenderParameter getPublicRenderParameter(
2521 String uri, String localPart) {
2522
2523 return _publicRenderParametersByQName.get(
2524 PortletQNameUtil.getKey(uri, localPart));
2525 }
2526
2527
2532 public Set<PublicRenderParameter> getPublicRenderParameters() {
2533 return _publicRenderParameters;
2534 }
2535
2536
2542 public void setPublicRenderParameters(
2543 Set<PublicRenderParameter> publicRenderParameters) {
2544
2545 for (PublicRenderParameter publicRenderParameter :
2546 publicRenderParameters) {
2547
2548 addPublicRenderParameter(publicRenderParameter);
2549 }
2550 }
2551
2552
2557 public boolean isRemote() {
2558 return _remote;
2559 }
2560
2561
2566 public void setRemote(boolean remote) {
2567 _remote = remote;
2568 }
2569
2570
2575 public String getRemoteConsumerId() {
2576 return _remoteConsumerId;
2577 }
2578
2579
2584 public void setRemoteConsumerId(String remoteConsumerId) {
2585 _remoteConsumerId = remoteConsumerId;
2586 }
2587
2588
2593 public String getRemoteProducerEntityId() {
2594 return _remoteProducerEntityId;
2595 }
2596
2597
2603 public void setRemoteProducerEntityId(String remoteProducerEntityId) {
2604 _remoteProducerEntityId = remoteProducerEntityId;
2605 }
2606
2607
2612 public String getRemotePortletHandle() {
2613 return _remotePortletHandle;
2614 }
2615
2616
2621 public void setRemotePortletHandle(String remotePortletHandle) {
2622 _remotePortletHandle = remotePortletHandle;
2623 }
2624
2625
2630 public String getRemotePortletId() {
2631 return _remotePortletId;
2632 }
2633
2634
2639 public void setRemotePortletId(String remotePortletId) {
2640 _remotePortletId = remotePortletId;
2641 }
2642
2643
2648 public String getContextPath() {
2649 String virtualPath = getVirtualPath();
2650
2651 if (Validator.isNotNull(virtualPath)) {
2652 return virtualPath;
2653 }
2654
2655 if (_portletApp.isWARFile()) {
2656 StringBuilder sb = new StringBuilder();
2657
2658 sb.append(StringPool.SLASH);
2659 sb.append(_portletApp.getServletContextName());
2660
2661 return sb.toString();
2662 }
2663 else {
2664 return PortalUtil.getPathContext();
2665 }
2666 }
2667
2668
2673 public PortletApp getPortletApp() {
2674 return _portletApp;
2675 }
2676
2677
2682 public void setPortletApp(PortletApp portletApp) {
2683 _portletApp = portletApp;
2684 }
2685
2686
2692 public Portlet getClonedInstance(String portletId) {
2693 if (_clonedInstances == null) {
2694
2695
2697 return null;
2698 }
2699
2700 Portlet clonedInstance = _clonedInstances.get(portletId);
2701
2702 if (clonedInstance == null) {
2703 clonedInstance = (Portlet)clone();
2704
2705 clonedInstance.setPortletId(portletId);
2706
2707
2714 }
2716
2717 return clonedInstance;
2718 }
2719
2720
2726 public boolean getStatic() {
2727 return _staticPortlet;
2728 }
2729
2730
2736 public boolean isStatic() {
2737 return _staticPortlet;
2738 }
2739
2740
2746 public void setStatic(boolean staticPortlet) {
2747 _staticPortlet = staticPortlet;
2748 }
2749
2750
2757 public boolean getStaticStart() {
2758 return _staticPortletStart;
2759 }
2760
2761
2768 public boolean isStaticStart() {
2769 return _staticPortletStart;
2770 }
2771
2772
2779 public void setStaticStart(boolean staticPortletStart) {
2780 _staticPortletStart = staticPortletStart;
2781 }
2782
2783
2790 public boolean getStaticEnd() {
2791 return !_staticPortletStart;
2792 }
2793
2794
2801 public boolean isStaticEnd() {
2802 return !_staticPortletStart;
2803 }
2804
2805
2811 public boolean getUndeployedPortlet() {
2812 return _undeployedPortlet;
2813 }
2814
2815
2821 public boolean isUndeployedPortlet() {
2822 return _undeployedPortlet;
2823 }
2824
2825
2831 public void setUndeployedPortlet(boolean undeployedPortlet) {
2832 _undeployedPortlet = undeployedPortlet;
2833 }
2834
2835
2840 public Object clone() {
2841 Portlet portlet = new PortletImpl(
2842 getPortletId(), getPluginPackage(), getDefaultPluginSetting(),
2843 getCompanyId(), getTimestamp(), getIcon(), getVirtualPath(),
2844 getStrutsPath(), getPortletName(), getDisplayName(),
2845 getPortletClass(), getConfigurationActionClass(), getIndexerClass(),
2846 getOpenSearchClass(), getSchedulerClass(), getPortletURLClass(),
2847 getFriendlyURLMapperClass(), getURLEncoderClass(),
2848 getPortletDataHandlerClass(), getPortletLayoutListenerClass(),
2849 getPollerProcessorClass(), getPopMessageListenerClass(),
2850 getSocialActivityInterpreterClass(),
2851 getSocialRequestInterpreterClass(), getWebDAVStorageToken(),
2852 getWebDAVStorageClass(), getControlPanelEntryCategory(),
2853 getControlPanelEntryWeight(), getControlPanelEntryClass(),
2854 getDefaultPreferences(), getPreferencesValidator(),
2855 isPreferencesCompanyWide(), isPreferencesUniquePerLayout(),
2856 isPreferencesOwnedByGroup(), isUseDefaultTemplate(),
2857 isShowPortletAccessDenied(), isShowPortletInactive(),
2858 isActionURLRedirect(), isRestoreCurrentView(), isMaximizeEdit(),
2859 isMaximizeHelp(), isPopUpPrint(), isLayoutCacheable(),
2860 isInstanceable(), isScopeable(), getUserPrincipalStrategy(),
2861 isPrivateRequestAttributes(), isPrivateSessionAttributes(),
2862 getRenderWeight(), isAjaxable(), getHeaderPortalCss(),
2863 getHeaderPortletCss(), getHeaderPortalJavaScript(),
2864 getHeaderPortletJavaScript(), getFooterPortalCss(),
2865 getFooterPortletCss(), getFooterPortalJavaScript(),
2866 getFooterPortletJavaScript(), getCssClassWrapper(),
2867 getFacebookIntegration(), isAddDefaultResource(), getRoles(),
2868 getUnlinkedRoles(), getRoleMappers(), isSystem(), isActive(),
2869 isInclude(), getInitParams(), getExpCache(), getPortletModes(),
2870 getSupportedLocales(), getResourceBundle(), getPortletInfo(),
2871 getPortletFilters(), getProcessingEvents(), getPublishingEvents(),
2872 getPublicRenderParameters(), isRemote(), getRemoteConsumerId(),
2873 getRemoteProducerEntityId(), getRemotePortletHandle(),
2874 getRemotePortletId(), getPortletApp());
2875
2876 portlet.setId(getId());
2877
2878 return portlet;
2879 }
2880
2881
2890 public int compareTo(Portlet portlet) {
2891 return getPortletId().compareTo(portlet.getPortletId());
2892 }
2893
2894
2900 public boolean equals(Object obj) {
2901 Portlet portlet = (Portlet)obj;
2902
2903 return getPortletId().equals(portlet.getPortletId());
2904 }
2905
2906
2909 private static Log _log = LogFactoryUtil.getLog(PortletImpl.class);
2910
2911
2914 private PluginPackage _pluginPackage;
2915
2916
2919 private PluginSetting _defaultPluginSetting;
2920
2921
2924 private long _timestamp;
2925
2926
2929 private String _icon;
2930
2931
2934 private String _virtualPath;
2935
2936
2939 private String _strutsPath;
2940
2941
2944 private String _portletName;
2945
2946
2949 private String _displayName;
2950
2951
2954 private String _portletClass;
2955
2956
2959 private String _configurationActionClass;
2960
2961
2964 private String _indexerClass;
2965
2966
2969 private String _openSearchClass;
2970
2971
2974 private String _schedulerClass;
2975
2976
2979 private String _portletURLClass;
2980
2981
2984 private String _friendlyURLMapperClass;
2985
2986
2989 private String _urlEncoderClass;
2990
2991
2994 private String _portletDataHandlerClass;
2995
2996
2999 private String _portletLayoutListenerClass;
3000
3001
3004 private String _pollerProcessorClass;
3005
3006
3009 private String _popMessageListenerClass;
3010
3011
3014 private String _socialActivityInterpreterClass;
3015
3016
3019 private String _socialRequestInterpreterClass;
3020
3021
3024 private String _webDAVStorageToken;
3025
3026
3029 private String _webDAVStorageClass;
3030
3031
3034 private String _defaultPreferences;
3035
3036
3039 private String _preferencesValidator;
3040
3041
3044 private boolean _preferencesCompanyWide;
3045
3046
3049 private boolean _preferencesUniquePerLayout = true;
3050
3051
3055 private boolean _preferencesOwnedByGroup = true;
3056
3057
3061 private String _controlPanelEntryCategory;
3062
3063
3067 private double _controlPanelEntryWeight = 100;
3068
3069
3073 private String _controlPanelEntryClass;
3074
3075
3078 private boolean _useDefaultTemplate = true;
3079
3080
3083 private boolean _showPortletAccessDenied =
3084 PropsValues.LAYOUT_SHOW_PORTLET_ACCESS_DENIED;
3085
3086
3089 private boolean _showPortletInactive =
3090 PropsValues.LAYOUT_SHOW_PORTLET_INACTIVE;
3091
3092
3095 private boolean _actionURLRedirect;
3096
3097
3101 private boolean _restoreCurrentView = true;
3102
3103
3107 private boolean _maximizeEdit;
3108
3109
3113 private boolean _maximizeHelp;
3114
3115
3119 private boolean _popUpPrint = true;
3120
3121
3124 private boolean _layoutCacheable;
3125
3126
3129 private boolean _instanceable;
3130
3131
3134 private boolean _scopeable;
3135
3136
3139 private String _userPrincipalStrategy =
3140 PortletConstants.USER_PRINCIPAL_STRATEGY_USER_ID;
3141
3142
3146 private boolean _privateRequestAttributes = true;
3147
3148
3151 private boolean _privateSessionAttributes = true;
3152
3153
3156 private int _renderWeight = 1;
3157
3158
3161 private boolean _ajaxable = true;
3162
3163
3167 private List<String> _headerPortalCss;
3168
3169
3173 private List<String> _headerPortletCss;
3174
3175
3179 private List<String> _headerPortalJavaScript;
3180
3181
3185 private List<String> _headerPortletJavaScript;
3186
3187
3191 private List<String> _footerPortalCss;
3192
3193
3197 private List<String> _footerPortletCss;
3198
3199
3203 private List<String> _footerPortalJavaScript;
3204
3205
3209 private List<String> _footerPortletJavaScript;
3210
3211
3215 private String _cssClassWrapper = StringPool.BLANK;
3216
3217
3220 private String _facebookIntegration =
3221 PortletConstants.FACEBOOK_INTEGRATION_IFRAME;
3222
3223
3226 private boolean _addDefaultResource;
3227
3228
3231 private String[] _rolesArray;
3232
3233
3236 private Set<String> _unlinkedRoles;
3237
3238
3241 private Map<String, String> _roleMappers;
3242
3243
3247 private boolean _system;
3248
3249
3252 private boolean _include = true;
3253
3254
3257 private Map<String, String> _initParams;
3258
3259
3262 private Integer _expCache;
3263
3264
3267 private Map<String, Set<String>> _portletModes;
3268
3269
3272 private Set<String> _supportedLocales;
3273
3274
3277 private String _resourceBundle;
3278
3279
3282 private PortletInfo _portletInfo;
3283
3284
3287 private Map<String, PortletFilter> _portletFilters;
3288
3289
3292 private Set<QName> _processingEvents = new HashSet<QName>();
3293
3294
3297 private Map<String, QName> _processingEventsByQName =
3298 new HashMap<String, QName>();
3299
3300
3303 private Set<QName> _publishingEvents = new HashSet<QName>();
3304
3305
3308 private Set<PublicRenderParameter> _publicRenderParameters =
3309 new HashSet<PublicRenderParameter>();
3310
3311
3315 private Map<String, PublicRenderParameter>
3316 _publicRenderParametersByIdentifier =
3317 new HashMap<String, PublicRenderParameter>();
3318
3319
3323 private Map<String, PublicRenderParameter>
3324 _publicRenderParametersByQName =
3325 new HashMap<String, PublicRenderParameter>();
3326
3327
3330 private boolean _remote = false;
3331
3332
3335 private String _remoteConsumerId;
3336
3337
3340 private String _remoteProducerEntityId;
3341
3342
3345 private String _remotePortletHandle;
3346
3347
3350 private String _remotePortletId;
3351
3352
3355 private PortletApp _portletApp;
3356
3357
3360 private Map<String, Portlet> _clonedInstances;
3361
3362
3365 private boolean _staticPortlet;
3366
3367
3371 private boolean _staticPortletStart;
3372
3373
3376 private boolean _undeployedPortlet = false;
3377
3378}