001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.model.impl;
016    
017    import com.liferay.portal.kernel.atom.AtomCollectionAdapter;
018    import com.liferay.portal.kernel.lar.PortletDataHandler;
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.plugin.PluginPackage;
022    import com.liferay.portal.kernel.poller.PollerProcessor;
023    import com.liferay.portal.kernel.pop.MessageListener;
024    import com.liferay.portal.kernel.portlet.ConfigurationAction;
025    import com.liferay.portal.kernel.portlet.FriendlyURLMapper;
026    import com.liferay.portal.kernel.portlet.PortletBag;
027    import com.liferay.portal.kernel.portlet.PortletBagPool;
028    import com.liferay.portal.kernel.portlet.PortletLayoutListener;
029    import com.liferay.portal.kernel.portletdisplaytemplate.PortletDisplayTemplateHandler;
030    import com.liferay.portal.kernel.scheduler.SchedulerEntry;
031    import com.liferay.portal.kernel.search.Indexer;
032    import com.liferay.portal.kernel.search.OpenSearch;
033    import com.liferay.portal.kernel.servlet.ServletContextPool;
034    import com.liferay.portal.kernel.servlet.URLEncoder;
035    import com.liferay.portal.kernel.trash.TrashHandler;
036    import com.liferay.portal.kernel.util.ContentTypes;
037    import com.liferay.portal.kernel.util.ContextPathUtil;
038    import com.liferay.portal.kernel.util.StringPool;
039    import com.liferay.portal.kernel.util.StringUtil;
040    import com.liferay.portal.kernel.util.Validator;
041    import com.liferay.portal.kernel.webdav.WebDAVStorage;
042    import com.liferay.portal.kernel.workflow.WorkflowHandler;
043    import com.liferay.portal.kernel.xml.QName;
044    import com.liferay.portal.kernel.xmlrpc.Method;
045    import com.liferay.portal.model.Plugin;
046    import com.liferay.portal.model.PluginSetting;
047    import com.liferay.portal.model.Portlet;
048    import com.liferay.portal.model.PortletApp;
049    import com.liferay.portal.model.PortletConstants;
050    import com.liferay.portal.model.PortletFilter;
051    import com.liferay.portal.model.PortletInfo;
052    import com.liferay.portal.model.PublicRenderParameter;
053    import com.liferay.portal.model.User;
054    import com.liferay.portal.security.permission.ActionKeys;
055    import com.liferay.portal.security.permission.PermissionChecker;
056    import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil;
057    import com.liferay.portal.security.permission.PermissionPropagator;
058    import com.liferay.portal.security.permission.PermissionThreadLocal;
059    import com.liferay.portal.service.UserLocalServiceUtil;
060    import com.liferay.portal.service.permission.PortletPermissionUtil;
061    import com.liferay.portal.util.PortalUtil;
062    import com.liferay.portal.util.PropsValues;
063    import com.liferay.portlet.ControlPanelEntry;
064    import com.liferay.portlet.PortletQNameUtil;
065    import com.liferay.portlet.asset.model.AssetRendererFactory;
066    import com.liferay.portlet.expando.model.CustomAttributesDisplay;
067    import com.liferay.portlet.social.model.SocialActivityInterpreter;
068    import com.liferay.portlet.social.model.SocialRequestInterpreter;
069    import com.liferay.util.bridges.alloy.AlloyPortlet;
070    
071    import java.util.ArrayList;
072    import java.util.Arrays;
073    import java.util.Collections;
074    import java.util.HashMap;
075    import java.util.HashSet;
076    import java.util.LinkedHashMap;
077    import java.util.LinkedHashSet;
078    import java.util.List;
079    import java.util.Map;
080    import java.util.Set;
081    import java.util.TreeSet;
082    import java.util.concurrent.ConcurrentHashMap;
083    
084    import javax.portlet.PortletMode;
085    import javax.portlet.WindowState;
086    
087    import javax.servlet.ServletContext;
088    
089    /**
090     * @author Brian Wing Shun Chan
091     */
092    public class PortletImpl extends PortletBaseImpl {
093    
094            /**
095             * Constructs a portlet with no parameters.
096             */
097            public PortletImpl() {
098            }
099    
100            /**
101             * Constructs a portlet with the specified parameters.
102             */
103            public PortletImpl(long companyId, String portletId) {
104                    setCompanyId(companyId);
105                    setPortletId(portletId);
106                    setStrutsPath(portletId);
107                    setActive(true);
108                    _indexerClasses = new ArrayList<String>();
109                    _schedulerEntries = new ArrayList<SchedulerEntry>();
110                    _assetRendererFactoryClasses = new ArrayList<String>();
111                    _atomCollectionAdapterClasses = new ArrayList<String>();
112                    _customAttributesDisplayClasses = new ArrayList<String>();
113                    _trashHandlerClasses = new ArrayList<String>();
114                    _workflowHandlerClasses = new ArrayList<String>();
115                    _autopropagatedParameters = new LinkedHashSet<String>();
116                    _headerPortalCss = new ArrayList<String>();
117                    _headerPortletCss = new ArrayList<String>();
118                    _headerPortalJavaScript = new ArrayList<String>();
119                    _headerPortletJavaScript = new ArrayList<String>();
120                    _footerPortalCss = new ArrayList<String>();
121                    _footerPortletCss = new ArrayList<String>();
122                    _footerPortalJavaScript = new ArrayList<String>();
123                    _footerPortletJavaScript = new ArrayList<String>();
124                    _unlinkedRoles = new HashSet<String>();
125                    _roleMappers = new LinkedHashMap<String, String>();
126                    _initParams = new HashMap<String, String>();
127                    _portletModes = new HashMap<String, Set<String>>();
128                    _windowStates = new HashMap<String, Set<String>>();
129                    _supportedLocales = new HashSet<String>();
130                    _portletFilters = new LinkedHashMap<String, PortletFilter>();
131                    _processingEvents = new HashSet<QName>();
132                    _publishingEvents = new HashSet<QName>();
133                    _publicRenderParameters = new HashSet<PublicRenderParameter>();
134            }
135    
136            /**
137             * Constructs a portlet with the specified parameters.
138             */
139            public PortletImpl(
140                    String portletId, Portlet rootPortlet, PluginPackage pluginPackage,
141                    PluginSetting pluginSetting, long companyId, long timestamp,
142                    String icon, String virtualPath, String strutsPath,
143                    String parentStrutsPath, String portletName, String displayName,
144                    String portletClass, String configurationActionClass,
145                    List<String> indexerClasses, String openSearchClass,
146                    List<SchedulerEntry> schedulerEntries, String portletURLClass,
147                    String friendlyURLMapperClass, String friendlyURLMapping,
148                    String friendlyURLRoutes, String urlEncoderClass,
149                    String portletDataHandlerClass,
150                    String portletDisplayTemplateHandlerClass,
151                    String portletLayoutListenerClass, String pollerProcessorClass,
152                    String popMessageListenerClass, String socialActivityInterpreterClass,
153                    String socialRequestInterpreterClass, String webDAVStorageToken,
154                    String webDAVStorageClass, String xmlRpcMethodClass,
155                    String controlPanelEntryCategory, double controlPanelEntryWeight,
156                    String controlPanelClass, List<String> assetRendererFactoryClasses,
157                    List<String> atomCollectionAdapterClasses,
158                    List<String> customAttributesDisplayClasses,
159                    String permissionPropagatorClass, List<String> trashHandlerClasses,
160                    List<String> workflowHandlerClasses, String defaultPreferences,
161                    String preferencesValidator, boolean preferencesCompanyWide,
162                    boolean preferencesUniquePerLayout, boolean preferencesOwnedByGroup,
163                    boolean useDefaultTemplate, boolean showPortletAccessDenied,
164                    boolean showPortletInactive, boolean actionURLRedirect,
165                    boolean restoreCurrentView, boolean maximizeEdit, boolean maximizeHelp,
166                    boolean popUpPrint, boolean layoutCacheable, boolean instanceable,
167                    boolean remoteable, boolean scopeable, String userPrincipalStrategy,
168                    boolean privateRequestAttributes, boolean privateSessionAttributes,
169                    Set<String> autopropagatedParameters, int actionTimeout,
170                    int renderTimeout, int renderWeight, boolean ajaxable,
171                    List<String> headerPortalCss, List<String> headerPortletCss,
172                    List<String> headerPortalJavaScript,
173                    List<String> headerPortletJavaScript, List<String> footerPortalCss,
174                    List<String> footerPortletCss, List<String> footerPortalJavaScript,
175                    List<String> footerPortletJavaScript, String cssClassWrapper,
176                    String facebookIntegration, boolean addDefaultResource, String roles,
177                    Set<String> unlinkedRoles, Map<String, String> roleMappers,
178                    boolean system, boolean active, boolean include,
179                    Map<String, String> initParams, Integer expCache,
180                    Map<String, Set<String>> portletModes,
181                    Map<String, Set<String>> windowStates, Set<String> supportedLocales,
182                    String resourceBundle, PortletInfo portletInfo,
183                    Map<String, PortletFilter> portletFilters, Set<QName> processingEvents,
184                    Set<QName> publishingEvents,
185                    Set<PublicRenderParameter> publicRenderParameters,
186                    PortletApp portletApp) {
187    
188                    setPortletId(portletId);
189                    _rootPortlet = rootPortlet;
190                    _pluginPackage = pluginPackage;
191                    _defaultPluginSetting = pluginSetting;
192                    setCompanyId(companyId);
193                    _timestamp = timestamp;
194                    _icon = icon;
195                    _virtualPath = virtualPath;
196                    _strutsPath = strutsPath;
197                    _portletName = portletName;
198                    _parentStrutsPath = parentStrutsPath;
199                    _displayName = displayName;
200                    _portletClass = portletClass;
201                    _configurationActionClass = configurationActionClass;
202                    _indexerClasses = indexerClasses;
203                    _openSearchClass = openSearchClass;
204                    _schedulerEntries = schedulerEntries;
205                    _portletURLClass = portletURLClass;
206                    _friendlyURLMapperClass = friendlyURLMapperClass;
207                    _friendlyURLMapping = friendlyURLMapping;
208                    _friendlyURLRoutes = friendlyURLRoutes;
209                    _urlEncoderClass = urlEncoderClass;
210                    _portletDataHandlerClass = portletDataHandlerClass;
211                    _portletDisplayTemplateHandlerClass =
212                            portletDisplayTemplateHandlerClass;
213                    _portletLayoutListenerClass = portletLayoutListenerClass;
214                    _pollerProcessorClass = pollerProcessorClass;
215                    _popMessageListenerClass = popMessageListenerClass;
216                    _socialActivityInterpreterClass = socialActivityInterpreterClass;
217                    _socialRequestInterpreterClass = socialRequestInterpreterClass;
218                    _webDAVStorageToken = webDAVStorageToken;
219                    _webDAVStorageClass = webDAVStorageClass;
220                    _xmlRpcMethodClass = xmlRpcMethodClass;
221                    _controlPanelEntryCategory = controlPanelEntryCategory;
222                    _controlPanelEntryWeight = controlPanelEntryWeight;
223                    _controlPanelEntryClass = controlPanelClass;
224                    _assetRendererFactoryClasses = assetRendererFactoryClasses;
225                    _atomCollectionAdapterClasses = atomCollectionAdapterClasses;
226                    _customAttributesDisplayClasses = customAttributesDisplayClasses;
227                    _permissionPropagatorClass = permissionPropagatorClass;
228                    _trashHandlerClasses = trashHandlerClasses;
229                    _workflowHandlerClasses = workflowHandlerClasses;
230                    _defaultPreferences = defaultPreferences;
231                    _preferencesValidator = preferencesValidator;
232                    _preferencesCompanyWide = preferencesCompanyWide;
233                    _preferencesUniquePerLayout = preferencesUniquePerLayout;
234                    _preferencesOwnedByGroup = preferencesOwnedByGroup;
235                    _useDefaultTemplate = useDefaultTemplate;
236                    _showPortletAccessDenied = showPortletAccessDenied;
237                    _showPortletInactive = showPortletInactive;
238                    _actionURLRedirect = actionURLRedirect;
239                    _restoreCurrentView = restoreCurrentView;
240                    _maximizeEdit = maximizeEdit;
241                    _maximizeHelp = maximizeHelp;
242                    _popUpPrint = popUpPrint;
243                    _layoutCacheable = layoutCacheable;
244                    _instanceable = instanceable;
245                    _remoteable = remoteable;
246                    _scopeable = scopeable;
247                    _userPrincipalStrategy = userPrincipalStrategy;
248                    _privateRequestAttributes = privateRequestAttributes;
249                    _privateSessionAttributes = privateSessionAttributes;
250                    _autopropagatedParameters = autopropagatedParameters;
251                    _actionTimeout = actionTimeout;
252                    _renderTimeout = renderTimeout;
253                    _renderWeight = renderWeight;
254                    _ajaxable = ajaxable;
255                    _headerPortalCss = headerPortalCss;
256                    _headerPortletCss = headerPortletCss;
257                    _headerPortalJavaScript = headerPortalJavaScript;
258                    _headerPortletJavaScript = headerPortletJavaScript;
259                    _footerPortalCss = footerPortalCss;
260                    _footerPortletCss = footerPortletCss;
261                    _footerPortalJavaScript = footerPortalJavaScript;
262                    _footerPortletJavaScript = footerPortletJavaScript;
263                    _cssClassWrapper = cssClassWrapper;
264                    _facebookIntegration = facebookIntegration;
265                    _scopeable = scopeable;
266                    _addDefaultResource = addDefaultResource;
267                    setRoles(roles);
268                    _unlinkedRoles = unlinkedRoles;
269                    _roleMappers = roleMappers;
270                    _system = system;
271                    setActive(active);
272                    _include = include;
273                    _initParams = initParams;
274                    _expCache = expCache;
275                    _portletModes = portletModes;
276                    _windowStates = windowStates;
277                    _supportedLocales = supportedLocales;
278                    _resourceBundle = resourceBundle;
279                    _portletInfo = portletInfo;
280                    _portletFilters = portletFilters;
281                    setProcessingEvents(processingEvents);
282                    setPublishingEvents(publishingEvents);
283                    setPublicRenderParameters(publicRenderParameters);
284                    _portletApp = portletApp;
285            }
286    
287            /**
288             * Adds a supported processing event.
289             */
290            public void addProcessingEvent(QName processingEvent) {
291                    _processingEvents.add(processingEvent);
292                    _processingEventsByQName.put(
293                            PortletQNameUtil.getKey(processingEvent), processingEvent);
294            }
295    
296            /**
297             * Adds a supported public render parameter.
298             *
299             * @param publicRenderParameter a supported public render parameter
300             */
301            public void addPublicRenderParameter(
302                    PublicRenderParameter publicRenderParameter) {
303    
304                    _publicRenderParameters.add(publicRenderParameter);
305    
306                    String identifier = publicRenderParameter.getIdentifier();
307    
308                    _publicRenderParametersByIdentifier.put(
309                            identifier, publicRenderParameter);
310    
311                    QName qName = publicRenderParameter.getQName();
312    
313                    _publicRenderParametersByQName.put(
314                            PortletQNameUtil.getKey(qName), publicRenderParameter);
315    
316                    String publicRenderParameterName =
317                            PortletQNameUtil.getPublicRenderParameterName(qName);
318    
319                    PortletQNameUtil.setPublicRenderParameterIdentifier(
320                            publicRenderParameterName, identifier);
321            }
322    
323            /**
324             * Adds a supported publishing event.
325             */
326            public void addPublishingEvent(QName publishingEvent) {
327                    _publishingEvents.add(publishingEvent);
328            }
329    
330            /**
331             * Adds a scheduler entry.
332             */
333            public void addSchedulerEntry(SchedulerEntry schedulerEntry) {
334                    _schedulerEntries.add(schedulerEntry);
335            }
336    
337            /**
338             * Creates and returns a copy of this object.
339             *
340             * @return a copy of this object
341             */
342            @Override
343            public Object clone() {
344                    Portlet portlet = new PortletImpl(
345                            getPortletId(), getRootPortlet(), getPluginPackage(),
346                            getDefaultPluginSetting(), getCompanyId(), getTimestamp(),
347                            getIcon(), getVirtualPath(), getStrutsPath(), getParentStrutsPath(),
348                            getPortletName(), getDisplayName(), getPortletClass(),
349                            getConfigurationActionClass(), getIndexerClasses(),
350                            getOpenSearchClass(), getSchedulerEntries(), getPortletURLClass(),
351                            getFriendlyURLMapperClass(), getFriendlyURLMapping(),
352                            getFriendlyURLRoutes(), getURLEncoderClass(),
353                            getPortletDataHandlerClass(),
354                            getPortletDisplayTemplateHandlerClass(),
355                            getPortletLayoutListenerClass(), getPollerProcessorClass(),
356                            getPopMessageListenerClass(), getSocialActivityInterpreterClass(),
357                            getSocialRequestInterpreterClass(), getWebDAVStorageToken(),
358                            getWebDAVStorageClass(), getXmlRpcMethodClass(),
359                            getControlPanelEntryCategory(), getControlPanelEntryWeight(),
360                            getControlPanelEntryClass(), getAssetRendererFactoryClasses(),
361                            getAtomCollectionAdapterClasses(),
362                            getCustomAttributesDisplayClasses(), getPermissionPropagatorClass(),
363                            getTrashHandlerClasses(), getWorkflowHandlerClasses(),
364                            getDefaultPreferences(), getPreferencesValidator(),
365                            isPreferencesCompanyWide(), isPreferencesUniquePerLayout(),
366                            isPreferencesOwnedByGroup(), isUseDefaultTemplate(),
367                            isShowPortletAccessDenied(), isShowPortletInactive(),
368                            isActionURLRedirect(), isRestoreCurrentView(), isMaximizeEdit(),
369                            isMaximizeHelp(), isPopUpPrint(), isLayoutCacheable(),
370                            isInstanceable(), isRemoteable(), isScopeable(),
371                            getUserPrincipalStrategy(), isPrivateRequestAttributes(),
372                            isPrivateSessionAttributes(), getAutopropagatedParameters(),
373                            getActionTimeout(), getRenderTimeout(), getRenderWeight(),
374                            isAjaxable(), getHeaderPortalCss(), getHeaderPortletCss(),
375                            getHeaderPortalJavaScript(), getHeaderPortletJavaScript(),
376                            getFooterPortalCss(), getFooterPortletCss(),
377                            getFooterPortalJavaScript(), getFooterPortletJavaScript(),
378                            getCssClassWrapper(), getFacebookIntegration(),
379                            isAddDefaultResource(), getRoles(), getUnlinkedRoles(),
380                            getRoleMappers(), isSystem(), isActive(), isInclude(),
381                            getInitParams(), getExpCache(), getPortletModes(),
382                            getWindowStates(), getSupportedLocales(), getResourceBundle(),
383                            getPortletInfo(), getPortletFilters(), getProcessingEvents(),
384                            getPublishingEvents(), getPublicRenderParameters(),
385                            getPortletApp());
386    
387                    portlet.setId(getId());
388                    portlet.setUndeployedPortlet(isUndeployedPortlet());
389    
390                    return portlet;
391            }
392    
393            /**
394             * Compares this portlet to the specified object.
395             *
396             * @param  portlet the portlet to compare this portlet against
397             * @return the value 0 if the argument portlet is equal to this portlet; a
398             *         value less than -1 if this portlet is less than the portlet
399             *         argument; and 1 if this portlet is greater than the portlet
400             *         argument
401             */
402            @Override
403            public int compareTo(Portlet portlet) {
404                    String portletId = getPortletId();
405    
406                    return portletId.compareTo(portlet.getPortletId());
407            }
408    
409            /**
410             * Checks whether this portlet is equal to the specified object.
411             *
412             * @param  obj the object to compare this portlet against
413             * @return <code>true</code> if the portlet is equal to the specified object
414             */
415            @Override
416            public boolean equals(Object obj) {
417                    Portlet portlet = (Portlet)obj;
418    
419                    String portletId = getPortletId();
420    
421                    return portletId.equals(portlet.getPortletId());
422            }
423    
424            /**
425             * Returns the action timeout of the portlet.
426             *
427             * @return the action timeout of the portlet
428             */
429            public int getActionTimeout() {
430                    return _actionTimeout;
431            }
432    
433            /**
434             * Returns <code>true</code> if an action URL for this portlet should cause
435             * an auto redirect.
436             *
437             * @return <code>true</code> if an action URL for this portlet should cause
438             *         an auto redirect
439             */
440            public boolean getActionURLRedirect() {
441                    return _actionURLRedirect;
442            }
443    
444            /**
445             * Returns <code>true</code> if default resources for the portlet are added
446             * to a page.
447             *
448             * @return <code>true</code> if default resources for the portlet are added
449             *         to a page
450             */
451            public boolean getAddDefaultResource() {
452                    return _addDefaultResource;
453            }
454    
455            /**
456             * Returns <code>true</code> if the portlet can be displayed via Ajax.
457             *
458             * @return <code>true</code> if the portlet can be displayed via Ajax
459             */
460            public boolean getAjaxable() {
461                    return _ajaxable;
462            }
463    
464            /**
465             * Returns a list of all portlet modes supported by the portlet.
466             *
467             * @return a list of all portlet modes supported by the portlet
468             */
469            public Set<String> getAllPortletModes() {
470                    Set<String> allPortletModes = new TreeSet<String>();
471    
472                    for (Map.Entry<String, Set<String>> entry : _portletModes.entrySet()) {
473                            Set<String> mimeTypePortletModes = entry.getValue();
474    
475                            for (String portletMode : mimeTypePortletModes) {
476                                    allPortletModes.add(portletMode);
477                            }
478                    }
479    
480                    return allPortletModes;
481            }
482    
483            /**
484             * Returns a list of all window states supported by the portlet.
485             *
486             * @return a list of all window states supported by the portlet
487             */
488            public Set<String> getAllWindowStates() {
489                    Set<String> allWindowStates = new TreeSet<String>();
490    
491                    for (Map.Entry<String, Set<String>> entry : _windowStates.entrySet()) {
492                            Set<String> mimeTypeWindowStates = entry.getValue();
493    
494                            for (String windowState : mimeTypeWindowStates) {
495                                    allWindowStates.add(windowState);
496                            }
497                    }
498    
499                    return allWindowStates;
500            }
501    
502            /**
503             * Returns the names of the classes that represent asset types associated
504             * with the portlet.
505             *
506             * @return the names of the classes that represent asset types associated
507             *         with the portlet
508             */
509            public List<String> getAssetRendererFactoryClasses() {
510                    return _assetRendererFactoryClasses;
511            }
512    
513            /**
514             * Returns the asset type instances of the portlet.
515             *
516             * @return the asset type instances of the portlet
517             */
518            public List<AssetRendererFactory> getAssetRendererFactoryInstances() {
519                    if (_assetRendererFactoryClasses.isEmpty()) {
520                            return null;
521                    }
522    
523                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
524    
525                    return portletBag.getAssetRendererFactoryInstances();
526            }
527    
528            /**
529             * Returns the names of the classes that represent atom collection adapters
530             * associated with the portlet.
531             *
532             * @return the names of the classes that represent atom collection adapters
533             *         associated with the portlet
534             */
535            public List<String> getAtomCollectionAdapterClasses() {
536                    return _atomCollectionAdapterClasses;
537            }
538    
539            /**
540             * Returns the atom collection adapter instances of the portlet.
541             *
542             * @return the atom collection adapter instances of the portlet
543             */
544            public List<AtomCollectionAdapter<?>> getAtomCollectionAdapterInstances() {
545                    if (_atomCollectionAdapterClasses.isEmpty()) {
546                            return null;
547                    }
548    
549                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
550    
551                    return portletBag.getAtomCollectionAdapterInstances();
552            }
553    
554            /**
555             * Returns the names of the parameters that will be automatically propagated
556             * through the portlet.
557             *
558             * @return the names of the parameters that will be automatically propagated
559             *         through the portlet
560             */
561            public Set<String> getAutopropagatedParameters() {
562                    return _autopropagatedParameters;
563            }
564    
565            /**
566             * Returns <code>true</code> if the portlet is found in a WAR file.
567             *
568             * @param  portletId the cloned instance portlet ID
569             * @return a cloned instance of the portlet
570             */
571            public Portlet getClonedInstance(String portletId) {
572                    Portlet portlet = (Portlet)clone();
573    
574                    portlet.setPortletId(portletId);
575    
576                    return portlet;
577            }
578    
579            /**
580             * Returns the configuration action class of the portlet.
581             *
582             * @return the configuration action class of the portlet
583             */
584            public String getConfigurationActionClass() {
585                    return _configurationActionClass;
586            }
587    
588            /**
589             * Returns the configuration action instance of the portlet.
590             *
591             * @return the configuration action instance of the portlet
592             */
593            public ConfigurationAction getConfigurationActionInstance() {
594                    if (Validator.isNull(getConfigurationActionClass())) {
595                            return null;
596                    }
597    
598                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
599    
600                    return portletBag.getConfigurationActionInstance();
601            }
602    
603            /**
604             * Returns the servlet context path of the portlet.
605             *
606             * @return the servlet context path of the portlet
607             */
608            public String getContextPath() {
609                    if (!_portletApp.isWARFile()) {
610                            return PortalUtil.getPathContext();
611                    }
612    
613                    String servletContextName = _portletApp.getServletContextName();
614    
615                    if (ServletContextPool.containsKey(servletContextName)) {
616                            ServletContext servletContext = ServletContextPool.get(
617                                    servletContextName);
618    
619                            return ContextPathUtil.getContextPath(servletContext);
620                    }
621    
622                    return StringPool.SLASH.concat(servletContextName);
623            }
624    
625            /**
626             * Returns the name of the category of the Control Panel where the portlet
627             * will be shown.
628             *
629             * @return the name of the category of the Control Panel where the portlet
630             *         will be shown
631             */
632            public String getControlPanelEntryCategory() {
633                    return _controlPanelEntryCategory;
634            }
635    
636            /**
637             * Returns the name of the class that will control when the portlet will be
638             * shown in the Control Panel.
639             *
640             * @return the name of the class that will control when the portlet will be
641             *         shown in the Control Panel
642             */
643            public String getControlPanelEntryClass() {
644                    return _controlPanelEntryClass;
645            }
646    
647            /**
648             * Returns an instance of the class that will control when the portlet will
649             * be shown in the Control Panel.
650             *
651             * @return the instance of the class that will control when the portlet will
652             *         be shown in the Control Panel
653             */
654            public ControlPanelEntry getControlPanelEntryInstance() {
655                    if (Validator.isNull(getControlPanelEntryClass())) {
656                            return null;
657                    }
658    
659                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
660    
661                    return portletBag.getControlPanelEntryInstance();
662            }
663    
664            /**
665             * Returns the relative weight of the portlet with respect to the other
666             * portlets in the same category of the Control Panel.
667             *
668             * @return the relative weight of the portlet with respect to the other
669             *         portlets in the same category of the Control Panel
670             */
671            public double getControlPanelEntryWeight() {
672                    return _controlPanelEntryWeight;
673            }
674    
675            /**
676             * Returns the name of the CSS class that will be injected in the DIV that
677             * wraps this portlet.
678             *
679             * @return the name of the CSS class that will be injected in the DIV that
680             *         wraps this portlet
681             */
682            public String getCssClassWrapper() {
683                    return _cssClassWrapper;
684            }
685    
686            /**
687             * Returns the names of the classes that represent custom attribute displays
688             * associated with the portlet.
689             *
690             * @return the names of the classes that represent asset types associated
691             *         with the portlet
692             */
693            public List<String> getCustomAttributesDisplayClasses() {
694                    return _customAttributesDisplayClasses;
695            }
696    
697            /**
698             * Returns the custom attribute display instances of the portlet.
699             *
700             * @return the custom attribute display instances of the portlet
701             */
702            public List<CustomAttributesDisplay> getCustomAttributesDisplayInstances() {
703                    if (_customAttributesDisplayClasses.isEmpty()) {
704                            return null;
705                    }
706    
707                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
708    
709                    return portletBag.getCustomAttributesDisplayInstances();
710            }
711    
712            /**
713             * Get the default plugin settings of the portlet.
714             *
715             * @return the plugin settings
716             */
717            public PluginSetting getDefaultPluginSetting() {
718                    return _defaultPluginSetting;
719            }
720    
721            /**
722             * Returns the default preferences of the portlet.
723             *
724             * @return the default preferences of the portlet
725             */
726            public String getDefaultPreferences() {
727                    if (Validator.isNull(_defaultPreferences)) {
728                            return PortletConstants.DEFAULT_PREFERENCES;
729                    }
730                    else {
731                            return _defaultPreferences;
732                    }
733            }
734    
735            /**
736             * Returns the display name of the portlet.
737             *
738             * @return the display name of the portlet
739             */
740            public String getDisplayName() {
741                    return _displayName;
742            }
743    
744            /**
745             * Returns expiration cache of the portlet.
746             *
747             * @return expiration cache of the portlet
748             */
749            public Integer getExpCache() {
750                    return _expCache;
751            }
752    
753            /**
754             * Returns the Facebook integration method of the portlet.
755             *
756             * @return the Facebook integration method of the portlet
757             */
758            public String getFacebookIntegration() {
759                    return _facebookIntegration;
760            }
761    
762            /**
763             * Returns a list of CSS files that will be referenced from the page's
764             * footer relative to the portal's context path.
765             *
766             * @return a list of CSS files that will be referenced from the page's
767             *         footer relative to the portal's context path
768             */
769            public List<String> getFooterPortalCss() {
770                    return _footerPortalCss;
771            }
772    
773            /**
774             * Returns a list of JavaScript files that will be referenced from the
775             * page's footer relative to the portal's context path.
776             *
777             * @return a list of JavaScript files that will be referenced from the
778             *         page's footer relative to the portal's context path
779             */
780            public List<String> getFooterPortalJavaScript() {
781                    return _footerPortalJavaScript;
782            }
783    
784            /**
785             * Returns a list of CSS files that will be referenced from the page's
786             * footer relative to the portlet's context path.
787             *
788             * @return a list of CSS files that will be referenced from the page's
789             *         footer relative to the portlet's context path
790             */
791            public List<String> getFooterPortletCss() {
792                    return _footerPortletCss;
793            }
794    
795            /**
796             * Returns a list of JavaScript files that will be referenced from the
797             * page's footer relative to the portlet's context path.
798             *
799             * @return a list of JavaScript files that will be referenced from the
800             *         page's footer relative to the portlet's context path
801             */
802            public List<String> getFooterPortletJavaScript() {
803                    return _footerPortletJavaScript;
804            }
805    
806            /**
807             * Returns the name of the friendly URL mapper class of the portlet.
808             *
809             * @return the name of the friendly URL mapper class of the portlet
810             */
811            public String getFriendlyURLMapperClass() {
812                    return _friendlyURLMapperClass;
813            }
814    
815            /**
816             * Returns the friendly URL mapper instance of the portlet.
817             *
818             * @return the friendly URL mapper instance of the portlet
819             */
820            public FriendlyURLMapper getFriendlyURLMapperInstance() {
821                    if (Validator.isNull(getFriendlyURLMapperClass())) {
822                            return null;
823                    }
824    
825                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
826    
827                    return portletBag.getFriendlyURLMapperInstance();
828            }
829    
830            /**
831             * Returns the name of the friendly URL mapping of the portlet.
832             *
833             * @return the name of the friendly URL mapping of the portlet
834             */
835            public String getFriendlyURLMapping() {
836                    return _friendlyURLMapping;
837            }
838    
839            /**
840             * Returns the class loader resource path to the friendly URL routes of the
841             * portlet.
842             *
843             * @return the class loader resource path to the friendly URL routes of the
844             *         portlet
845             */
846            public String getFriendlyURLRoutes() {
847                    return _friendlyURLRoutes;
848            }
849    
850            /**
851             * Returns a list of CSS files that will be referenced from the page's
852             * header relative to the portal's context path.
853             *
854             * @return a list of CSS files that will be referenced from the page's
855             *         header relative to the portal's context path
856             */
857            public List<String> getHeaderPortalCss() {
858                    return _headerPortalCss;
859            }
860    
861            /**
862             * Returns a list of JavaScript files that will be referenced from the
863             * page's header relative to the portal's context path.
864             *
865             * @return a list of JavaScript files that will be referenced from the
866             *         page's header relative to the portal's context path
867             */
868            public List<String> getHeaderPortalJavaScript() {
869                    return _headerPortalJavaScript;
870            }
871    
872            /**
873             * Returns a list of CSS files that will be referenced from the page's
874             * header relative to the portlet's context path.
875             *
876             * @return a list of CSS files that will be referenced from the page's
877             *         header relative to the portlet's context path
878             */
879            public List<String> getHeaderPortletCss() {
880                    return _headerPortletCss;
881            }
882    
883            /**
884             * Returns a list of JavaScript files that will be referenced from the
885             * page's header relative to the portlet's context path.
886             *
887             * @return a list of JavaScript files that will be referenced from the
888             *         page's header relative to the portlet's context path
889             */
890            public List<String> getHeaderPortletJavaScript() {
891                    return _headerPortletJavaScript;
892            }
893    
894            /**
895             * Returns the icon of the portlet.
896             *
897             * @return the icon of the portlet
898             */
899            public String getIcon() {
900                    return _icon;
901            }
902    
903            /**
904             * Returns <code>true</code> to include the portlet and make it available to
905             * be made active.
906             *
907             * @return <code>true</code> to include the portlet and make it available to
908             *         be made active
909             */
910            public boolean getInclude() {
911                    return _include;
912            }
913    
914            /**
915             * Returns the name of the classes that represent indexers associated with
916             * the portlet.
917             *
918             * @return the name of the classes that represent indexers associated with
919             *         the portlet
920             */
921            public List<String> getIndexerClasses() {
922                    return _indexerClasses;
923            }
924    
925            /**
926             * Returns the indexer instances of the portlet.
927             *
928             * @return the indexer instances of the portlet
929             */
930            public List<Indexer> getIndexerInstances() {
931                    if (_indexerClasses.isEmpty() &&
932                            !_portletClass.equals(AlloyPortlet.class.getName())) {
933    
934                            return Collections.emptyList();
935                    }
936    
937                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
938    
939                    return portletBag.getIndexerInstances();
940            }
941    
942            /**
943             * Returns the init parameters of the portlet.
944             *
945             * @return init parameters of the portlet
946             */
947            public Map<String, String> getInitParams() {
948                    return _initParams;
949            }
950    
951            /**
952             * Returns <code>true</code> if the portlet can be added multiple times to a
953             * layout.
954             *
955             * @return <code>true</code> if the portlet can be added multiple times to a
956             *         layout
957             */
958            public boolean getInstanceable() {
959                    return _instanceable;
960            }
961    
962            /**
963             * Returns the instance ID of the portlet.
964             *
965             * @return the instance ID of the portlet
966             */
967            public String getInstanceId() {
968                    return PortletConstants.getInstanceId(getPortletId());
969            }
970    
971            /**
972             * Returns <code>true</code> to allow the portlet to be cached within the
973             * layout.
974             *
975             * @return <code>true</code> if the portlet can be cached within the layout
976             */
977            public boolean getLayoutCacheable() {
978                    return _layoutCacheable;
979            }
980    
981            /**
982             * Returns <code>true</code> if the portlet goes into the maximized state
983             * when the user goes into the edit mode.
984             *
985             * @return <code>true</code> if the portlet goes into the maximized state
986             *         when the user goes into the edit mode
987             */
988            public boolean getMaximizeEdit() {
989                    return _maximizeEdit;
990            }
991    
992            /**
993             * Returns <code>true</code> if the portlet goes into the maximized state
994             * when the user goes into the help mode.
995             *
996             * @return <code>true</code> if the portlet goes into the maximized state
997             *         when the user goes into the help mode
998             */
999            public boolean getMaximizeHelp() {
1000                    return _maximizeHelp;
1001            }
1002    
1003            /**
1004             * Returns the name of the open search class of the portlet.
1005             *
1006             * @return the name of the open search class of the portlet
1007             */
1008            public String getOpenSearchClass() {
1009                    return _openSearchClass;
1010            }
1011    
1012            /**
1013             * Returns the indexer instance of the portlet.
1014             *
1015             * @return the indexer instance of the portlet
1016             */
1017            public OpenSearch getOpenSearchInstance() {
1018                    if (Validator.isNull(getOpenSearchClass())) {
1019                            return null;
1020                    }
1021    
1022                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1023    
1024                    return portletBag.getOpenSearchInstance();
1025            }
1026    
1027            /**
1028             * Returns the parent struts path of the portlet.
1029             *
1030             * @return the parent struts path of the portlet.
1031             */
1032            public String getParentStrutsPath() {
1033                    return _parentStrutsPath;
1034            }
1035    
1036            /**
1037             * Returns the name of the permission propagator class of the portlet.
1038             *
1039             * @return the name of the permission propagator class of the portlet
1040             */
1041            public String getPermissionPropagatorClass() {
1042                    return _permissionPropagatorClass;
1043            }
1044    
1045            /**
1046             * Returns the permission propagator instance of the portlet.
1047             *
1048             * @return the permission propagator instance of the portlet
1049             */
1050            public PermissionPropagator getPermissionPropagatorInstance() {
1051                    if (Validator.isNull(getPermissionPropagatorClass())) {
1052                            return null;
1053                    }
1054    
1055                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1056    
1057                    return portletBag.getPermissionPropagatorInstance();
1058            }
1059    
1060            /**
1061             * Returns the plugin ID of the portlet.
1062             *
1063             * @return the plugin ID of the portlet
1064             */
1065            public String getPluginId() {
1066                    return getRootPortletId();
1067            }
1068    
1069            /**
1070             * Returns this portlet's plugin package.
1071             *
1072             * @return this portlet's plugin package
1073             */
1074            public PluginPackage getPluginPackage() {
1075                    return _pluginPackage;
1076            }
1077    
1078            /**
1079             * Returns the plugin type of the portlet.
1080             *
1081             * @return the plugin type of the portlet
1082             */
1083            public String getPluginType() {
1084                    return Plugin.TYPE_PORTLET;
1085            }
1086    
1087            /**
1088             * Returns the name of the poller processor class of the portlet.
1089             *
1090             * @return the name of the poller processor class of the portlet
1091             */
1092            public String getPollerProcessorClass() {
1093                    return _pollerProcessorClass;
1094            }
1095    
1096            /**
1097             * Returns the poller processor instance of the portlet.
1098             *
1099             * @return the poller processor instance of the portlet
1100             */
1101            public PollerProcessor getPollerProcessorInstance() {
1102                    if (Validator.isNull(getPollerProcessorClass())) {
1103                            return null;
1104                    }
1105    
1106                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1107    
1108                    return portletBag.getPollerProcessorInstance();
1109            }
1110    
1111            /**
1112             * Returns the name of the POP message listener class of the portlet.
1113             *
1114             * @return the name of the POP message listener class of the portlet
1115             */
1116            public String getPopMessageListenerClass() {
1117                    return _popMessageListenerClass;
1118            }
1119    
1120            /**
1121             * Returns the POP message listener instance of the portlet.
1122             *
1123             * @return the POP message listener instance of the portlet
1124             */
1125            public MessageListener getPopMessageListenerInstance() {
1126                    if (Validator.isNull(getPopMessageListenerClass())) {
1127                            return null;
1128                    }
1129    
1130                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1131    
1132                    return portletBag.getPopMessageListenerInstance();
1133            }
1134    
1135            /**
1136             * Returns <code>true</code> if the portlet goes into the pop up state when
1137             * the user goes into the print mode.
1138             *
1139             * @return <code>true</code> if the portlet goes into the pop up state when
1140             *         the user goes into the print mode
1141             */
1142            public boolean getPopUpPrint() {
1143                    return _popUpPrint;
1144            }
1145    
1146            /**
1147             * Returns this portlet's application.
1148             *
1149             * @return this portlet's application
1150             */
1151            public PortletApp getPortletApp() {
1152                    return _portletApp;
1153            }
1154    
1155            /**
1156             * Returns the name of the portlet class of the portlet.
1157             *
1158             * @return the name of the portlet class of the portlet
1159             */
1160            public String getPortletClass() {
1161                    return _portletClass;
1162            }
1163    
1164            /**
1165             * Returns the name of the portlet data handler class of the portlet.
1166             *
1167             * @return the name of the portlet data handler class of the portlet
1168             */
1169            public String getPortletDataHandlerClass() {
1170                    return _portletDataHandlerClass;
1171            }
1172    
1173            /**
1174             * Returns the portlet data handler instance of the portlet.
1175             *
1176             * @return the portlet data handler instance of the portlet
1177             */
1178            public PortletDataHandler getPortletDataHandlerInstance() {
1179                    if (Validator.isNull(getPortletDataHandlerClass())) {
1180                            return null;
1181                    }
1182    
1183                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1184    
1185                    return portletBag.getPortletDataHandlerInstance();
1186            }
1187    
1188            /**
1189             * Returns the name of the portlet display style class of the portlet.
1190             *
1191             * @return the name of the portlet display style class of the portlet
1192             */
1193            public String getPortletDisplayTemplateHandlerClass() {
1194                    return _portletDisplayTemplateHandlerClass;
1195            }
1196    
1197            /**
1198             * Returns the portlet display style instance of the portlet.
1199             *
1200             * @return the portlet display style instance of the portlet
1201             */
1202            public PortletDisplayTemplateHandler
1203                    getPortletDisplayTemplateHandlerInstance() {
1204    
1205                    if (Validator.isNull(getPortletDisplayTemplateHandlerClass())) {
1206                            return null;
1207                    }
1208    
1209                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1210    
1211                    return portletBag.getPortletDisplayTemplateHandlerInstance();
1212            }
1213    
1214            /**
1215             * Returns the filters of the portlet.
1216             *
1217             * @return filters of the portlet
1218             */
1219            public Map<String, PortletFilter> getPortletFilters() {
1220                    return _portletFilters;
1221            }
1222    
1223            /**
1224             * Returns the portlet info of the portlet.
1225             *
1226             * @return portlet info of the portlet
1227             */
1228            public PortletInfo getPortletInfo() {
1229                    return _portletInfo;
1230            }
1231    
1232            /**
1233             * Returns the name of the portlet layout listener class of the portlet.
1234             *
1235             * @return the name of the portlet layout listener class of the portlet
1236             */
1237            public String getPortletLayoutListenerClass() {
1238                    return _portletLayoutListenerClass;
1239            }
1240    
1241            /**
1242             * Returns the portlet layout listener instance of the portlet.
1243             *
1244             * @return the portlet layout listener instance of the portlet
1245             */
1246            public PortletLayoutListener getPortletLayoutListenerInstance() {
1247                    if (Validator.isNull(getPortletLayoutListenerClass())) {
1248                            return null;
1249                    }
1250    
1251                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1252    
1253                    return portletBag.getPortletLayoutListenerInstance();
1254            }
1255    
1256            /**
1257             * Returns the portlet modes of the portlet.
1258             *
1259             * @return portlet modes of the portlet
1260             */
1261            public Map<String, Set<String>> getPortletModes() {
1262                    return _portletModes;
1263            }
1264    
1265            /**
1266             * Returns the name of the portlet.
1267             *
1268             * @return the display name of the portlet
1269             */
1270            public String getPortletName() {
1271                    return _portletName;
1272            }
1273    
1274            /**
1275             * Returns the name of the portlet URL class of the portlet.
1276             *
1277             * @return the name of the portlet URL class of the portlet
1278             */
1279            public String getPortletURLClass() {
1280                    return _portletURLClass;
1281            }
1282    
1283            /**
1284             * Returns <code>true</code> if preferences are shared across the entire
1285             * company.
1286             *
1287             * @return <code>true</code> if preferences are shared across the entire
1288             *         company
1289             */
1290            public boolean getPreferencesCompanyWide() {
1291                    return _preferencesCompanyWide;
1292            }
1293    
1294            /**
1295             * Returns <code>true</code> if preferences are owned by the group when the
1296             * portlet is shown in a group layout. Returns <code>false</code> if
1297             * preferences are owned by the user at all times.
1298             *
1299             * @return <code>true</code> if preferences are owned by the group when the
1300             *         portlet is shown in a group layout; <code>false</code> if
1301             *         preferences are owned by the user at all times.
1302             */
1303            public boolean getPreferencesOwnedByGroup() {
1304                    return _preferencesOwnedByGroup;
1305            }
1306    
1307            /**
1308             * Returns <code>true</code> if preferences are unique per layout.
1309             *
1310             * @return <code>true</code> if preferences are unique per layout
1311             */
1312            public boolean getPreferencesUniquePerLayout() {
1313                    return _preferencesUniquePerLayout;
1314            }
1315    
1316            /**
1317             * Returns the name of the preferences validator class of the portlet.
1318             *
1319             * @return the name of the preferences validator class of the portlet
1320             */
1321            public String getPreferencesValidator() {
1322                    return _preferencesValidator;
1323            }
1324    
1325            /**
1326             * Returns <code>true</code> if the portlet does not share request
1327             * attributes with the portal or portlets from another WAR.
1328             *
1329             * @return <code>true</code> if the portlet does not share request
1330             *         attributes with the portal or portlets from another WAR
1331             */
1332            public boolean getPrivateRequestAttributes() {
1333                    return _privateRequestAttributes;
1334            }
1335    
1336            /**
1337             * Returns <code>true</code> if the portlet does not share session
1338             * attributes with the portal.
1339             *
1340             * @return <code>true</code> if the portlet does not share session
1341             *         attributes with the portal
1342             */
1343            public boolean getPrivateSessionAttributes() {
1344                    return _privateSessionAttributes;
1345            }
1346    
1347            /**
1348             * Returns the supported processing event from a namespace URI and a local
1349             * part.
1350             *
1351             * @param  uri the namespace URI
1352             * @param  localPart the local part
1353             * @return the supported processing event from a namespace URI and a local
1354             *         part
1355             */
1356            public QName getProcessingEvent(String uri, String localPart) {
1357                    return _processingEventsByQName.get(
1358                            PortletQNameUtil.getKey(uri, localPart));
1359            }
1360    
1361            /**
1362             * Returns the supported processing events of the portlet.
1363             *
1364             * @return supported processing events of the portlet
1365             */
1366            public Set<QName> getProcessingEvents() {
1367                    return _processingEvents;
1368            }
1369    
1370            /**
1371             * Returns the supported public render parameter from an identifier.
1372             *
1373             * @param  identifier the identifier
1374             * @return the supported public render parameter from an identifier
1375             */
1376            public PublicRenderParameter getPublicRenderParameter(String identifier) {
1377                    return _publicRenderParametersByIdentifier.get(identifier);
1378            }
1379    
1380            /**
1381             * Returns the supported public render parameter from a namespace URI and a
1382             * local part.
1383             *
1384             * @param  uri the namespace URI
1385             * @param  localPart the local part
1386             * @return the supported public render parameter from a namespace URI and a
1387             *         local part
1388             */
1389            public PublicRenderParameter getPublicRenderParameter(
1390                    String uri, String localPart) {
1391    
1392                    return _publicRenderParametersByQName.get(
1393                            PortletQNameUtil.getKey(uri, localPart));
1394            }
1395    
1396            /**
1397             * Returns the supported public render parameters of the portlet.
1398             *
1399             * @return the supported public render parameters of the portlet
1400             */
1401            public Set<PublicRenderParameter> getPublicRenderParameters() {
1402                    return _publicRenderParameters;
1403            }
1404    
1405            /**
1406             * Returns the supported publishing events of the portlet.
1407             *
1408             * @return supported publishing events of the portlet
1409             */
1410            public Set<QName> getPublishingEvents() {
1411                    return _publishingEvents;
1412            }
1413    
1414            /**
1415             * Returns <code>true</code> if the portlet is ready to be used.
1416             *
1417             * @return <code>true</code> if the portlet is ready to be used
1418             */
1419            public boolean getReady() {
1420                    return isReady();
1421            }
1422    
1423            /**
1424             * Returns <code>true</code> if the portlet supports remoting.
1425             *
1426             * @return <code>true</code> if the portlet supports remoting
1427             */
1428            public boolean getRemoteable() {
1429                    return _remoteable;
1430            }
1431    
1432            /**
1433             * Returns the render timeout of the portlet.
1434             *
1435             * @return the render timeout of the portlet
1436             */
1437            public int getRenderTimeout() {
1438                    return _renderTimeout;
1439            }
1440    
1441            /**
1442             * Returns the render weight of the portlet.
1443             *
1444             * @return the render weight of the portlet
1445             */
1446            public int getRenderWeight() {
1447                    return _renderWeight;
1448            }
1449    
1450            /**
1451             * Returns the resource bundle of the portlet.
1452             *
1453             * @return resource bundle of the portlet
1454             */
1455            public String getResourceBundle() {
1456                    return _resourceBundle;
1457            }
1458    
1459            /**
1460             * Returns <code>true</code> if the portlet restores to the current view
1461             * from the maximized state.
1462             *
1463             * @return <code>true</code> if the portlet restores to the current view
1464             *         from the maximized state
1465             */
1466            public boolean getRestoreCurrentView() {
1467                    return _restoreCurrentView;
1468            }
1469    
1470            /**
1471             * Returns the role mappers of the portlet.
1472             *
1473             * @return role mappers of the portlet
1474             */
1475            public Map<String, String> getRoleMappers() {
1476                    return _roleMappers;
1477            }
1478    
1479            /**
1480             * Returns an array of required roles of the portlet.
1481             *
1482             * @return an array of required roles of the portlet
1483             */
1484            public String[] getRolesArray() {
1485                    return _rolesArray;
1486            }
1487    
1488            /**
1489             * Returns the root portlet of this portlet instance.
1490             *
1491             * @return the root portlet of this portlet instance
1492             */
1493            public Portlet getRootPortlet() {
1494                    return _rootPortlet;
1495            }
1496    
1497            /**
1498             * Returns the root portlet ID of the portlet.
1499             *
1500             * @return the root portlet ID of the portlet
1501             */
1502            public String getRootPortletId() {
1503                    return PortletConstants.getRootPortletId(getPortletId());
1504            }
1505    
1506            /**
1507             * Returns the scheduler entries of the portlet.
1508             *
1509             * @return the scheduler entries of the portlet
1510             */
1511            public List<SchedulerEntry> getSchedulerEntries() {
1512                    return _schedulerEntries;
1513            }
1514    
1515            /**
1516             * Returns <code>true</code> if the portlet supports scoping of data.
1517             *
1518             * @return <code>true</code> if the portlet supports scoping of data
1519             */
1520            public boolean getScopeable() {
1521                    return _scopeable;
1522            }
1523    
1524            /**
1525             * Returns <code>true</code> if users are shown that they do not have access
1526             * to the portlet.
1527             *
1528             * @return <code>true</code> if users are shown that they do not have access
1529             *         to the portlet
1530             */
1531            public boolean getShowPortletAccessDenied() {
1532                    return _showPortletAccessDenied;
1533            }
1534    
1535            /**
1536             * Returns <code>true</code> if users are shown that the portlet is
1537             * inactive.
1538             *
1539             * @return <code>true</code> if users are shown that the portlet is inactive
1540             */
1541            public boolean getShowPortletInactive() {
1542                    return _showPortletInactive;
1543            }
1544    
1545            /**
1546             * Returns the name of the social activity interpreter class of the portlet.
1547             *
1548             * @return the name of the social activity interpreter class of the portlet
1549             */
1550            public String getSocialActivityInterpreterClass() {
1551                    return _socialActivityInterpreterClass;
1552            }
1553    
1554            /**
1555             * Returns the name of the social activity interpreter instance of the
1556             * portlet.
1557             *
1558             * @return the name of the social activity interpreter instance of the
1559             *         portlet
1560             */
1561            public SocialActivityInterpreter getSocialActivityInterpreterInstance() {
1562                    if (Validator.isNull(getSocialActivityInterpreterClass())) {
1563                            return null;
1564                    }
1565    
1566                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1567    
1568                    return portletBag.getSocialActivityInterpreterInstance();
1569            }
1570    
1571            /**
1572             * Returns the name of the social request interpreter class of the portlet.
1573             *
1574             * @return the name of the social request interpreter class of the portlet
1575             */
1576            public String getSocialRequestInterpreterClass() {
1577                    return _socialRequestInterpreterClass;
1578            }
1579    
1580            /**
1581             * Returns the name of the social request interpreter instance of the
1582             * portlet.
1583             *
1584             * @return the name of the social request interpreter instance of the
1585             *         portlet
1586             */
1587            public SocialRequestInterpreter getSocialRequestInterpreterInstance() {
1588                    if (Validator.isNull(getSocialRequestInterpreterClass())) {
1589                            return null;
1590                    }
1591    
1592                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1593    
1594                    return portletBag.getSocialRequestInterpreterInstance();
1595            }
1596    
1597            /**
1598             * Returns <code>true</code> if the portlet is a static portlet that is
1599             * cannot be moved.
1600             *
1601             * @return <code>true</code> if the portlet is a static portlet that is
1602             *         cannot be moved
1603             */
1604            public boolean getStatic() {
1605                    return _staticPortlet;
1606            }
1607    
1608            /**
1609             * Returns <code>true</code> if the portlet is a static portlet at the end
1610             * of a list of portlets.
1611             *
1612             * @return <code>true</code> if the portlet is a static portlet at the end
1613             *         of a list of portlets
1614             */
1615            public boolean getStaticEnd() {
1616                    return !_staticPortletStart;
1617            }
1618    
1619            /**
1620             * Returns the path for static resources served by this portlet.
1621             *
1622             * @return the path for static resources served by this portlet
1623             */
1624            public String getStaticResourcePath() {
1625                    String proxyPath = PortalUtil.getPathProxy();
1626    
1627                    String virtualPath = getVirtualPath();
1628    
1629                    if (Validator.isNotNull(virtualPath)) {
1630                            return proxyPath.concat(virtualPath);
1631                    }
1632    
1633                    String contextPath = getContextPath();
1634    
1635                    if (!_portletApp.isWARFile()) {
1636                            return contextPath;
1637                    }
1638    
1639                    return proxyPath.concat(contextPath);
1640            }
1641    
1642            /**
1643             * Returns <code>true</code> if the portlet is a static portlet at the start
1644             * of a list of portlets.
1645             *
1646             * @return <code>true</code> if the portlet is a static portlet at the start
1647             *         of a list of portlets
1648             */
1649            public boolean getStaticStart() {
1650                    return _staticPortletStart;
1651            }
1652    
1653            /**
1654             * Returns the struts path of the portlet.
1655             *
1656             * @return the struts path of the portlet
1657             */
1658            public String getStrutsPath() {
1659                    return _strutsPath;
1660            }
1661    
1662            /**
1663             * Returns the supported locales of the portlet.
1664             *
1665             * @return supported locales of the portlet
1666             */
1667            public Set<String> getSupportedLocales() {
1668                    return _supportedLocales;
1669            }
1670    
1671            /**
1672             * Returns <code>true</code> if the portlet is a system portlet that a user
1673             * cannot manually add to their page.
1674             *
1675             * @return <code>true</code> if the portlet is a system portlet that a user
1676             *         cannot manually add to their page
1677             */
1678            public boolean getSystem() {
1679                    return _system;
1680            }
1681    
1682            /**
1683             * Returns the timestamp of the portlet.
1684             *
1685             * @return the timestamp of the portlet
1686             */
1687            public long getTimestamp() {
1688                    return _timestamp;
1689            }
1690    
1691            /**
1692             * Returns the names of the classes that represent trash handlers associated
1693             * with the portlet.
1694             *
1695             * @return the names of the classes that represent trash handlers associated
1696             *         with the portlet
1697             */
1698            public List<String> getTrashHandlerClasses() {
1699                    return _trashHandlerClasses;
1700            }
1701    
1702            /**
1703             * Returns the trash handler instances of the portlet.
1704             *
1705             * @return the trash handler instances of the portlet
1706             */
1707            public List<TrashHandler> getTrashHandlerInstances() {
1708                    if (_trashHandlerClasses.isEmpty()) {
1709                            return null;
1710                    }
1711    
1712                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1713    
1714                    return portletBag.getTrashHandlerInstances();
1715            }
1716    
1717            /**
1718             * Returns <code>true</code> if the portlet is an undeployed portlet.
1719             *
1720             * @return <code>true</code> if the portlet is a placeholder of an
1721             *         undeployed portlet
1722             */
1723            public boolean getUndeployedPortlet() {
1724                    return _undeployedPortlet;
1725            }
1726    
1727            /**
1728             * Returns the unlinked roles of the portlet.
1729             *
1730             * @return unlinked roles of the portlet
1731             */
1732            public Set<String> getUnlinkedRoles() {
1733                    return _unlinkedRoles;
1734            }
1735    
1736            /**
1737             * Returns the name of the URL encoder class of the portlet.
1738             *
1739             * @return the name of the URL encoder class of the portlet
1740             */
1741            public String getURLEncoderClass() {
1742                    return _urlEncoderClass;
1743            }
1744    
1745            /**
1746             * Returns the URL encoder instance of the portlet.
1747             *
1748             * @return the URL encoder instance of the portlet
1749             */
1750            public URLEncoder getURLEncoderInstance() {
1751                    if (Validator.isNull(getURLEncoderClass())) {
1752                            return null;
1753                    }
1754    
1755                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1756    
1757                    return portletBag.getURLEncoderInstance();
1758            }
1759    
1760            /**
1761             * Returns <code>true</code> if the portlet uses the default template.
1762             *
1763             * @return <code>true</code> if the portlet uses the default template
1764             */
1765            public boolean getUseDefaultTemplate() {
1766                    return _useDefaultTemplate;
1767            }
1768    
1769            /**
1770             * Returns the user ID of the portlet. This only applies when the portlet is
1771             * added by a user in a customizable layout.
1772             *
1773             * @return the user ID of the portlet
1774             */
1775            public long getUserId() {
1776                    return PortletConstants.getUserId(getPortletId());
1777            }
1778    
1779            /**
1780             * Returns the user principal strategy of the portlet.
1781             *
1782             * @return the user principal strategy of the portlet
1783             */
1784            public String getUserPrincipalStrategy() {
1785                    return _userPrincipalStrategy;
1786            }
1787    
1788            /**
1789             * Returns the virtual path of the portlet.
1790             *
1791             * @return the virtual path of the portlet
1792             */
1793            public String getVirtualPath() {
1794                    return _virtualPath;
1795            }
1796    
1797            /**
1798             * Returns the name of the WebDAV storage class of the portlet.
1799             *
1800             * @return the name of the WebDAV storage class of the portlet
1801             */
1802            public String getWebDAVStorageClass() {
1803                    return _webDAVStorageClass;
1804            }
1805    
1806            /**
1807             * Returns the name of the WebDAV storage instance of the portlet.
1808             *
1809             * @return the name of the WebDAV storage instance of the portlet
1810             */
1811            public WebDAVStorage getWebDAVStorageInstance() {
1812                    if (Validator.isNull(getWebDAVStorageClass())) {
1813                            return null;
1814                    }
1815    
1816                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1817    
1818                    return portletBag.getWebDAVStorageInstance();
1819            }
1820    
1821            /**
1822             * Returns the name of the WebDAV storage token of the portlet.
1823             *
1824             * @return the name of the WebDAV storage token of the portlet
1825             */
1826            public String getWebDAVStorageToken() {
1827                    return _webDAVStorageToken;
1828            }
1829    
1830            /**
1831             * Returns the window states of the portlet.
1832             *
1833             * @return window states of the portlet
1834             */
1835            public Map<String, Set<String>> getWindowStates() {
1836                    return _windowStates;
1837            }
1838    
1839            /**
1840             * Returns the names of the classes that represent workflow handlers
1841             * associated with the portlet.
1842             *
1843             * @return the names of the classes that represent workflow handlers
1844             *         associated with the portlet
1845             */
1846            public List<String> getWorkflowHandlerClasses() {
1847                    return _workflowHandlerClasses;
1848            }
1849    
1850            /**
1851             * Returns the workflow handler instances of the portlet.
1852             *
1853             * @return the workflow handler instances of the portlet
1854             */
1855            public List<WorkflowHandler> getWorkflowHandlerInstances() {
1856                    if (_workflowHandlerClasses.isEmpty()) {
1857                            return null;
1858                    }
1859    
1860                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1861    
1862                    return portletBag.getWorkflowHandlerInstances();
1863            }
1864    
1865            /**
1866             * Returns the name of the XML-RPC method class of the portlet.
1867             *
1868             * @return the name of the XML-RPC method class of the portlet
1869             */
1870            public String getXmlRpcMethodClass() {
1871                    return _xmlRpcMethodClass;
1872            }
1873    
1874            /**
1875             * Returns the name of the XML-RPC method instance of the portlet.
1876             *
1877             * @return the name of the XML-RPC method instance of the portlet
1878             */
1879            public Method getXmlRpcMethodInstance() {
1880                    if (Validator.isNull(getXmlRpcMethodClass())) {
1881                            return null;
1882                    }
1883    
1884                    PortletBag portletBag = PortletBagPool.get(getRootPortletId());
1885    
1886                    return portletBag.getXmlRpcMethodInstance();
1887            }
1888    
1889            /**
1890             * Returns <code>true</code> if the user has the permission to add the
1891             * portlet to a layout.
1892             *
1893             * @param  userId the primary key of the user
1894             * @return <code>true</code> if the user has the permission to add the
1895             *         portlet to a layout
1896             */
1897            public boolean hasAddPortletPermission(long userId) {
1898                    PermissionChecker permissionChecker =
1899                            PermissionThreadLocal.getPermissionChecker();
1900    
1901                    try {
1902                            if ((permissionChecker == null) ||
1903                                    (permissionChecker.getUserId() != userId)) {
1904    
1905                                    User user = UserLocalServiceUtil.getUser(userId);
1906    
1907                                    permissionChecker = PermissionCheckerFactoryUtil.create(user);
1908                            }
1909    
1910                            if (PortletPermissionUtil.contains(
1911                                            permissionChecker, getRootPortletId(),
1912                                            ActionKeys.ADD_TO_PAGE)) {
1913    
1914                                    return true;
1915                            }
1916                    }
1917                    catch (Exception e) {
1918                            _log.error(e, e);
1919                    }
1920    
1921                    return false;
1922            }
1923    
1924            /**
1925             * Returns <code>true</code> if the portlet supports more than one mime
1926             * type.
1927             *
1928             * @return <code>true</code> if the portlet supports more than one mime type
1929             */
1930            public boolean hasMultipleMimeTypes() {
1931                    if (_portletModes.size() > 1) {
1932                            return true;
1933                    }
1934                    else {
1935                            return false;
1936                    }
1937            }
1938    
1939            /**
1940             * Returns <code>true</code> if the portlet supports the specified mime type
1941             * and portlet mode.
1942             *
1943             * @param  mimeType the mime type
1944             * @param  portletMode the portlet mode
1945             * @return <code>true</code> if the portlet supports the specified mime type
1946             *         and portlet mode
1947             */
1948            public boolean hasPortletMode(String mimeType, PortletMode portletMode) {
1949                    if (mimeType == null) {
1950                            mimeType = ContentTypes.TEXT_HTML;
1951                    }
1952    
1953                    Set<String> mimeTypePortletModes = _portletModes.get(mimeType);
1954    
1955                    if (mimeTypePortletModes == null) {
1956                            return false;
1957                    }
1958    
1959                    if (mimeTypePortletModes.contains(portletMode.toString())) {
1960                            return true;
1961                    }
1962                    else {
1963                            return false;
1964                    }
1965            }
1966    
1967            /**
1968             * Returns <code>true</code> if the portlet has a role with the specified
1969             * name.
1970             *
1971             * @param  roleName the role name
1972             * @return <code>true</code> if the portlet has a role with the specified
1973             *         name
1974             */
1975            public boolean hasRoleWithName(String roleName) {
1976                    if ((_rolesArray == null) || (_rolesArray.length == 0)) {
1977                            return false;
1978                    }
1979    
1980                    for (int i = 0; i < _rolesArray.length; i++) {
1981                            if (_rolesArray[i].equalsIgnoreCase(roleName)) {
1982                                    return true;
1983                            }
1984                    }
1985    
1986                    return false;
1987            }
1988    
1989            /**
1990             * Returns <code>true</code> if the portlet supports the specified mime type
1991             * and window state.
1992             *
1993             * @param  mimeType the mime type
1994             * @param  windowState the window state
1995             * @return <code>true</code> if the portlet supports the specified mime type
1996             *         and window state
1997             */
1998            public boolean hasWindowState(String mimeType, WindowState windowState) {
1999                    if (mimeType == null) {
2000                            mimeType = ContentTypes.TEXT_HTML;
2001                    }
2002    
2003                    Set<String> mimeTypeWindowStates = _windowStates.get(mimeType);
2004    
2005                    if (mimeTypeWindowStates == null) {
2006                            return false;
2007                    }
2008    
2009                    if (mimeTypeWindowStates.contains(windowState.toString())) {
2010                            return true;
2011                    }
2012                    else {
2013                            return false;
2014                    }
2015            }
2016    
2017            /**
2018             * Returns <code>true</code> if an action URL for this portlet should cause
2019             * an auto redirect.
2020             *
2021             * @return <code>true</code> if an action URL for this portlet should cause
2022             *         an auto redirect
2023             */
2024            public boolean isActionURLRedirect() {
2025                    return _actionURLRedirect;
2026            }
2027    
2028            /**
2029             * Returns <code>true</code> if default resources for the portlet are added
2030             * to a page.
2031             *
2032             * @return <code>true</code> if default resources for the portlet are added
2033             *         to a page
2034             */
2035            public boolean isAddDefaultResource() {
2036                    return _addDefaultResource;
2037            }
2038    
2039            /**
2040             * Returns <code>true</code> if the portlet can be displayed via Ajax.
2041             *
2042             * @return <code>true</code> if the portlet can be displayed via Ajax
2043             */
2044            public boolean isAjaxable() {
2045                    return _ajaxable;
2046            }
2047    
2048            /**
2049             * Returns <code>true</code> to include the portlet and make it available to
2050             * be made active.
2051             *
2052             * @return <code>true</code> to include the portlet and make it available to
2053             *         be made active
2054             */
2055            public boolean isInclude() {
2056                    return _include;
2057            }
2058    
2059            /**
2060             * Returns <code>true</code> if the portlet can be added multiple times to a
2061             * layout.
2062             *
2063             * @return <code>true</code> if the portlet can be added multiple times to a
2064             *         layout
2065             */
2066            public boolean isInstanceable() {
2067                    return _instanceable;
2068            }
2069    
2070            /**
2071             * Returns <code>true</code> to allow the portlet to be cached within the
2072             * layout.
2073             *
2074             * @return <code>true</code> if the portlet can be cached within the layout
2075             */
2076            public boolean isLayoutCacheable() {
2077                    return _layoutCacheable;
2078            }
2079    
2080            /**
2081             * Returns <code>true</code> if the portlet goes into the maximized state
2082             * when the user goes into the edit mode.
2083             *
2084             * @return <code>true</code> if the portlet goes into the maximized state
2085             *         when the user goes into the edit mode
2086             */
2087            public boolean isMaximizeEdit() {
2088                    return _maximizeEdit;
2089            }
2090    
2091            /**
2092             * Returns <code>true</code> if the portlet goes into the maximized state
2093             * when the user goes into the help mode.
2094             *
2095             * @return <code>true</code> if the portlet goes into the maximized state
2096             *         when the user goes into the help mode
2097             */
2098            public boolean isMaximizeHelp() {
2099                    return _maximizeHelp;
2100            }
2101    
2102            /**
2103             * Returns <code>true</code> if the portlet goes into the pop up state when
2104             * the user goes into the print mode.
2105             *
2106             * @return <code>true</code> if the portlet goes into the pop up state when
2107             *         the user goes into the print mode
2108             */
2109            public boolean isPopUpPrint() {
2110                    return _popUpPrint;
2111            }
2112    
2113            /**
2114             * Returns <code>true</code> if preferences are shared across the entire
2115             * company.
2116             *
2117             * @return <code>true</code> if preferences are shared across the entire
2118             *         company
2119             */
2120            public boolean isPreferencesCompanyWide() {
2121                    return _preferencesCompanyWide;
2122            }
2123    
2124            /**
2125             * Returns <code>true</code> if preferences are owned by the group when the
2126             * portlet is shown in a group layout. Returns <code>false</code> if
2127             * preferences are owned by the user at all times.
2128             *
2129             * @return <code>true</code> if preferences are owned by the group when the
2130             *         portlet is shown in a group layout; <code>false</code> if
2131             *         preferences are owned by the user at all times.
2132             */
2133            public boolean isPreferencesOwnedByGroup() {
2134                    return _preferencesOwnedByGroup;
2135            }
2136    
2137            /**
2138             * Returns <code>true</code> if preferences are unique per layout.
2139             *
2140             * @return <code>true</code> if preferences are unique per layout
2141             */
2142            public boolean isPreferencesUniquePerLayout() {
2143                    return _preferencesUniquePerLayout;
2144            }
2145    
2146            /**
2147             * Returns <code>true</code> if the portlet does not share request
2148             * attributes with the portal or portlets from another WAR.
2149             *
2150             * @return <code>true</code> if the portlet does not share request
2151             *         attributes with the portal or portlets from another WAR
2152             */
2153            public boolean isPrivateRequestAttributes() {
2154                    return _privateRequestAttributes;
2155            }
2156    
2157            /**
2158             * Returns <code>true</code> if the portlet does not share session
2159             * attributes with the portal.
2160             *
2161             * @return <code>true</code> if the portlet does not share session
2162             *         attributes with the portal
2163             */
2164            public boolean isPrivateSessionAttributes() {
2165                    return _privateSessionAttributes;
2166            }
2167    
2168            /**
2169             * Returns <code>true</code> if the portlet is ready to be used.
2170             *
2171             * @return <code>true</code> if the portlet is ready to be used
2172             */
2173            public boolean isReady() {
2174                    Boolean ready = _readyMap.get(getRootPortletId());
2175    
2176                    if (ready == null) {
2177                            return true;
2178                    }
2179                    else {
2180                            return ready;
2181                    }
2182            }
2183    
2184            /**
2185             * Returns <code>true</code> if the portlet supports remoting.
2186             *
2187             * @return <code>true</code> if the portlet supports remoting
2188             */
2189            public boolean isRemoteable() {
2190                    return _remoteable;
2191            }
2192    
2193            /**
2194             * Returns <code>true</code> if the portlet restores to the current view
2195             * from the maximized state.
2196             *
2197             * @return <code>true</code> if the portlet restores to the current view
2198             *         from the maximized state
2199             */
2200            public boolean isRestoreCurrentView() {
2201                    return _restoreCurrentView;
2202            }
2203    
2204            /**
2205             * Returns <code>true</code> if the portlet supports scoping of data.
2206             *
2207             * @return <code>true</code> if the portlet supports scoping of data
2208             */
2209            public boolean isScopeable() {
2210                    return _scopeable;
2211            }
2212    
2213            /**
2214             * Returns <code>true</code> if users are shown that they do not have access
2215             * to the portlet.
2216             *
2217             * @return <code>true</code> if users are shown that they do not have access
2218             *         to the portlet
2219             */
2220            public boolean isShowPortletAccessDenied() {
2221                    return _showPortletAccessDenied;
2222            }
2223    
2224            /**
2225             * Returns <code>true</code> if users are shown that the portlet is
2226             * inactive.
2227             *
2228             * @return <code>true</code> if users are shown that the portlet is inactive
2229             */
2230            public boolean isShowPortletInactive() {
2231                    return _showPortletInactive;
2232            }
2233    
2234            /**
2235             * Returns <code>true</code> if the portlet is a static portlet that is
2236             * cannot be moved.
2237             *
2238             * @return <code>true</code> if the portlet is a static portlet that is
2239             *         cannot be moved
2240             */
2241            public boolean isStatic() {
2242                    return _staticPortlet;
2243            }
2244    
2245            /**
2246             * Returns <code>true</code> if the portlet is a static portlet at the end
2247             * of a list of portlets.
2248             *
2249             * @return <code>true</code> if the portlet is a static portlet at the end
2250             *         of a list of portlets
2251             */
2252            public boolean isStaticEnd() {
2253                    return !_staticPortletStart;
2254            }
2255    
2256            /**
2257             * Returns <code>true</code> if the portlet is a static portlet at the start
2258             * of a list of portlets.
2259             *
2260             * @return <code>true</code> if the portlet is a static portlet at the start
2261             *         of a list of portlets
2262             */
2263            public boolean isStaticStart() {
2264                    return _staticPortletStart;
2265            }
2266    
2267            /**
2268             * Returns <code>true</code> if the portlet is a system portlet that a user
2269             * cannot manually add to their page.
2270             *
2271             * @return <code>true</code> if the portlet is a system portlet that a user
2272             *         cannot manually add to their page
2273             */
2274            public boolean isSystem() {
2275                    return _system;
2276            }
2277    
2278            /**
2279             * Returns <code>true</code> if the portlet is an undeployed portlet.
2280             *
2281             * @return <code>true</code> if the portlet is a placeholder of an
2282             *         undeployed portlet
2283             */
2284            public boolean isUndeployedPortlet() {
2285                    return _undeployedPortlet;
2286            }
2287    
2288            /**
2289             * Returns <code>true</code> if the portlet uses the default template.
2290             *
2291             * @return <code>true</code> if the portlet uses the default template
2292             */
2293            public boolean isUseDefaultTemplate() {
2294                    return _useDefaultTemplate;
2295            }
2296    
2297            /**
2298             * Link the role names set in portlet.xml with the Liferay roles set in
2299             * liferay-portlet.xml.
2300             */
2301            public void linkRoles() {
2302                    List<String> linkedRoles = new ArrayList<String>();
2303    
2304                    for (String unlinkedRole : _unlinkedRoles) {
2305                            String roleLink = _roleMappers.get(unlinkedRole);
2306    
2307                            if (Validator.isNotNull(roleLink)) {
2308                                    if (_log.isDebugEnabled()) {
2309                                            _log.debug(
2310                                                    "Linking role for portlet [" + getPortletId() +
2311                                                            "] with role-name [" + unlinkedRole +
2312                                                                    "] to role-link [" + roleLink + "]");
2313                                    }
2314    
2315                                    linkedRoles.add(roleLink);
2316                            }
2317                            else {
2318                                    _log.error(
2319                                            "Unable to link role for portlet [" + getPortletId() +
2320                                                    "] with role-name [" + unlinkedRole +
2321                                                            "] because role-link is null");
2322                            }
2323                    }
2324    
2325                    String[] array = linkedRoles.toArray(new String[linkedRoles.size()]);
2326    
2327                    Arrays.sort(array);
2328    
2329                    setRolesArray(array);
2330            }
2331    
2332            /**
2333             * Sets the action timeout of the portlet.
2334             *
2335             * @param actionTimeout the action timeout of the portlet
2336             */
2337            public void setActionTimeout(int actionTimeout) {
2338                    _actionTimeout = actionTimeout;
2339            }
2340    
2341            /**
2342             * Set to <code>true</code> if an action URL for this portlet should cause
2343             * an auto redirect.
2344             *
2345             * @param actionURLRedirect boolean value for whether an action URL for this
2346             *        portlet should cause an auto redirect
2347             */
2348            public void setActionURLRedirect(boolean actionURLRedirect) {
2349                    _actionURLRedirect = actionURLRedirect;
2350            }
2351    
2352            /**
2353             * Set to <code>true</code> if default resources for the portlet are added
2354             * to a page.
2355             *
2356             * @param addDefaultResource boolean value for whether or not default
2357             *        resources for the portlet are added to a page
2358             */
2359            public void setAddDefaultResource(boolean addDefaultResource) {
2360                    _addDefaultResource = addDefaultResource;
2361            }
2362    
2363            /**
2364             * Set to <code>true</code> if the portlet can be displayed via Ajax.
2365             *
2366             * @param ajaxable boolean value for whether the portlet can be displayed
2367             *        via Ajax
2368             */
2369            public void setAjaxable(boolean ajaxable) {
2370                    _ajaxable = ajaxable;
2371            }
2372    
2373            /**
2374             * Sets the name of the classes that represent asset types associated with
2375             * the portlet.
2376             *
2377             * @param assetRendererFactoryClasses the names of the classes that
2378             *        represent asset types associated with the portlet
2379             */
2380            public void setAssetRendererFactoryClasses(
2381                    List<String> assetRendererFactoryClasses) {
2382    
2383                    _assetRendererFactoryClasses = assetRendererFactoryClasses;
2384            }
2385    
2386            /**
2387             * Sets the name of the classes that represent atom collection adapters
2388             * associated with the portlet.
2389             *
2390             * @param atomCollectionAdapterClasses the names of the classes that
2391             *        represent atom collection adapters associated with the portlet
2392             */
2393            public void setAtomCollectionAdapterClasses(
2394                    List<String> atomCollectionAdapterClasses) {
2395    
2396                    _atomCollectionAdapterClasses = atomCollectionAdapterClasses;
2397            }
2398    
2399            /**
2400             * Sets the names of the parameters that will be automatically propagated
2401             * through the portlet.
2402             *
2403             * @param autopropagatedParameters the names of the parameters that will be
2404             *        automatically propagated through the portlet
2405             */
2406            public void setAutopropagatedParameters(
2407                    Set<String> autopropagatedParameters) {
2408    
2409                    _autopropagatedParameters = autopropagatedParameters;
2410            }
2411    
2412            /**
2413             * Sets the configuration action class of the portlet.
2414             *
2415             * @param configurationActionClass the configuration action class of the
2416             *        portlet
2417             */
2418            public void setConfigurationActionClass(String configurationActionClass) {
2419                    _configurationActionClass = configurationActionClass;
2420            }
2421    
2422            /**
2423             * Set the name of the category of the Control Panel where the portlet will
2424             * be shown.
2425             *
2426             * @param controlPanelEntryCategory the name of the category of the Control
2427             *        Panel where the portlet will be shown
2428             */
2429            public void setControlPanelEntryCategory(String controlPanelEntryCategory) {
2430                    _controlPanelEntryCategory = controlPanelEntryCategory;
2431            }
2432    
2433            /**
2434             * Sets the name of the class that will control when the portlet will be
2435             * shown in the Control Panel.
2436             *
2437             * @param controlPanelEntryClass the name of the class that will control
2438             *        when the portlet will be shown in the Control Panel
2439             */
2440            public void setControlPanelEntryClass(String controlPanelEntryClass) {
2441                    _controlPanelEntryClass = controlPanelEntryClass;
2442            }
2443    
2444            /**
2445             * Sets the relative weight of the portlet with respect to the other
2446             * portlets in the same category of the Control Panel.
2447             *
2448             * @param controlPanelEntryWeight the relative weight of the portlet with
2449             *        respect to the other portlets in the same category of the Control
2450             *        Panel
2451             */
2452            public void setControlPanelEntryWeight(double controlPanelEntryWeight) {
2453                    _controlPanelEntryWeight = controlPanelEntryWeight;
2454            }
2455    
2456            /**
2457             * Sets the name of the CSS class that will be injected in the DIV that
2458             * wraps this portlet.
2459             *
2460             * @param cssClassWrapper the name of the CSS class that will be injected in
2461             *        the DIV that wraps this portlet
2462             */
2463            public void setCssClassWrapper(String cssClassWrapper) {
2464                    _cssClassWrapper = cssClassWrapper;
2465            }
2466    
2467            /**
2468             * Sets the name of the classes that represent custom attribute displays
2469             * associated with the portlet.
2470             *
2471             * @param customAttributesDisplayClasses the names of the classes that
2472             *        represent custom attribute displays associated with the portlet
2473             */
2474            public void setCustomAttributesDisplayClasses(
2475                    List<String> customAttributesDisplayClasses) {
2476    
2477                    _customAttributesDisplayClasses = customAttributesDisplayClasses;
2478            }
2479    
2480            /**
2481             * Sets the default plugin settings of the portlet.
2482             *
2483             * @param pluginSetting the plugin setting
2484             */
2485            public void setDefaultPluginSetting(PluginSetting pluginSetting) {
2486                    _defaultPluginSetting = pluginSetting;
2487            }
2488    
2489            /**
2490             * Sets the default preferences of the portlet.
2491             *
2492             * @param defaultPreferences the default preferences of the portlet
2493             */
2494            public void setDefaultPreferences(String defaultPreferences) {
2495                    _defaultPreferences = defaultPreferences;
2496            }
2497    
2498            /**
2499             * Sets the display name of the portlet.
2500             *
2501             * @param displayName the display name of the portlet
2502             */
2503            public void setDisplayName(String displayName) {
2504                    _displayName = displayName;
2505            }
2506    
2507            /**
2508             * Sets expiration cache of the portlet.
2509             *
2510             * @param expCache expiration cache of the portlet
2511             */
2512            public void setExpCache(Integer expCache) {
2513                    _expCache = expCache;
2514            }
2515    
2516            /**
2517             * Sets the Facebook integration method of the portlet.
2518             *
2519             * @param facebookIntegration the Facebook integration method of the portlet
2520             */
2521            public void setFacebookIntegration(String facebookIntegration) {
2522                    if (Validator.isNotNull(facebookIntegration)) {
2523                            _facebookIntegration = facebookIntegration;
2524                    }
2525            }
2526    
2527            /**
2528             * Sets a list of CSS files that will be referenced from the page's footer
2529             * relative to the portal's context path.
2530             *
2531             * @param footerPortalCss a list of CSS files that will be referenced from
2532             *        the page's footer relative to the portal's context path
2533             */
2534            public void setFooterPortalCss(List<String> footerPortalCss) {
2535                    _footerPortalCss = footerPortalCss;
2536            }
2537    
2538            /**
2539             * Sets a list of JavaScript files that will be referenced from the page's
2540             * footer relative to the portal's context path.
2541             *
2542             * @param footerPortalJavaScript a list of JavaScript files that will be
2543             *        referenced from the page's footer relative to the portal's context
2544             *        path
2545             */
2546            public void setFooterPortalJavaScript(List<String> footerPortalJavaScript) {
2547                    _footerPortalJavaScript = footerPortalJavaScript;
2548            }
2549    
2550            /**
2551             * Sets a list of CSS files that will be referenced from the page's footer
2552             * relative to the portlet's context path.
2553             *
2554             * @param footerPortletCss a list of CSS files that will be referenced from
2555             *        the page's footer relative to the portlet's context path
2556             */
2557            public void setFooterPortletCss(List<String> footerPortletCss) {
2558                    _footerPortletCss = footerPortletCss;
2559            }
2560    
2561            /**
2562             * Sets a list of JavaScript files that will be referenced from the page's
2563             * footer relative to the portlet's context path.
2564             *
2565             * @param footerPortletJavaScript a list of JavaScript files that will be
2566             *        referenced from the page's footer relative to the portlet's
2567             *        context path
2568             */
2569            public void setFooterPortletJavaScript(
2570                    List<String> footerPortletJavaScript) {
2571    
2572                    _footerPortletJavaScript = footerPortletJavaScript;
2573            }
2574    
2575            /**
2576             * Sets the name of the friendly URL mapper class of the portlet.
2577             *
2578             * @param friendlyURLMapperClass the name of the friendly URL mapper class
2579             *        of the portlet
2580             */
2581            public void setFriendlyURLMapperClass(String friendlyURLMapperClass) {
2582                    _friendlyURLMapperClass = friendlyURLMapperClass;
2583            }
2584    
2585            /**
2586             * Sets the name of the friendly URL mapping of the portlet.
2587             *
2588             * @param friendlyURLMapping the name of the friendly URL mapping of the
2589             *        portlet
2590             */
2591            public void setFriendlyURLMapping(String friendlyURLMapping) {
2592                    _friendlyURLMapping = friendlyURLMapping;
2593            }
2594    
2595            /**
2596             * Sets the class loader resource path to the friendly URL routes of the
2597             * portlet.
2598             *
2599             * @param friendlyURLRoutes the class loader resource path to the friendly
2600             *        URL routes of the portlet
2601             */
2602            public void setFriendlyURLRoutes(String friendlyURLRoutes) {
2603                    _friendlyURLRoutes = friendlyURLRoutes;
2604            }
2605    
2606            /**
2607             * Sets a list of CSS files that will be referenced from the page's header
2608             * relative to the portal's context path.
2609             *
2610             * @param headerPortalCss a list of CSS files that will be referenced from
2611             *        the page's header relative to the portal's context path
2612             */
2613            public void setHeaderPortalCss(List<String> headerPortalCss) {
2614                    _headerPortalCss = headerPortalCss;
2615            }
2616    
2617            /**
2618             * Sets a list of JavaScript files that will be referenced from the page's
2619             * header relative to the portal's context path.
2620             *
2621             * @param headerPortalJavaScript a list of JavaScript files that will be
2622             *        referenced from the page's header relative to the portal's context
2623             *        path
2624             */
2625            public void setHeaderPortalJavaScript(List<String> headerPortalJavaScript) {
2626                    _headerPortalJavaScript = headerPortalJavaScript;
2627            }
2628    
2629            /**
2630             * Sets a list of CSS files that will be referenced from the page's header
2631             * relative to the portlet's context path.
2632             *
2633             * @param headerPortletCss a list of CSS files that will be referenced from
2634             *        the page's header relative to the portlet's context path
2635             */
2636            public void setHeaderPortletCss(List<String> headerPortletCss) {
2637                    _headerPortletCss = headerPortletCss;
2638            }
2639    
2640            /**
2641             * Sets a list of JavaScript files that will be referenced from the page's
2642             * header relative to the portlet's context path.
2643             *
2644             * @param headerPortletJavaScript a list of JavaScript files that will be
2645             *        referenced from the page's header relative to the portlet's
2646             *        context path
2647             */
2648            public void setHeaderPortletJavaScript(
2649                    List<String> headerPortletJavaScript) {
2650    
2651                    _headerPortletJavaScript = headerPortletJavaScript;
2652            }
2653    
2654            /**
2655             * Sets the icon of the portlet.
2656             *
2657             * @param icon the icon of the portlet
2658             */
2659            public void setIcon(String icon) {
2660                    _icon = icon;
2661            }
2662    
2663            /**
2664             * Set to <code>true</code> to include the portlet and make it available to
2665             * be made active.
2666             *
2667             * @param include boolean value for whether to include the portlet and make
2668             *        it available to be made active
2669             */
2670            public void setInclude(boolean include) {
2671                    _include = include;
2672            }
2673    
2674            /**
2675             * Sets the name of the classes that represent indexers associated with the
2676             * portlet.
2677             *
2678             * @param indexerClasses the name of the classes that represent indexers
2679             *        associated with the portlet
2680             */
2681            public void setIndexerClasses(List<String> indexerClasses) {
2682                    _indexerClasses = indexerClasses;
2683            }
2684    
2685            /**
2686             * Sets the init parameters of the portlet.
2687             *
2688             * @param initParams the init parameters of the portlet
2689             */
2690            public void setInitParams(Map<String, String> initParams) {
2691                    _initParams = initParams;
2692            }
2693    
2694            /**
2695             * Set to <code>true</code> if the portlet can be added multiple times to a
2696             * layout.
2697             *
2698             * @param instanceable boolean value for whether the portlet can be added
2699             *        multiple times to a layout
2700             */
2701            public void setInstanceable(boolean instanceable) {
2702                    _instanceable = instanceable;
2703            }
2704    
2705            /**
2706             * Set to <code>true</code> to allow the portlet to be cached within the
2707             * layout.
2708             *
2709             * @param layoutCacheable boolean value for whether the portlet can be
2710             *        cached within the layout
2711             */
2712            public void setLayoutCacheable(boolean layoutCacheable) {
2713                    _layoutCacheable = layoutCacheable;
2714            }
2715    
2716            /**
2717             * Set to <code>true</code> if the portlet goes into the maximized state
2718             * when the user goes into the edit mode.
2719             *
2720             * @param maximizeEdit boolean value for whether the portlet goes into the
2721             *        maximized state when the user goes into the edit mode
2722             */
2723            public void setMaximizeEdit(boolean maximizeEdit) {
2724                    _maximizeEdit = maximizeEdit;
2725            }
2726    
2727            /**
2728             * Set to <code>true</code> if the portlet goes into the maximized state
2729             * when the user goes into the help mode.
2730             *
2731             * @param maximizeHelp boolean value for whether the portlet goes into the
2732             *        maximized state when the user goes into the help mode
2733             */
2734            public void setMaximizeHelp(boolean maximizeHelp) {
2735                    _maximizeHelp = maximizeHelp;
2736            }
2737    
2738            /**
2739             * Sets the name of the open search class of the portlet.
2740             *
2741             * @param openSearchClass the name of the open search class of the portlet
2742             */
2743            public void setOpenSearchClass(String openSearchClass) {
2744                    _openSearchClass = openSearchClass;
2745            }
2746    
2747            /**
2748             * Sets the parent struts path of the portlet.
2749             *
2750             * @param parentStrutsPath the parent struts path of the portlet
2751             */
2752            public void setParentStrutsPath(String parentStrutsPath) {
2753                    _parentStrutsPath = parentStrutsPath;
2754            }
2755    
2756            /**
2757             * Sets the name of the permission propagator class of the portlet.
2758             */
2759            public void setPermissionPropagatorClass(String permissionPropagatorClass) {
2760                    _permissionPropagatorClass = permissionPropagatorClass;
2761            }
2762    
2763            /**
2764             * Sets this portlet's plugin package.
2765             *
2766             * @param pluginPackage this portlet's plugin package
2767             */
2768            public void setPluginPackage(PluginPackage pluginPackage) {
2769                    _pluginPackage = pluginPackage;
2770            }
2771    
2772            /**
2773             * Sets the name of the poller processor class of the portlet.
2774             *
2775             * @param pollerProcessorClass the name of the poller processor class of the
2776             *        portlet
2777             */
2778            public void setPollerProcessorClass(String pollerProcessorClass) {
2779                    _pollerProcessorClass = pollerProcessorClass;
2780            }
2781    
2782            /**
2783             * Sets the name of the POP message listener class of the portlet.
2784             *
2785             * @param popMessageListenerClass the name of the POP message listener class
2786             *        of the portlet
2787             */
2788            public void setPopMessageListenerClass(String popMessageListenerClass) {
2789                    _popMessageListenerClass = popMessageListenerClass;
2790            }
2791    
2792            /**
2793             * Set to <code>true</code> if the portlet goes into the pop up state when
2794             * the user goes into the print mode.
2795             *
2796             * @param popUpPrint boolean value for whether the portlet goes into the pop
2797             *        up state when the user goes into the print mode
2798             */
2799            public void setPopUpPrint(boolean popUpPrint) {
2800                    _popUpPrint = popUpPrint;
2801            }
2802    
2803            /**
2804             * Sets this portlet's application.
2805             *
2806             * @param portletApp this portlet's application
2807             */
2808            public void setPortletApp(PortletApp portletApp) {
2809                    _portletApp = portletApp;
2810    
2811                    _portletApp.addPortlet(this);
2812            }
2813    
2814            /**
2815             * Sets the name of the portlet class of the portlet.
2816             *
2817             * @param portletClass the name of the portlet class of the portlet
2818             */
2819            public void setPortletClass(String portletClass) {
2820                    _portletClass = portletClass;
2821            }
2822    
2823            /**
2824             * Sets the name of the portlet data handler class of the portlet.
2825             *
2826             * @param portletDataHandlerClass the name of portlet data handler class of
2827             *        the portlet
2828             */
2829            public void setPortletDataHandlerClass(String portletDataHandlerClass) {
2830                    _portletDataHandlerClass = portletDataHandlerClass;
2831            }
2832    
2833            /**
2834             * Sets the name of the portlet display template handler class of the
2835             * portlet.
2836             *
2837             * @param portletDisplayTemplateHandlerClass the name of display template
2838             *        handler class of the portlet
2839             */
2840            public void setPortletDisplayTemplateHandlerClass(
2841                    String portletDisplayTemplateHandlerClass) {
2842    
2843                    _portletDisplayTemplateHandlerClass =
2844                            portletDisplayTemplateHandlerClass;
2845            }
2846    
2847            /**
2848             * Sets the filters of the portlet.
2849             *
2850             * @param portletFilters the filters of the portlet
2851             */
2852            public void setPortletFilters(Map<String, PortletFilter> portletFilters) {
2853                    _portletFilters = portletFilters;
2854            }
2855    
2856            /**
2857             * Sets the portlet info of the portlet.
2858             *
2859             * @param portletInfo the portlet info of the portlet
2860             */
2861            public void setPortletInfo(PortletInfo portletInfo) {
2862                    _portletInfo = portletInfo;
2863            }
2864    
2865            /**
2866             * Sets the name of the portlet layout listener class of the portlet.
2867             *
2868             * @param portletLayoutListenerClass the name of the portlet layout listener
2869             *        class of the portlet
2870             */
2871            public void setPortletLayoutListenerClass(
2872                    String portletLayoutListenerClass) {
2873    
2874                    _portletLayoutListenerClass = portletLayoutListenerClass;
2875            }
2876    
2877            /**
2878             * Sets the portlet modes of the portlet.
2879             *
2880             * @param portletModes the portlet modes of the portlet
2881             */
2882            public void setPortletModes(Map<String, Set<String>> portletModes) {
2883                    _portletModes = portletModes;
2884            }
2885    
2886            /**
2887             * Sets the name of the portlet.
2888             *
2889             * @param portletName the name of the portlet
2890             */
2891            public void setPortletName(String portletName) {
2892                    _portletName = portletName;
2893            }
2894    
2895            /**
2896             * Sets the name of the portlet URL class of the portlet.
2897             *
2898             * @param portletURLClass the name of the portlet URL class of the portlet
2899             */
2900            public void setPortletURLClass(String portletURLClass) {
2901                    _portletURLClass = portletURLClass;
2902            }
2903    
2904            /**
2905             * Set to <code>true</code> if preferences are shared across the entire
2906             * company.
2907             *
2908             * @param preferencesCompanyWide boolean value for whether preferences are
2909             *        shared across the entire company
2910             */
2911            public void setPreferencesCompanyWide(boolean preferencesCompanyWide) {
2912                    _preferencesCompanyWide = preferencesCompanyWide;
2913            }
2914    
2915            /**
2916             * Set to <code>true</code> if preferences are owned by the group when the
2917             * portlet is shown in a group layout. Set to <code>false</code> if
2918             * preferences are owned by the user at all times.
2919             *
2920             * @param preferencesOwnedByGroup boolean value for whether preferences are
2921             *        owned by the group when the portlet is shown in a group layout or
2922             *        preferences are owned by the user at all times
2923             */
2924            public void setPreferencesOwnedByGroup(boolean preferencesOwnedByGroup) {
2925                    _preferencesOwnedByGroup = preferencesOwnedByGroup;
2926            }
2927    
2928            /**
2929             * Set to <code>true</code> if preferences are unique per layout.
2930             *
2931             * @param preferencesUniquePerLayout boolean value for whether preferences
2932             *        are unique per layout
2933             */
2934            public void setPreferencesUniquePerLayout(
2935                    boolean preferencesUniquePerLayout) {
2936    
2937                    _preferencesUniquePerLayout = preferencesUniquePerLayout;
2938            }
2939    
2940            /**
2941             * Sets the name of the preferences validator class of the portlet.
2942             *
2943             * @param preferencesValidator the name of the preferences validator class
2944             *        of the portlet
2945             */
2946            public void setPreferencesValidator(String preferencesValidator) {
2947                    if (preferencesValidator != null) {
2948    
2949                            // Trim this because XDoclet generates preferences validators with
2950                            // extra white spaces
2951    
2952                            _preferencesValidator = preferencesValidator.trim();
2953                    }
2954                    else {
2955                            _preferencesValidator = null;
2956                    }
2957            }
2958    
2959            /**
2960             * Set to <code>true</code> if the portlet does not share request attributes
2961             * with the portal or portlets from another WAR.
2962             *
2963             * @param privateRequestAttributes boolean value for whether the portlet
2964             *        shares request attributes with the portal or portlets from another
2965             *        WAR
2966             */
2967            public void setPrivateRequestAttributes(boolean privateRequestAttributes) {
2968                    _privateRequestAttributes = privateRequestAttributes;
2969            }
2970    
2971            /**
2972             * Set to <code>true</code> if the portlet does not share session attributes
2973             * with the portal.
2974             *
2975             * @param privateSessionAttributes boolean value for whether the portlet
2976             *        shares session attributes with the portal
2977             */
2978            public void setPrivateSessionAttributes(boolean privateSessionAttributes) {
2979                    _privateSessionAttributes = privateSessionAttributes;
2980            }
2981    
2982            /**
2983             * Sets the supported processing events of the portlet.
2984             *
2985             * @param processingEvents the supported processing events of the portlet
2986             */
2987            public void setProcessingEvents(Set<QName> processingEvents) {
2988                    for (QName processingEvent : processingEvents) {
2989                            addProcessingEvent(processingEvent);
2990                    }
2991            }
2992    
2993            /**
2994             * Sets the supported public render parameters of the portlet.
2995             *
2996             * @param publicRenderParameters the supported public render parameters of
2997             *        the portlet
2998             */
2999            public void setPublicRenderParameters(
3000                    Set<PublicRenderParameter> publicRenderParameters) {
3001    
3002                    for (PublicRenderParameter publicRenderParameter :
3003                                    publicRenderParameters) {
3004    
3005                            addPublicRenderParameter(publicRenderParameter);
3006                    }
3007            }
3008    
3009            /**
3010             * Sets the supported publishing events of the portlet.
3011             *
3012             * @param publishingEvents the supported publishing events of the portlet
3013             */
3014            public void setPublishingEvents(Set<QName> publishingEvents) {
3015                    for (QName publishingEvent : publishingEvents) {
3016                            addPublishingEvent(publishingEvent);
3017                    }
3018            }
3019    
3020            /**
3021             * Set to <code>true</code> if the portlet is ready to be used.
3022             *
3023             * @param ready whether the portlet is ready to be used
3024             */
3025            public void setReady(boolean ready) {
3026                    _readyMap.put(getRootPortletId(), ready);
3027            }
3028    
3029            /**
3030             * Set to <code>true</code> if the portlet supports remoting
3031             *
3032             * @param remoteable boolean value for whether or not the the portlet
3033             *        supports remoting
3034             */
3035            public void setRemoteable(boolean remoteable) {
3036                    _remoteable = remoteable;
3037            }
3038    
3039            /**
3040             * Sets the render timeout of the portlet.
3041             *
3042             * @param renderTimeout the render timeout of the portlet
3043             */
3044            public void setRenderTimeout(int renderTimeout) {
3045                    _renderTimeout = renderTimeout;
3046            }
3047    
3048            /**
3049             * Sets the render weight of the portlet.
3050             *
3051             * @param renderWeight int value for the render weight of the portlet
3052             */
3053            public void setRenderWeight(int renderWeight) {
3054                    _renderWeight = renderWeight;
3055            }
3056    
3057            /**
3058             * Sets the resource bundle of the portlet.
3059             *
3060             * @param resourceBundle the resource bundle of the portlet
3061             */
3062            public void setResourceBundle(String resourceBundle) {
3063                    _resourceBundle = resourceBundle;
3064            }
3065    
3066            /**
3067             * Set to <code>true</code> if the portlet restores to the current view from
3068             * the maximized state.
3069             *
3070             * @param restoreCurrentView boolean value for whether the portlet restores
3071             *        to the current view from the maximized state
3072             */
3073            public void setRestoreCurrentView(boolean restoreCurrentView) {
3074                    _restoreCurrentView = restoreCurrentView;
3075            }
3076    
3077            /**
3078             * Sets the role mappers of the portlet.
3079             *
3080             * @param roleMappers the role mappers of the portlet
3081             */
3082            public void setRoleMappers(Map<String, String> roleMappers) {
3083                    _roleMappers = roleMappers;
3084            }
3085    
3086            /**
3087             * Sets a string of ordered comma delimited portlet IDs.
3088             *
3089             * @param roles a string of ordered comma delimited portlet IDs
3090             */
3091            @Override
3092            public void setRoles(String roles) {
3093                    _rolesArray = StringUtil.split(roles);
3094    
3095                    super.setRoles(roles);
3096            }
3097    
3098            /**
3099             * Sets an array of required roles of the portlet.
3100             *
3101             * @param rolesArray an array of required roles of the portlet
3102             */
3103            public void setRolesArray(String[] rolesArray) {
3104                    _rolesArray = rolesArray;
3105    
3106                    super.setRoles(StringUtil.merge(rolesArray));
3107            }
3108    
3109            /**
3110             * Sets the scheduler entries of the portlet.
3111             *
3112             * @param schedulerEntries the scheduler entries of the portlet
3113             */
3114            public void setSchedulerEntries(List<SchedulerEntry> schedulerEntries) {
3115                    for (SchedulerEntry schedulerEntry : schedulerEntries) {
3116                            addSchedulerEntry(schedulerEntry);
3117                    }
3118            }
3119    
3120            /**
3121             * Set to <code>true</code> if the portlet supports scoping of data.
3122             *
3123             * @param scopeable boolean value for whether or not the the portlet
3124             *        supports scoping of data
3125             */
3126            public void setScopeable(boolean scopeable) {
3127                    _scopeable = scopeable;
3128            }
3129    
3130            /**
3131             * Set to <code>true</code> if users are shown that they do not have access
3132             * to the portlet.
3133             *
3134             * @param showPortletAccessDenied boolean value for whether users are shown
3135             *        that they do not have access to the portlet
3136             */
3137            public void setShowPortletAccessDenied(boolean showPortletAccessDenied) {
3138                    _showPortletAccessDenied = showPortletAccessDenied;
3139            }
3140    
3141            /**
3142             * Set to <code>true</code> if users are shown that the portlet is inactive.
3143             *
3144             * @param showPortletInactive boolean value for whether users are shown that
3145             *        the portlet is inactive
3146             */
3147            public void setShowPortletInactive(boolean showPortletInactive) {
3148                    _showPortletInactive = showPortletInactive;
3149            }
3150    
3151            /**
3152             * Sets the name of the social activity interpreter class of the portlet.
3153             *
3154             * @param socialActivityInterpreterClass the name of the activity
3155             *        interpreter class of the portlet
3156             */
3157            public void setSocialActivityInterpreterClass(
3158                    String socialActivityInterpreterClass) {
3159    
3160                    _socialActivityInterpreterClass = socialActivityInterpreterClass;
3161            }
3162    
3163            /**
3164             * Sets the name of the social request interpreter class of the portlet.
3165             *
3166             * @param socialRequestInterpreterClass the name of the request interpreter
3167             *        class of the portlet
3168             */
3169            public void setSocialRequestInterpreterClass(
3170                    String socialRequestInterpreterClass) {
3171    
3172                    _socialRequestInterpreterClass = socialRequestInterpreterClass;
3173            }
3174    
3175            /**
3176             * Set to <code>true</code> if the portlet is a static portlet that is
3177             * cannot be moved.
3178             *
3179             * @param staticPortlet boolean value for whether the portlet is a static
3180             *        portlet that cannot be moved
3181             */
3182            public void setStatic(boolean staticPortlet) {
3183                    _staticPortlet = staticPortlet;
3184            }
3185    
3186            /**
3187             * Set to <code>true</code> if the portlet is a static portlet at the start
3188             * of a list of portlets.
3189             *
3190             * @param staticPortletStart boolean value for whether the portlet is a
3191             *        static portlet at the start of a list of portlets
3192             */
3193            public void setStaticStart(boolean staticPortletStart) {
3194                    _staticPortletStart = staticPortletStart;
3195            }
3196    
3197            /**
3198             * Sets the struts path of the portlet.
3199             *
3200             * @param strutsPath the struts path of the portlet
3201             */
3202            public void setStrutsPath(String strutsPath) {
3203                    _strutsPath = strutsPath;
3204            }
3205    
3206            /**
3207             * Sets the supported locales of the portlet.
3208             *
3209             * @param supportedLocales the supported locales of the portlet
3210             */
3211            public void setSupportedLocales(Set<String> supportedLocales) {
3212                    _supportedLocales = supportedLocales;
3213            }
3214    
3215            /**
3216             * Set to <code>true</code> if the portlet is a system portlet that a user
3217             * cannot manually add to their page.
3218             *
3219             * @param system boolean value for whether the portlet is a system portlet
3220             *        that a user cannot manually add to their page
3221             */
3222            public void setSystem(boolean system) {
3223                    _system = system;
3224            }
3225    
3226            /**
3227             * Sets the timestamp of the portlet.
3228             *
3229             * @param timestamp the timestamp of the portlet
3230             */
3231            public void setTimestamp(long timestamp) {
3232                    _timestamp = timestamp;
3233            }
3234    
3235            /**
3236             * Sets the name of the classes that represent trash handlers associated to
3237             * the portlet.
3238             *
3239             * @param trashHandlerClasses the names of the classes that represent trash
3240             *        handlers associated with the portlet
3241             */
3242            public void setTrashHandlerClasses(List<String> trashHandlerClasses) {
3243                    _trashHandlerClasses = trashHandlerClasses;
3244            }
3245    
3246            /**
3247             * Set to <code>true</code> if the portlet is an undeployed portlet.
3248             *
3249             * @param undeployedPortlet boolean value for whether the portlet is an
3250             *        undeployed portlet
3251             */
3252            public void setUndeployedPortlet(boolean undeployedPortlet) {
3253                    _undeployedPortlet = undeployedPortlet;
3254            }
3255    
3256            /**
3257             * Sets the unlinked roles of the portlet.
3258             *
3259             * @param unlinkedRoles the unlinked roles of the portlet
3260             */
3261            public void setUnlinkedRoles(Set<String> unlinkedRoles) {
3262                    _unlinkedRoles = unlinkedRoles;
3263            }
3264    
3265            /**
3266             * Sets the name of the URL encoder class of the portlet.
3267             *
3268             * @param urlEncoderClass the name of the URL encoder class of the portlet
3269             */
3270            public void setURLEncoderClass(String urlEncoderClass) {
3271                    _urlEncoderClass = urlEncoderClass;
3272            }
3273    
3274            /**
3275             * Set to <code>true</code> if the portlet uses the default template.
3276             *
3277             * @param useDefaultTemplate boolean value for whether the portlet uses the
3278             *        default template
3279             */
3280            public void setUseDefaultTemplate(boolean useDefaultTemplate) {
3281                    _useDefaultTemplate = useDefaultTemplate;
3282            }
3283    
3284            /**
3285             * Sets the user principal strategy of the portlet.
3286             *
3287             * @param userPrincipalStrategy the user principal strategy of the portlet
3288             */
3289            public void setUserPrincipalStrategy(String userPrincipalStrategy) {
3290                    if (Validator.isNotNull(userPrincipalStrategy)) {
3291                            _userPrincipalStrategy = userPrincipalStrategy;
3292                    }
3293            }
3294    
3295            /**
3296             * Sets the virtual path of the portlet.
3297             *
3298             * @param virtualPath the virtual path of the portlet
3299             */
3300            public void setVirtualPath(String virtualPath) {
3301                    if (_portletApp.isWARFile() && Validator.isNull(virtualPath)) {
3302                            virtualPath = PropsValues.PORTLET_VIRTUAL_PATH;
3303                    }
3304    
3305                    _virtualPath = virtualPath;
3306            }
3307    
3308            /**
3309             * Sets the name of the WebDAV storage class of the portlet.
3310             *
3311             * @param webDAVStorageClass the name of the WebDAV storage class of the
3312             *        portlet
3313             */
3314            public void setWebDAVStorageClass(String webDAVStorageClass) {
3315                    _webDAVStorageClass = webDAVStorageClass;
3316            }
3317    
3318            /**
3319             * Sets the name of the WebDAV storage token of the portlet.
3320             *
3321             * @param webDAVStorageToken the name of the WebDAV storage token of the
3322             *        portlet
3323             */
3324            public void setWebDAVStorageToken(String webDAVStorageToken) {
3325                    _webDAVStorageToken = webDAVStorageToken;
3326            }
3327    
3328            /**
3329             * Sets the window states of the portlet.
3330             *
3331             * @param windowStates the window states of the portlet
3332             */
3333            public void setWindowStates(Map<String, Set<String>> windowStates) {
3334                    _windowStates = windowStates;
3335            }
3336    
3337            /**
3338             * Sets the name of the classes that represent workflow handlers associated
3339             * to the portlet.
3340             *
3341             * @param workflowHandlerClasses the names of the classes that represent
3342             *        workflow handlers associated with the portlet
3343             */
3344            public void setWorkflowHandlerClasses(List<String> workflowHandlerClasses) {
3345                    _workflowHandlerClasses = workflowHandlerClasses;
3346            }
3347    
3348            /**
3349             * Sets the name of the XML-RPC method class of the portlet.
3350             *
3351             * @param xmlRpcMethodClass the name of the XML-RPC method class of the
3352             *        portlet
3353             */
3354            public void setXmlRpcMethodClass(String xmlRpcMethodClass) {
3355                    _xmlRpcMethodClass = xmlRpcMethodClass;
3356            }
3357    
3358            /**
3359             * Log instance for this class.
3360             */
3361            private static Log _log = LogFactoryUtil.getLog(PortletImpl.class);
3362    
3363            /**
3364             * Map of the ready states of all portlets keyed by their root portlet ID.
3365             */
3366            private static Map<String, Boolean> _readyMap =
3367                    new ConcurrentHashMap<String, Boolean>();
3368    
3369            /**
3370             * The action timeout of the portlet.
3371             */
3372            private int _actionTimeout;
3373    
3374            /**
3375             * <code>True</code> if an action URL for this portlet should cause an auto
3376             * redirect.
3377             */
3378            private boolean _actionURLRedirect;
3379    
3380            /**
3381             * <code>True</code> if default resources for the portlet are added to a
3382             * page.
3383             */
3384            private boolean _addDefaultResource;
3385    
3386            /**
3387             * <code>True</code> if the portlet can be displayed via Ajax.
3388             */
3389            private boolean _ajaxable = true;
3390    
3391            /**
3392             * The names of the classes that represents asset types associated with the
3393             * portlet.
3394             */
3395            private List<String> _assetRendererFactoryClasses;
3396    
3397            /**
3398             * The names of the classes that represents atom collection adapters
3399             * associated with the portlet.
3400             */
3401            private List<String> _atomCollectionAdapterClasses;
3402    
3403            /**
3404             * The names of the parameters that will be automatically propagated through
3405             * the portlet.
3406             */
3407            private Set<String> _autopropagatedParameters;
3408    
3409            /**
3410             * The configuration action class of the portlet.
3411             */
3412            private String _configurationActionClass;
3413    
3414            /**
3415             * The name of the category of the Control Panel where this portlet will be
3416             * shown.
3417             */
3418            private String _controlPanelEntryCategory;
3419    
3420            /**
3421             * The name of the class that will control when this portlet will be shown
3422             * in the Control Panel.
3423             */
3424            private String _controlPanelEntryClass;
3425    
3426            /**
3427             * The relative weight of this portlet with respect to the other portlets in
3428             * the same category of the Control Panel.
3429             */
3430            private double _controlPanelEntryWeight = 100;
3431    
3432            /**
3433             * The name of the CSS class that will be injected in the DIV that wraps
3434             * this portlet.
3435             */
3436            private String _cssClassWrapper = StringPool.BLANK;
3437    
3438            /**
3439             * The names of the classes that represents custom attribute displays
3440             * associated with the portlet.
3441             */
3442            private List<String> _customAttributesDisplayClasses;
3443    
3444            /**
3445             * Plugin settings associated with the portlet.
3446             */
3447            private PluginSetting _defaultPluginSetting;
3448    
3449            /**
3450             * The default preferences of the portlet.
3451             */
3452            private String _defaultPreferences;
3453    
3454            /**
3455             * The display name of the portlet.
3456             */
3457            private String _displayName;
3458    
3459            /**
3460             * The expiration cache of the portlet.
3461             */
3462            private Integer _expCache;
3463    
3464            /**
3465             * The Facebook integration method of the portlet.
3466             */
3467            private String _facebookIntegration =
3468                    PortletConstants.FACEBOOK_INTEGRATION_IFRAME;
3469    
3470            /**
3471             * A list of CSS files that will be referenced from the page's footer
3472             * relative to the portal's context path.
3473             */
3474            private List<String> _footerPortalCss;
3475    
3476            /**
3477             * A list of JavaScript files that will be referenced from the page's footer
3478             * relative to the portal's context path.
3479             */
3480            private List<String> _footerPortalJavaScript;
3481    
3482            /**
3483             * A list of CSS files that will be referenced from the page's footer
3484             * relative to the portlet's context path.
3485             */
3486            private List<String> _footerPortletCss;
3487    
3488            /**
3489             * A list of JavaScript files that will be referenced from the page's footer
3490             * relative to the portlet's context path.
3491             */
3492            private List<String> _footerPortletJavaScript;
3493    
3494            /**
3495             * The name of the friendly URL mapper class of the portlet.
3496             */
3497            private String _friendlyURLMapperClass;
3498    
3499            /**
3500             * The name of the friendly URL mapping of the portlet.
3501             */
3502            private String _friendlyURLMapping;
3503    
3504            /**
3505             * The the class loader resource path to the friendly URL routes of the
3506             * portlet.
3507             */
3508            private String _friendlyURLRoutes;
3509    
3510            /**
3511             * A list of CSS files that will be referenced from the page's header
3512             * relative to the portal's context path.
3513             */
3514            private List<String> _headerPortalCss;
3515    
3516            /**
3517             * A list of JavaScript files that will be referenced from the page's header
3518             * relative to the portal's context path.
3519             */
3520            private List<String> _headerPortalJavaScript;
3521    
3522            /**
3523             * A list of CSS files that will be referenced from the page's header
3524             * relative to the portlet's context path.
3525             */
3526            private List<String> _headerPortletCss;
3527    
3528            /**
3529             * A list of JavaScript files that will be referenced from the page's header
3530             * relative to the portlet's context path.
3531             */
3532            private List<String> _headerPortletJavaScript;
3533    
3534            /**
3535             * The icon of the portlet.
3536             */
3537            private String _icon;
3538    
3539            /**
3540             * <code>True</code> to include the portlet and make it available to be made
3541             * active.
3542             */
3543            private boolean _include = true;
3544    
3545            /**
3546             * The name of the classes that represent indexers associated with the
3547             * portlet.
3548             */
3549            private List<String> _indexerClasses;
3550    
3551            /**
3552             * The init parameters of the portlet.
3553             */
3554            private Map<String, String> _initParams;
3555    
3556            /**
3557             * <code>True</code> if the portlet can be added multiple times to a layout.
3558             */
3559            private boolean _instanceable;
3560    
3561            /**
3562             * <code>True</code> if the portlet can be cached within the layout.
3563             */
3564            private boolean _layoutCacheable;
3565    
3566            /**
3567             * <code>True</code> if the portlet goes into the maximized state when the
3568             * user goes into the edit mode.
3569             */
3570            private boolean _maximizeEdit;
3571    
3572            /**
3573             * <code>True</code> if the portlet goes into the maximized state when the
3574             * user goes into the help mode.
3575             */
3576            private boolean _maximizeHelp;
3577    
3578            /**
3579             * The name of the open search class of the portlet.
3580             */
3581            private String _openSearchClass;
3582    
3583            /**
3584             * The parent struts path of the portlet.
3585             */
3586            private String _parentStrutsPath;
3587    
3588            /**
3589             * The name of the permission propagator class of the portlet.
3590             */
3591            private String _permissionPropagatorClass;
3592    
3593            /**
3594             * Package to which this plugin belongs.
3595             */
3596            private PluginPackage _pluginPackage;
3597    
3598            /**
3599             * The name of the poller processor class of the portlet.
3600             */
3601            private String _pollerProcessorClass;
3602    
3603            /**
3604             * The name of the POP message listener class of the portlet.
3605             */
3606            private String _popMessageListenerClass;
3607    
3608            /**
3609             * <code>True</code> if the portlet goes into the pop up state when the user
3610             * goes into the print mode.
3611             */
3612            private boolean _popUpPrint = true;
3613    
3614            /**
3615             * The application to which this portlet belongs.
3616             */
3617            private PortletApp _portletApp;
3618    
3619            /**
3620             * The name of the portlet class of the portlet.
3621             */
3622            private String _portletClass;
3623    
3624            /**
3625             * The name of the portlet data handler class of the portlet.
3626             */
3627            private String _portletDataHandlerClass;
3628    
3629            /**
3630             * The name of the display style handler class of the portlet.
3631             */
3632            private String _portletDisplayTemplateHandlerClass;
3633    
3634            /**
3635             * The filters of the portlet.
3636             */
3637            private Map<String, PortletFilter> _portletFilters;
3638    
3639            /**
3640             * The portlet info of the portlet.
3641             */
3642            private PortletInfo _portletInfo;
3643    
3644            /**
3645             * The name of the portlet data layout listener class of the portlet.
3646             */
3647            private String _portletLayoutListenerClass;
3648    
3649            /**
3650             * The portlet modes of the portlet.
3651             */
3652            private Map<String, Set<String>> _portletModes;
3653    
3654            /**
3655             * The name of the portlet.
3656             */
3657            private String _portletName;
3658    
3659            /**
3660             * The name of the portlet URL class of the portlet.
3661             */
3662            private String _portletURLClass;
3663    
3664            /**
3665             * <code>True</code> if preferences are shared across the entire company.
3666             */
3667            private boolean _preferencesCompanyWide;
3668    
3669            /**
3670             * <code>True</code> if preferences are owned by the group when the portlet
3671             * is shown in a group layout. <code>False</code> if preferences are owned
3672             * by the user at all times.
3673             */
3674            private boolean _preferencesOwnedByGroup = true;
3675    
3676            /**
3677             * <code>True</code> if preferences are unique per layout.
3678             */
3679            private boolean _preferencesUniquePerLayout = true;
3680    
3681            /**
3682             * The name of the preferences validator class of the portlet.
3683             */
3684            private String _preferencesValidator;
3685    
3686            /**
3687             * <code>True</code> if the portlet does not share request attributes with
3688             * the portal or portlets from another WAR.
3689             */
3690            private boolean _privateRequestAttributes = true;
3691    
3692            /**
3693             * <code>True</code> if the portlet does not share session attributes with
3694             * the portal.
3695             */
3696            private boolean _privateSessionAttributes = true;
3697    
3698            /**
3699             * The supported processing events of the portlet.
3700             */
3701            private Set<QName> _processingEvents = new HashSet<QName>();
3702    
3703            /**
3704             * Map of the supported processing events of the portlet keyed by the QName.
3705             */
3706            private Map<String, QName> _processingEventsByQName =
3707                    new HashMap<String, QName>();
3708    
3709            /**
3710             * The supported public render parameters of the portlet.
3711             */
3712            private Set<PublicRenderParameter> _publicRenderParameters =
3713                    new HashSet<PublicRenderParameter>();
3714    
3715            /**
3716             * Map of the supported public render parameters of the portlet keyed by the
3717             * identifier.
3718             */
3719            private Map<String, PublicRenderParameter>
3720                    _publicRenderParametersByIdentifier =
3721                            new HashMap<String, PublicRenderParameter>();
3722    
3723            /**
3724             * Map of the supported public render parameters of the portlet keyed by the
3725             * QName.
3726             */
3727            private Map<String, PublicRenderParameter>
3728                    _publicRenderParametersByQName =
3729                            new HashMap<String, PublicRenderParameter>();
3730    
3731            /**
3732             * The supported publishing events of the portlet.
3733             */
3734            private Set<QName> _publishingEvents = new HashSet<QName>();
3735    
3736            /**
3737             * <code>True</code> if the portlet supports remoting.
3738             */
3739            private boolean _remoteable;
3740    
3741            /**
3742             * The render timeout of the portlet.
3743             */
3744            private int _renderTimeout;
3745    
3746            /**
3747             * Render weight of the portlet.
3748             */
3749            private int _renderWeight = 1;
3750    
3751            /**
3752             * The resource bundle of the portlet.
3753             */
3754            private String _resourceBundle;
3755    
3756            /**
3757             * <code>True</code> if the portlet restores to the current view from the
3758             * maximized state.
3759             */
3760            private boolean _restoreCurrentView = true;
3761    
3762            /**
3763             * The role mappers of the portlet.
3764             */
3765            private Map<String, String> _roleMappers;
3766    
3767            /**
3768             * An array of required roles of the portlet.
3769             */
3770            private String[] _rolesArray = new String[0];
3771    
3772            /**
3773             * The root portlet of this portlet instance.
3774             */
3775            private Portlet _rootPortlet = this;
3776    
3777            /**
3778             * The scheduler entries of the portlet.
3779             */
3780            private List<SchedulerEntry> _schedulerEntries;
3781    
3782            /**
3783             * <code>True</code> if the portlet supports scoping of data.
3784             */
3785            private boolean _scopeable;
3786    
3787            /**
3788             * <code>True</code> if users are shown that they do not have access to the
3789             * portlet.
3790             */
3791            private boolean _showPortletAccessDenied =
3792                    PropsValues.LAYOUT_SHOW_PORTLET_ACCESS_DENIED;
3793    
3794            /**
3795             * <code>True</code> if users are shown that the portlet is inactive.
3796             */
3797            private boolean _showPortletInactive =
3798                    PropsValues.LAYOUT_SHOW_PORTLET_INACTIVE;
3799    
3800            /**
3801             * The name of the social activity interpreter class of the portlet.
3802             */
3803            private String _socialActivityInterpreterClass;
3804    
3805            /**
3806             * The name of the social request interpreter class of the portlet.
3807             */
3808            private String _socialRequestInterpreterClass;
3809    
3810            /**
3811             * <code>True</code> if the portlet is a static portlet that is cannot be
3812             * moved.
3813             */
3814            private boolean _staticPortlet;
3815    
3816            /**
3817             * <code>True</code> if the portlet is a static portlet at the start of a
3818             * list of portlets.
3819             */
3820            private boolean _staticPortletStart;
3821    
3822            /**
3823             * The struts path of the portlet.
3824             */
3825            private String _strutsPath;
3826    
3827            /**
3828             * The supported locales of the portlet.
3829             */
3830            private Set<String> _supportedLocales;
3831    
3832            /**
3833             * <code>True</code> if the portlet is a system portlet that a user cannot
3834             * manually add to their page.
3835             */
3836            private boolean _system;
3837    
3838            /**
3839             * The timestamp of the portlet.
3840             */
3841            private long _timestamp;
3842    
3843            /**
3844             * The names of the classes that represents trash handlers associated with
3845             * the portlet.
3846             */
3847            private List<String> _trashHandlerClasses;
3848    
3849            /**
3850             * <code>True</code> if the portlet is an undeployed portlet.
3851             */
3852            private boolean _undeployedPortlet = false;
3853    
3854            /**
3855             * The unlinked roles of the portlet.
3856             */
3857            private Set<String> _unlinkedRoles;
3858    
3859            /**
3860             * The name of the URL encoder class of the portlet.
3861             */
3862            private String _urlEncoderClass;
3863    
3864            /**
3865             * <code>True</code> if the portlet uses the default template.
3866             */
3867            private boolean _useDefaultTemplate = true;
3868    
3869            /**
3870             * The user principal strategy of the portlet.
3871             */
3872            private String _userPrincipalStrategy =
3873                    PortletConstants.USER_PRINCIPAL_STRATEGY_USER_ID;
3874    
3875            /**
3876             * The virtual path of the portlet.
3877             */
3878            private String _virtualPath;
3879    
3880            /**
3881             * The name of the WebDAV storage class of the portlet.
3882             */
3883            private String _webDAVStorageClass;
3884    
3885            /**
3886             * The name of the WebDAV storage token of the portlet.
3887             */
3888            private String _webDAVStorageToken;
3889    
3890            /**
3891             * The window states of the portlet.
3892             */
3893            private Map<String, Set<String>> _windowStates;
3894    
3895            /**
3896             * The names of the classes that represents workflow handlers associated
3897             * with the portlet.
3898             */
3899            private List<String> _workflowHandlerClasses;
3900    
3901            /**
3902             * The name of the XML-RPC method class of the portlet.
3903             */
3904            private String _xmlRpcMethodClass;
3905    
3906    }