001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.util;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.portlet.LiferayPortletRequest;
020    import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
021    import com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry;
022    import com.liferay.portal.kernel.upload.UploadPortletRequest;
023    import com.liferay.portal.kernel.upload.UploadServletRequest;
024    import com.liferay.portal.model.BaseModel;
025    import com.liferay.portal.model.Company;
026    import com.liferay.portal.model.Group;
027    import com.liferay.portal.model.Layout;
028    import com.liferay.portal.model.LayoutFriendlyURLComposite;
029    import com.liferay.portal.model.LayoutQueryStringComposite;
030    import com.liferay.portal.model.LayoutSet;
031    import com.liferay.portal.model.LayoutTypePortlet;
032    import com.liferay.portal.model.Portlet;
033    import com.liferay.portal.model.ResourcePermission;
034    import com.liferay.portal.model.User;
035    import com.liferay.portal.theme.PortletDisplay;
036    import com.liferay.portal.theme.ThemeDisplay;
037    import com.liferay.portlet.expando.model.ExpandoBridge;
038    
039    import java.io.IOException;
040    import java.io.Serializable;
041    
042    import java.util.Date;
043    import java.util.List;
044    import java.util.Locale;
045    import java.util.Map;
046    import java.util.Properties;
047    import java.util.Set;
048    import java.util.TimeZone;
049    
050    import javax.portlet.ActionRequest;
051    import javax.portlet.ActionResponse;
052    import javax.portlet.PortletConfig;
053    import javax.portlet.PortletException;
054    import javax.portlet.PortletMode;
055    import javax.portlet.PortletPreferences;
056    import javax.portlet.PortletRequest;
057    import javax.portlet.PortletResponse;
058    import javax.portlet.PortletURL;
059    import javax.portlet.PreferencesValidator;
060    import javax.portlet.RenderRequest;
061    import javax.portlet.RenderResponse;
062    import javax.portlet.ValidatorException;
063    import javax.portlet.WindowState;
064    
065    import javax.servlet.ServletContext;
066    import javax.servlet.ServletException;
067    import javax.servlet.http.HttpServletRequest;
068    import javax.servlet.http.HttpServletResponse;
069    import javax.servlet.http.HttpSession;
070    import javax.servlet.jsp.PageContext;
071    
072    /**
073     * @author Brian Wing Shun Chan
074     * @author Eduardo Lundgren
075     */
076    public interface Portal {
077    
078            public static final String FRIENDLY_URL_SEPARATOR = "/-/";
079    
080            public static final String JSESSIONID = ";jsessionid=";
081    
082            public static final String PATH_IMAGE = "/image";
083    
084            public static final String PATH_MAIN = "/c";
085    
086            public static final String PATH_MODULE = "/o";
087    
088            public static final String PATH_PORTAL_LAYOUT = "/portal/layout";
089    
090            public static final String PORTAL_REALM = "PortalRealm";
091    
092            public static final String PORTLET_XML_FILE_NAME_CUSTOM =
093                    "portlet-custom.xml";
094    
095            public static final String PORTLET_XML_FILE_NAME_STANDARD = "portlet.xml";
096    
097            public static final String TEMP_OBFUSCATION_VALUE =
098                    "TEMP_OBFUSCATION_VALUE";
099    
100            /**
101             * Appends the description to the current meta description of the page.
102             *
103             * @param description the description to append to the current meta
104             *        description
105             * @param request the servlet request for the page
106             */
107            public void addPageDescription(
108                    String description, HttpServletRequest request);
109    
110            /**
111             * Appends the keywords to the current meta keywords of the page.
112             *
113             * @param keywords the keywords to add to the current meta keywords
114             *        (comma-separated)
115             * @param request the servlet request for the page
116             */
117            public void addPageKeywords(String keywords, HttpServletRequest request);
118    
119            /**
120             * Appends the subtitle to the current subtitle of the page.
121             *
122             * @param subtitle the subtitle to append to the current subtitle
123             * @param request the servlet request for the page
124             */
125            public void addPageSubtitle(String subtitle, HttpServletRequest request);
126    
127            /**
128             * Appends the title to the current title of the page.
129             *
130             * @param title the title to append to the current title
131             * @param request the servlet request for the page
132             */
133            public void addPageTitle(String title, HttpServletRequest request);
134    
135            /**
136             * Adds the portal port event listener to the portal. The listener will be
137             * notified whenever the portal port is set.
138             *
139             * @param portalPortEventListener the portal port event listener to add
140             */
141            public void addPortalPortEventListener(
142                    PortalPortEventListener portalPortEventListener);
143    
144            /**
145             * Adds the portal port and protocol event listener to the portal. The listener will be
146             * notified whenever the portal port and protocol is set.
147             *
148             * @param portalPortEventListener the portal port and protocol event listener to add
149             */
150            public void addPortalPortProtocolEventListener(
151                    PortalPortProtocolEventListener portalPortProtocolEventListener);
152    
153            /**
154             * Adds an entry to the portlet breadcrumbs for the page.
155             *
156             * @param request the servlet request for the page
157             * @param title the title of the new breakcrumb entry
158             * @param url the URL of the new breadcrumb entry
159             */
160            public void addPortletBreadcrumbEntry(
161                    HttpServletRequest request, String title, String url);
162    
163            /**
164             * Adds an entry to the portlet breadcrumbs for the page.
165             *
166             * @param request the servlet request for the page
167             * @param title the title of the new breakcrumb entry
168             * @param url the URL of the new breadcrumb entry
169             * @param data the HTML5 data parameters of the new breadcrumb entry
170             */
171            public void addPortletBreadcrumbEntry(
172                    HttpServletRequest request, String title, String url,
173                    Map<String, Object> data);
174    
175            /**
176             * Adds the default resource permissions for the portlet to the page.
177             *
178             * @param  request the servlet request for the page
179             * @param  portlet the portlet
180             * @throws PortalException if adding the default resource permissions failed
181             * @throws SystemException if a system exception occurred
182             */
183            public void addPortletDefaultResource(
184                            HttpServletRequest request, Portlet portlet)
185                    throws PortalException, SystemException;
186    
187            public void addPortletDefaultResource(
188                            long companyId, Layout layout, Portlet portlet)
189                    throws PortalException, SystemException;
190    
191            /**
192             * Adds the preserved parameters doAsGroupId and refererPlid to the URL,
193             * optionally adding doAsUserId and doAsUserLanguageId as well.
194             *
195             * <p>
196             * Preserved parameters are parameters that should be sent with every
197             * request as the user navigates the portal.
198             * </p>
199             *
200             * @param  themeDisplay the current theme display
201             * @param  layout the current layout
202             * @param  url the URL
203             * @param  doAsUser whether to include doAsUserId and doAsLanguageId in the
204             *         URL if they are available. If <code>false</code>, doAsUserId and
205             *         doAsUserLanguageId will never be added.
206             * @return the URL with the preserved parameters added
207             */
208            public String addPreservedParameters(
209                    ThemeDisplay themeDisplay, Layout layout, String url, boolean doAsUser);
210    
211            /**
212             * Adds the preserved parameters doAsUserId, doAsUserLanguageId,
213             * doAsGroupId, refererPlid, and controlPanelCategory to the URL.
214             *
215             * @param  themeDisplay the current theme display
216             * @param  url the URL
217             * @return the URL with the preserved parameters added
218             */
219            public String addPreservedParameters(ThemeDisplay themeDisplay, String url);
220    
221            public void addUserLocaleOptionsMessage(HttpServletRequest request);
222    
223            /**
224             * Clears the render parameters in the request if the portlet is in the
225             * action phase.
226             *
227             * @param renderRequest the render request
228             */
229            public void clearRequestParameters(RenderRequest renderRequest);
230    
231            /**
232             * Copies the request parameters to the render parameters, unless a
233             * parameter with that name already exists in the render parameters.
234             *
235             * @param actionRequest the request from which to get the request parameters
236             * @param actionResponse the response to receive the render parameters
237             */
238            public void copyRequestParameters(
239                    ActionRequest actionRequest, ActionResponse actionResponse);
240    
241            /**
242             * Escapes the URL for use in a redirect and checks that security settings
243             * allow the URL is allowed for redirects.
244             *
245             * @param  url the URL to escape
246             * @return the escaped URL, or <code>null</code> if the URL is not an
247             *         allowed for redirects
248             */
249            public String escapeRedirect(String url);
250    
251            /**
252             * Generates a random key to identify the request based on the input string.
253             *
254             * @param  request the servlet request for the page
255             * @param  input the input string
256             * @return the generated key
257             */
258            public String generateRandomKey(HttpServletRequest request, String input);
259    
260            public String getAbsoluteURL(HttpServletRequest request, String url);
261    
262            public LayoutQueryStringComposite getActualLayoutQueryStringComposite(
263                            long groupId, boolean privateLayout, String friendlyURL,
264                            Map<String, String[]> params, Map<String, Object> requestContext)
265                    throws PortalException, SystemException;
266    
267            public String getActualURL(
268                            long groupId, boolean privateLayout, String mainPath,
269                            String friendlyURL, Map<String, String[]> params,
270                            Map<String, Object> requestContext)
271                    throws PortalException, SystemException;
272    
273            /**
274             * Returns an array with the alternate locales, considering if the page is
275             * showing just a content and the translations of this content.
276             *
277             * @param      request the servlet request for the page
278             * @return     the array of alternate locales
279             * @throws     PortalException if a portal exception occurred
280             * @throws     SystemException if a system exception occurred
281             * @deprecated As of 6.2.0, replaced by {@link
282             *             com.liferay.portal.kernel.language.LanguageUtil#getAvailableLocales}
283             */
284            public Locale[] getAlternateLocales(HttpServletRequest request)
285                    throws PortalException, SystemException;
286    
287            /**
288             * Returns the alternate URL of the page, to distinguish it from its
289             * canonical URL.
290             *
291             * @param  canonicalURL the canonical URL previously obtained
292             * @param  themeDisplay the theme display
293             * @param  locale the locale of the translated page
294             * @param  layout the layout
295             * @return the alternate URL
296             * @throws PortalException if a portal exception occurred
297             * @throws SystemException if a system exception occurred
298             */
299            public String getAlternateURL(
300                            String canonicalURL, ThemeDisplay themeDisplay, Locale locale,
301                            Layout layout)
302                    throws PortalException, SystemException;
303    
304            /**
305             * Returns the set of struts actions that should not be checked for an
306             * authentication token.
307             *
308             * @return     the set of struts actions that should not be checked for an
309             *             authentication token
310             * @deprecated As of 6.2.0, replaced by {@link
311             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletCSRFWhitelistActions}
312             */
313            public Set<String> getAuthTokenIgnoreActions();
314    
315            /**
316             * Returns the set of IDs of portlets that should not be checked for an
317             * authentication token.
318             *
319             * @return     the set of IDs of portlets that should not be checked for an
320             *             authentication token
321             * @deprecated As of 6.2.0, replaced by {@link
322             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletCSRFWhitelist}
323             */
324            public Set<String> getAuthTokenIgnorePortlets();
325    
326            /**
327             * Returns the base model instance for the resource permission.
328             *
329             * @param  resourcePermission the resource permission
330             * @return the base model instance, or <code>null</code> if the resource
331             *         permission does not have a base model instance (such as if its a
332             *         portlet)
333             * @throws PortalException if a base model instance for the resource
334             *         permission could not be found
335             * @throws SystemException if a system exception occurred
336             */
337            public BaseModel<?> getBaseModel(ResourcePermission resourcePermission)
338                    throws PortalException, SystemException;
339    
340            /**
341             * Returns the base model instance for the model name and primary key.
342             *
343             * @param  modelName the fully qualified class name of the model
344             * @param  primKey the primary key of the model instance to get
345             * @return the base model instance, or <code>null</code> if the model does
346             *         not have a base model instance (such as if its a portlet)
347             * @throws PortalException if a base model instance with the primary key
348             *         could not be found
349             * @throws SystemException if a system exception occurred
350             */
351            public BaseModel<?> getBaseModel(String modelName, String primKey)
352                    throws PortalException, SystemException;
353    
354            /**
355             * Returns the user's ID from the HTTP authentication headers after
356             * validating their credentials.
357             *
358             * @param  request the servlet request from which to retrieve the HTTP
359             *         authentication headers
360             * @return the user's ID if HTTP authentication headers are present and
361             *         their credentials are valid; 0 otherwise
362             * @throws PortalException if an authentication exception occurred
363             * @throws SystemException if a system exception occurred
364             */
365            public long getBasicAuthUserId(HttpServletRequest request)
366                    throws PortalException, SystemException;
367    
368            /**
369             * Returns the user's ID from the HTTP authentication headers after
370             * validation their credentials.
371             *
372             * @param  request the servlet request to retrieve the HTTP authentication
373             *         headers from
374             * @param  companyId unused
375             * @return the user's ID if HTTP authentication headers are present and
376             *         their credentials are valid; 0 otherwise
377             * @throws PortalException if an authentication exception occurred
378             * @throws SystemException if a system exception occurred
379             */
380            public long getBasicAuthUserId(HttpServletRequest request, long companyId)
381                    throws PortalException, SystemException;
382    
383            /**
384             * Returns the canonical URL of the page, to distinguish it among its
385             * translations.
386             *
387             * @param  completeURL the complete URL of the page
388             * @param  themeDisplay the current theme display
389             * @param  layout the layout. If it is <code>null</code>, then it is
390             *         generated for the current layout
391             * @return the canonical URL
392             * @throws PortalException if a friendly URL or the group could not be
393             *         retrieved
394             * @throws SystemException if a system exception occurred
395             */
396            public String getCanonicalURL(
397                            String completeURL, ThemeDisplay themeDisplay, Layout layout)
398                    throws PortalException, SystemException;
399    
400            /**
401             * Returns the canonical URL of the page, to distinguish it among its
402             * translations.
403             *
404             * @param  completeURL the complete URL of the page
405             * @param  themeDisplay the current theme display
406             * @param  layout the layout. If it is <code>null</code>, then it is
407             *         generated for the current layout
408             * @param  forceLayoutFriendlyURL adds the page friendly URL to the
409             *         canonical URL even if it is not needed
410             * @return the canonical URL
411             * @throws PortalException if a friendly URL or the group could not be
412             *         retrieved
413             * @throws SystemException if a system exception occurred
414             */
415            public String getCanonicalURL(
416                            String completeURL, ThemeDisplay themeDisplay, Layout layout,
417                            boolean forceLayoutFriendlyURL)
418                    throws PortalException, SystemException;
419    
420            /**
421             * @deprecated As of 6.2.0, replaced by the more general {@link
422             *             #getCDNHost(boolean)}
423             */
424            public String getCDNHost();
425    
426            /**
427             * Returns the secure (HTTPS) or insecure (HTTP) content distribution
428             * network (CDN) host address for this portal.
429             *
430             * @param  secure whether to get the secure or insecure CDN host address
431             * @return the CDN host address
432             */
433            public String getCDNHost(boolean secure);
434    
435            public String getCDNHost(HttpServletRequest request)
436                    throws PortalException, SystemException;
437    
438            /**
439             * Returns the insecure (HTTP) content distribution network (CDN) host
440             * address
441             *
442             * @param  companyId the company ID of a site
443             * @return the CDN host address
444             */
445            public String getCDNHostHttp(long companyId);
446    
447            /**
448             * Returns the secure (HTTPS) content distribution network (CDN) host
449             * address
450             *
451             * @param  companyId the company ID of a site
452             * @return the CDN host address
453             */
454            public String getCDNHostHttps(long companyId);
455    
456            /**
457             * Returns the fully qualified name of the class from its ID.
458             *
459             * @param  classNameId the ID of the class
460             * @return the fully qualified name of the class
461             */
462            public String getClassName(long classNameId);
463    
464            /**
465             * Returns the ID of the class from its class object.
466             *
467             * @param  clazz the class object
468             * @return the ID of the class
469             */
470            public long getClassNameId(Class<?> clazz);
471    
472            /**
473             * Returns the ID of the class from its fully qualified name.
474             *
475             * @param  value the fully qualified name of the class
476             * @return the ID of the class
477             */
478            public long getClassNameId(String value);
479    
480            /**
481             * Returns the ID of certain portlets from the fully qualified name of one
482             * of their classes. The portlets this method supports are: blogs,
483             * bookmarks, calendar, document library, image gallery, journal, message
484             * boards, and wiki.
485             *
486             * @param  className the fully qualified name of a class in a portlet
487             * @return the ID of the portlet the class is a part of, or an empty string
488             *         if the class is not supported
489             */
490            public String getClassNamePortletId(String className);
491    
492            public Company getCompany(HttpServletRequest request)
493                    throws PortalException, SystemException;
494    
495            public Company getCompany(PortletRequest portletRequest)
496                    throws PortalException, SystemException;
497    
498            public long getCompanyId(HttpServletRequest requestuest);
499    
500            public long getCompanyId(PortletRequest portletRequest);
501    
502            public long[] getCompanyIds();
503    
504            /**
505             * @deprecated As of 7.0.0, replaced by {@link #getComputerAddresses()}
506             */
507            @Deprecated
508            public String getComputerAddress();
509    
510            public Set<String> getComputerAddresses();
511    
512            public String getComputerName();
513    
514            public Map<String, List<Portlet>> getControlPanelCategoriesMap(
515                            HttpServletRequest request)
516                    throws SystemException;
517    
518            public String getControlPanelCategory(
519                            String portletId, ThemeDisplay themeDisplay)
520                    throws SystemException;
521    
522            public String getControlPanelFullURL(
523                            long scopeGroupId, String ppid, Map<String, String[]> params)
524                    throws PortalException, SystemException;
525    
526            public long getControlPanelPlid(long companyId)
527                    throws PortalException, SystemException;
528    
529            public long getControlPanelPlid(PortletRequest portletRequest)
530                    throws PortalException, SystemException;
531    
532            public Set<Portlet> getControlPanelPortlets(long companyId, String category)
533                    throws SystemException;
534    
535            public List<Portlet> getControlPanelPortlets(
536                            String category, ThemeDisplay themeDisplay)
537                    throws SystemException;
538    
539            public PortletURL getControlPanelPortletURL(
540                    HttpServletRequest request, String portletId, long referrerPlid,
541                    String lifecycle);
542    
543            public PortletURL getControlPanelPortletURL(
544                    PortletRequest portletRequest, String portletId, long referrerPlid,
545                    String lifecycle);
546    
547            public String getCreateAccountURL(
548                            HttpServletRequest request, ThemeDisplay themeDisplay)
549                    throws Exception;
550    
551            public String getCurrentCompleteURL(HttpServletRequest request);
552    
553            public String getCurrentURL(HttpServletRequest request);
554    
555            public String getCurrentURL(PortletRequest portletRequest);
556    
557            public String getCustomSQLFunctionIsNotNull();
558    
559            public String getCustomSQLFunctionIsNull();
560    
561            /**
562             * Returns the date object for the specified month, day, and year.
563             *
564             * @param  month the month (0-based, meaning 0 for January)
565             * @param  day the day of the month
566             * @param  year the year
567             * @return the date object
568             */
569            public Date getDate(int month, int day, int year);
570    
571            /**
572             * Returns the date object for the specified month, day, and year,
573             * optionally throwing an exception if the date is invalid.
574             *
575             * @param  month the month (0-based, meaning 0 for January)
576             * @param  day the day of the month
577             * @param  year the year
578             * @param  clazz the exception class to throw if the date is invalid. If
579             *         <code>null</code>, no exception will be thrown for an invalid
580             *         date.
581             * @return the date object, or <code>null</code> if the date is invalid and
582             *         no exception to throw was provided
583             * @throws PortalException if the date was invalid and <code>pe</code> was
584             *         not <code>null</code>
585             */
586            public Date getDate(
587                            int month, int day, int year,
588                            Class<? extends PortalException> clazz)
589                    throws PortalException;
590    
591            /**
592             * Returns the date object for the specified month, day, year, hour, and
593             * minute, optionally throwing an exception if the date is invalid.
594             *
595             * @param  month the month (0-based, meaning 0 for January)
596             * @param  day the day of the month
597             * @param  year the year
598             * @param  hour the hour (0-24)
599             * @param  min the minute of the hour
600             * @param  clazz the exception class to throw if the date is invalid. If
601             *         <code>null</code>, no exception will be thrown for an invalid
602             *         date.
603             * @return the date object, or <code>null</code> if the date is invalid and
604             *         no exception to throw was provided
605             * @throws PortalException if the date was invalid and <code>pe</code> was
606             *         not <code>null</code>
607             */
608            public Date getDate(
609                            int month, int day, int year, int hour, int min,
610                            Class<? extends PortalException> clazz)
611                    throws PortalException;
612    
613            /**
614             * Returns the date object for the specified month, day, year, hour, minute,
615             * and time zone, optionally throwing an exception if the date is invalid.
616             *
617             * @param  month the month (0-based, meaning 0 for January)
618             * @param  day the day of the month
619             * @param  year the year
620             * @param  hour the hour (0-24)
621             * @param  min the minute of the hour
622             * @param  timeZone the time zone of the date
623             * @param  clazz the exception class to throw if the date is invalid. If
624             *         <code>null</code>, no exception will be thrown for an invalid
625             *         date.
626             * @return the date object, or <code>null</code> if the date is invalid and
627             *         no exception to throw was provided
628             * @throws PortalException if the date was invalid and <code>pe</code> was
629             *         not <code>null</code>
630             */
631            public Date getDate(
632                            int month, int day, int year, int hour, int min, TimeZone timeZone,
633                            Class<? extends PortalException> clazz)
634                    throws PortalException;
635    
636            /**
637             * Returns the date object for the specified month, day, year, and time
638             * zone, optionally throwing an exception if the date is invalid.
639             *
640             * @param  month the month (0-based, meaning 0 for January)
641             * @param  day the day of the month
642             * @param  year the year
643             * @param  timeZone the time zone of the date
644             * @param  clazz the exception class to throw if the date is invalid. If
645             *         <code>null</code>, no exception will be thrown for an invalid
646             *         date.
647             * @return the date object, or <code>null</code> if the date is invalid and
648             *         no exception to throw was provided
649             * @throws PortalException if the date was invalid and <code>pe</code> was
650             *         not <code>null</code>
651             */
652            public Date getDate(
653                            int month, int day, int year, TimeZone timeZone,
654                            Class<? extends PortalException> clazz)
655                    throws PortalException;
656    
657            public long getDefaultCompanyId();
658    
659            public long getDigestAuthUserId(HttpServletRequest request)
660                    throws PortalException, SystemException;
661    
662            public String getDisplayURL(Group group, ThemeDisplay themeDisplay)
663                    throws PortalException;
664    
665            public String getDisplayURL(
666                            Group group, ThemeDisplay themeDisplay, boolean privateLayout)
667                    throws PortalException;
668    
669            public String getEmailFromAddress(
670                            PortletPreferences preferences, long companyId, String defaultValue)
671                    throws SystemException;
672    
673            public String getEmailFromName(
674                            PortletPreferences preferences, long companyId, String defaultValue)
675                    throws SystemException;
676    
677            public Map<String, Serializable> getExpandoBridgeAttributes(
678                            ExpandoBridge expandoBridge, HttpServletRequest request)
679                    throws PortalException, SystemException;
680    
681            public Map<String, Serializable> getExpandoBridgeAttributes(
682                            ExpandoBridge expandoBridge, PortletRequest portletRequest)
683                    throws PortalException, SystemException;
684    
685            public Map<String, Serializable> getExpandoBridgeAttributes(
686                            ExpandoBridge expandoBridge,
687                            UploadPortletRequest uploadPortletRequest)
688                    throws PortalException, SystemException;
689    
690            public Serializable getExpandoValue(
691                            HttpServletRequest request, String name, int type,
692                            String displayType)
693                    throws PortalException, SystemException;
694    
695            public Serializable getExpandoValue(
696                            PortletRequest portletRequest, String name, int type,
697                            String displayType)
698                    throws PortalException, SystemException;
699    
700            public Serializable getExpandoValue(
701                            UploadPortletRequest uploadPortletRequest, String name, int type,
702                            String displayType)
703                    throws PortalException, SystemException;
704    
705            public String getFacebookURL(
706                            Portlet portlet, String facebookCanvasPageURL,
707                            ThemeDisplay themeDisplay)
708                    throws PortalException, SystemException;
709    
710            public Portlet getFirstMyAccountPortlet(ThemeDisplay themeDisplay)
711                    throws SystemException;
712    
713            public String getFirstPageLayoutTypes(PageContext pageContext);
714    
715            public Portlet getFirstSiteAdministrationPortlet(ThemeDisplay themeDisplay)
716                    throws SystemException;
717    
718            public String getFullName(
719                    String firstName, String middleName, String lastName);
720    
721            public String getGlobalLibDir();
722    
723            public String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay)
724                    throws PortalException, SystemException;
725    
726            public String getGroupFriendlyURL(
727                            Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay)
728                    throws PortalException, SystemException;
729    
730            public String getGroupFriendlyURL(
731                            Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay,
732                            Locale locale)
733                    throws PortalException, SystemException;
734    
735            public int[] getGroupFriendlyURLIndex(String requestURI);
736    
737            public String[] getGroupPermissions(HttpServletRequest request);
738    
739            public String[] getGroupPermissions(
740                    HttpServletRequest request, String className);
741    
742            public String[] getGroupPermissions(PortletRequest portletRequest);
743    
744            public String[] getGroupPermissions(
745                    PortletRequest portletRequest, String className);
746    
747            public String[] getGuestPermissions(HttpServletRequest request);
748    
749            public String[] getGuestPermissions(
750                    HttpServletRequest request, String className);
751    
752            public String[] getGuestPermissions(PortletRequest portletRequest);
753    
754            public String[] getGuestPermissions(
755                    PortletRequest portletRequest, String className);
756    
757            public String getHomeURL(HttpServletRequest request)
758                    throws PortalException, SystemException;
759    
760            public String getHost(HttpServletRequest request);
761    
762            public String getHost(PortletRequest portletRequest);
763    
764            public HttpServletRequest getHttpServletRequest(
765                    PortletRequest portletRequest);
766    
767            public HttpServletResponse getHttpServletResponse(
768                    PortletResponse portletResponse);
769    
770            public String getI18nPathLanguageId(
771                    Locale locale, String defaultI18nPathLanguageId);
772    
773            public String getJournalArticleActualURL(
774                            long groupId, boolean privateLayout, String mainPath,
775                            String friendlyURL, Map<String, String[]> params,
776                            Map<String, Object> requestContext)
777                    throws PortalException, SystemException;
778    
779            public Layout getJournalArticleLayout(
780                            long groupId, boolean privateLayout, String friendlyURL)
781                    throws PortalException, SystemException;
782    
783            public String getJsSafePortletId(String portletId);
784    
785            public String getLayoutActualURL(Layout layout);
786    
787            public String getLayoutActualURL(Layout layout, String mainPath);
788    
789            public String getLayoutActualURL(
790                            long groupId, boolean privateLayout, String mainPath,
791                            String friendlyURL)
792                    throws PortalException, SystemException;
793    
794            public String getLayoutActualURL(
795                            long groupId, boolean privateLayout, String mainPath,
796                            String friendlyURL, Map<String, String[]> params,
797                            Map<String, Object> requestContext)
798                    throws PortalException, SystemException;
799    
800            public String getLayoutEditPage(Layout layout);
801    
802            public String getLayoutEditPage(String type);
803    
804            public String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay)
805                    throws PortalException, SystemException;
806    
807            public String getLayoutFriendlyURL(
808                            Layout layout, ThemeDisplay themeDisplay, Locale locale)
809                    throws PortalException, SystemException;
810    
811            public LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
812                            long groupId, boolean privateLayout, String friendlyURL,
813                            Map<String, String[]> params, Map<String, Object> requestContext)
814                    throws PortalException, SystemException;
815    
816            public String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay)
817                    throws PortalException, SystemException;
818    
819            public String getLayoutFullURL(
820                            Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
821                    throws PortalException, SystemException;
822    
823            public String getLayoutFullURL(long groupId, String portletId)
824                    throws PortalException, SystemException;
825    
826            public String getLayoutFullURL(
827                            long groupId, String portletId, boolean secure)
828                    throws PortalException, SystemException;
829    
830            public String getLayoutFullURL(ThemeDisplay themeDisplay)
831                    throws PortalException, SystemException;
832    
833            public String getLayoutSetFriendlyURL(
834                            LayoutSet layoutSet, ThemeDisplay themeDisplay)
835                    throws PortalException, SystemException;
836    
837            public String getLayoutTarget(Layout layout);
838    
839            public String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
840                    throws PortalException, SystemException;
841    
842            public String getLayoutURL(
843                            Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
844                    throws PortalException, SystemException;
845    
846            public String getLayoutURL(
847                            Layout layout, ThemeDisplay themeDisplay, Locale locale)
848                    throws PortalException, SystemException;
849    
850            public String getLayoutURL(ThemeDisplay themeDisplay)
851                    throws PortalException, SystemException;
852    
853            public String getLayoutViewPage(Layout layout);
854    
855            public String getLayoutViewPage(String type);
856    
857            public LiferayPortletRequest getLiferayPortletRequest(
858                    PortletRequest portletRequest);
859    
860            public LiferayPortletResponse getLiferayPortletResponse(
861                    PortletResponse portletResponse);
862    
863            public Locale getLocale(HttpServletRequest request);
864    
865            public Locale getLocale(
866                    HttpServletRequest request, HttpServletResponse response,
867                    boolean initialize);
868    
869            public Locale getLocale(PortletRequest portletRequest);
870    
871            public String getLocalizedFriendlyURL(
872                            HttpServletRequest request, Layout layout, Locale locale,
873                            Locale originalLocale)
874                    throws Exception;
875    
876            public String getMailId(String mx, String popPortletPrefix, Object... ids);
877    
878            public String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay)
879                    throws PortalException, SystemException;
880    
881            public String getNewPortletTitle(
882                    String portletTitle, String oldScopeName, String newScopeName);
883    
884            public HttpServletRequest getOriginalServletRequest(
885                    HttpServletRequest request);
886    
887            /**
888             * @deprecated As of 6.2.0 renamed to {@link #getSiteGroupId(long)}
889             */
890            public long getParentGroupId(long scopeGroupId)
891                    throws PortalException, SystemException;
892    
893            public String getPathContext();
894    
895            public String getPathContext(HttpServletRequest request);
896    
897            public String getPathContext(PortletRequest portletRequest);
898    
899            public String getPathContext(String contextPath);
900    
901            public String getPathFriendlyURLPrivateGroup();
902    
903            public String getPathFriendlyURLPrivateUser();
904    
905            public String getPathFriendlyURLPublic();
906    
907            public String getPathImage();
908    
909            public String getPathMain();
910    
911            public String getPathModule();
912    
913            public String getPathProxy();
914    
915            public long getPlidFromFriendlyURL(long companyId, String friendlyURL);
916    
917            public long getPlidFromPortletId(
918                            long groupId, boolean privateLayout, String portletId)
919                    throws PortalException, SystemException;
920    
921            public long getPlidFromPortletId(long groupId, String portletId)
922                    throws PortalException, SystemException;
923    
924            public String getPortalLibDir();
925    
926            /**
927             * @deprecated As of 6.2.0, replaced by the more general {@link
928             *             #getPortalPort(boolean)}
929             */
930            public int getPortalPort();
931    
932            public int getPortalPort(boolean secure);
933    
934            public Properties getPortalProperties();
935    
936            public String getPortalURL(HttpServletRequest request);
937    
938            public String getPortalURL(HttpServletRequest request, boolean secure);
939    
940            public String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
941                    throws PortalException, SystemException;
942    
943            public String getPortalURL(LayoutSet layoutSet, ThemeDisplay themeDisplay);
944    
945            public String getPortalURL(PortletRequest portletRequest);
946    
947            public String getPortalURL(PortletRequest portletRequest, boolean secure);
948    
949            public String getPortalURL(
950                    String serverName, int serverPort, boolean secure);
951    
952            public String getPortalURL(ThemeDisplay themeDisplay)
953                    throws PortalException, SystemException;
954    
955            public String getPortalWebDir();
956    
957            /**
958             * @deprecated As of 6.2.0, replaced by {@link
959             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletInvocationWhitelist}
960             */
961            public Set<String> getPortletAddDefaultResourceCheckWhitelist();
962    
963            /**
964             * @deprecated As of 6.2.0, replaced by {@link
965             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletInvocationWhitelistActions}
966             */
967            public Set<String> getPortletAddDefaultResourceCheckWhitelistActions();
968    
969            /**
970             * @deprecated As of 6.2.0, replaced by {@link
971             *             #getPortletBreadcrumbs(HttpServletRequest)}
972             */
973            public List<BreadcrumbEntry> getPortletBreadcrumbList(
974                    HttpServletRequest request);
975    
976            public List<BreadcrumbEntry> getPortletBreadcrumbs(
977                    HttpServletRequest request);
978    
979            public PortletConfig getPortletConfig(
980                            long companyId, String portletId, ServletContext servletContext)
981                    throws PortletException, SystemException;
982    
983            public String getPortletDescription(
984                    Portlet portlet, ServletContext servletContext, Locale locale);
985    
986            public String getPortletDescription(Portlet portlet, User user);
987    
988            public String getPortletDescription(String portletId, Locale locale);
989    
990            public String getPortletDescription(String portletId, String languageId);
991    
992            public String getPortletDescription(String portletId, User user);
993    
994            public String getPortletId(HttpServletRequest request);
995    
996            public String getPortletId(PortletRequest portletRequest);
997    
998            public String getPortletLongTitle(Portlet portlet, Locale locale);
999    
1000            public String getPortletLongTitle(
1001                    Portlet portlet, ServletContext servletContext, Locale locale);
1002    
1003            public String getPortletLongTitle(Portlet portlet, String languageId);
1004    
1005            public String getPortletLongTitle(Portlet portlet, User user);
1006    
1007            public String getPortletLongTitle(String portletId, Locale locale);
1008    
1009            public String getPortletLongTitle(String portletId, String languageId);
1010    
1011            public String getPortletLongTitle(String portletId, User user);
1012    
1013            public String getPortletNamespace(String portletId);
1014    
1015            public String getPortletTitle(Portlet portlet, Locale locale);
1016    
1017            public String getPortletTitle(
1018                    Portlet portlet, ServletContext servletContext, Locale locale);
1019    
1020            public String getPortletTitle(Portlet portlet, String languageId);
1021    
1022            public String getPortletTitle(Portlet portlet, User user);
1023    
1024            public String getPortletTitle(RenderRequest renderRequest);
1025    
1026            public String getPortletTitle(RenderResponse renderResponse);
1027    
1028            public String getPortletTitle(String portletId, Locale locale);
1029    
1030            public String getPortletTitle(String portletId, String languageId);
1031    
1032            public String getPortletTitle(String portletId, User user);
1033    
1034            public String getPortletXmlFileName() throws SystemException;
1035    
1036            public PortletPreferences getPreferences(HttpServletRequest request);
1037    
1038            public PreferencesValidator getPreferencesValidator(Portlet portlet);
1039    
1040            public String getRelativeHomeURL(HttpServletRequest request)
1041                    throws PortalException, SystemException;
1042    
1043            public long getScopeGroupId(HttpServletRequest request)
1044                    throws PortalException, SystemException;
1045    
1046            public long getScopeGroupId(HttpServletRequest request, String portletId)
1047                    throws PortalException, SystemException;
1048    
1049            public long getScopeGroupId(
1050                            HttpServletRequest request, String portletId,
1051                            boolean checkStagingGroup)
1052                    throws PortalException, SystemException;
1053    
1054            public long getScopeGroupId(Layout layout);
1055    
1056            public long getScopeGroupId(Layout layout, String portletId);
1057    
1058            public long getScopeGroupId(long plid);
1059    
1060            public long getScopeGroupId(PortletRequest portletRequest)
1061                    throws PortalException, SystemException;
1062    
1063            public User getSelectedUser(HttpServletRequest request)
1064                    throws PortalException, SystemException;
1065    
1066            public User getSelectedUser(
1067                            HttpServletRequest request, boolean checkPermission)
1068                    throws PortalException, SystemException;
1069    
1070            public User getSelectedUser(PortletRequest portletRequest)
1071                    throws PortalException, SystemException;
1072    
1073            public User getSelectedUser(
1074                            PortletRequest portletRequest, boolean checkPermission)
1075                    throws PortalException, SystemException;
1076    
1077            public String getServletContextName();
1078    
1079            public long[] getSharedContentSiteGroupIds(
1080                            long companyId, long groupId, long userId)
1081                    throws PortalException, SystemException;
1082    
1083            public Map<String, List<Portlet>> getSiteAdministrationCategoriesMap(
1084                            HttpServletRequest request)
1085                    throws SystemException;
1086    
1087            public PortletURL getSiteAdministrationURL(
1088                            HttpServletRequest request, ThemeDisplay themeDisplay)
1089                    throws SystemException;
1090    
1091            public PortletURL getSiteAdministrationURL(
1092                    HttpServletRequest request, ThemeDisplay themeDisplay,
1093                    String portletName);
1094    
1095            public PortletURL getSiteAdministrationURL(
1096                            PortletResponse portletResponse, ThemeDisplay themeDisplay)
1097                    throws SystemException;
1098    
1099            public PortletURL getSiteAdministrationURL(
1100                    PortletResponse portletResponse, ThemeDisplay themeDisplay,
1101                    String portletName);
1102    
1103            public long[] getSiteAndCompanyGroupIds(long groupId)
1104                    throws PortalException, SystemException;
1105    
1106            public long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
1107                    throws PortalException, SystemException;
1108    
1109            public Locale getSiteDefaultLocale(long groupId)
1110                    throws PortalException, SystemException;
1111    
1112            public long getSiteGroupId(long groupId)
1113                    throws PortalException, SystemException;
1114    
1115            /**
1116             * Returns the URL of the login page for the current site if one is
1117             * available.
1118             *
1119             * @param  themeDisplay the theme display for the current page
1120             * @return the URL of the login page for the current site, or
1121             *         <code>null</code> if one is not available
1122             * @throws PortalException if a portal exception occurred
1123             * @throws SystemException if a system exception occurred
1124             */
1125            public String getSiteLoginURL(ThemeDisplay themeDisplay)
1126                    throws PortalException, SystemException;
1127    
1128            public String getStaticResourceURL(HttpServletRequest request, String uri);
1129    
1130            public String getStaticResourceURL(
1131                    HttpServletRequest request, String uri, long timestamp);
1132    
1133            public String getStaticResourceURL(
1134                    HttpServletRequest request, String uri, String queryString);
1135    
1136            public String getStaticResourceURL(
1137                    HttpServletRequest request, String uri, String queryString,
1138                    long timestamp);
1139    
1140            public String getStrutsAction(HttpServletRequest request);
1141    
1142            public String[] getSystemGroups();
1143    
1144            public String[] getSystemOrganizationRoles();
1145    
1146            public String[] getSystemRoles();
1147    
1148            public String[] getSystemSiteRoles();
1149    
1150            public String getUniqueElementId(
1151                    HttpServletRequest request, String namespace, String id);
1152    
1153            public String getUniqueElementId(
1154                    PortletRequest request, String namespace, String id);
1155    
1156            public UploadPortletRequest getUploadPortletRequest(
1157                    PortletRequest portletRequest);
1158    
1159            public UploadServletRequest getUploadServletRequest(
1160                    HttpServletRequest request);
1161    
1162            public Date getUptime();
1163    
1164            public String getURLWithSessionId(String url, String sessionId);
1165    
1166            public User getUser(HttpServletRequest request)
1167                    throws PortalException, SystemException;
1168    
1169            public User getUser(PortletRequest portletRequest)
1170                    throws PortalException, SystemException;
1171    
1172            public String getUserEmailAddress(long userId) throws SystemException;
1173    
1174            public long getUserId(HttpServletRequest request);
1175    
1176            public long getUserId(PortletRequest portletRequest);
1177    
1178            public String getUserName(BaseModel<?> baseModel);
1179    
1180            public String getUserName(long userId, String defaultUserName);
1181    
1182            public String getUserName(
1183                    long userId, String defaultUserName, HttpServletRequest request);
1184    
1185            public String getUserName(
1186                    long userId, String defaultUserName, String userAttribute);
1187    
1188            public String getUserName(
1189                    long userId, String defaultUserName, String userAttribute,
1190                    HttpServletRequest request);
1191    
1192            public String getUserPassword(HttpServletRequest request);
1193    
1194            public String getUserPassword(HttpSession session);
1195    
1196            public String getUserPassword(PortletRequest portletRequest);
1197    
1198            public String getUserValue(long userId, String param, String defaultValue)
1199                    throws SystemException;
1200    
1201            public String getValidPortalDomain(long companyId, String domain);
1202    
1203            public long getValidUserId(long companyId, long userId)
1204                    throws PortalException, SystemException;
1205    
1206            public String getVirtualLayoutActualURL(
1207                            long groupId, boolean privateLayout, String mainPath,
1208                            String friendlyURL, Map<String, String[]> params,
1209                            Map<String, Object> requestContext)
1210                    throws PortalException, SystemException;
1211    
1212            public LayoutFriendlyURLComposite getVirtualLayoutFriendlyURLComposite(
1213                            boolean privateLayout, String friendlyURL,
1214                            Map<String, String[]> params, Map<String, Object> requestContext)
1215                    throws PortalException, SystemException;
1216    
1217            public String getWidgetURL(Portlet portlet, ThemeDisplay themeDisplay)
1218                    throws PortalException, SystemException;
1219    
1220            public void initCustomSQL();
1221    
1222            public User initUser(HttpServletRequest request) throws Exception;
1223    
1224            public void invokeTaglibDiscussion(
1225                            PortletConfig portletConfig, ActionRequest actionRequest,
1226                            ActionResponse actionResponse)
1227                    throws Exception;
1228    
1229            /**
1230             * @deprecated As of 6.2.0 with no direct replacement
1231             */
1232            public boolean isAllowAddPortletDefaultResource(
1233                            HttpServletRequest request, Portlet portlet)
1234                    throws PortalException, SystemException;
1235    
1236            public boolean isCDNDynamicResourcesEnabled(HttpServletRequest request)
1237                    throws PortalException, SystemException;
1238    
1239            public boolean isCDNDynamicResourcesEnabled(long companyId);
1240    
1241            /**
1242             * @deprecated As of 6.1.0, renamed to {@link #isGroupAdmin(User, long)}
1243             */
1244            public boolean isCommunityAdmin(User user, long groupId) throws Exception;
1245    
1246            /**
1247             * @deprecated As of 6.1.0, renamed to {@link #isGroupOwner(User, long)}
1248             */
1249            public boolean isCommunityOwner(User user, long groupId) throws Exception;
1250    
1251            public boolean isCompanyAdmin(User user) throws Exception;
1252    
1253            public boolean isCompanyControlPanelPortlet(
1254                            String portletId, String category, ThemeDisplay themeDisplay)
1255                    throws PortalException, SystemException;
1256    
1257            public boolean isCompanyControlPanelPortlet(
1258                            String portletId, ThemeDisplay themeDisplay)
1259                    throws PortalException, SystemException;
1260    
1261            public boolean isCompanyControlPanelVisible(ThemeDisplay themeDisplay)
1262                    throws PortalException, SystemException;
1263    
1264            public boolean isControlPanelPortlet(
1265                            String portletId, String category, ThemeDisplay themeDisplay)
1266                    throws SystemException;
1267    
1268            public boolean isControlPanelPortlet(
1269                            String portletId, ThemeDisplay themeDisplay)
1270                    throws SystemException;
1271    
1272            public boolean isGroupAdmin(User user, long groupId) throws Exception;
1273    
1274            public boolean isGroupFriendlyURL(
1275                    String fullURL, String groupFriendlyURL, String layoutFriendlyURL);
1276    
1277            public boolean isGroupOwner(User user, long groupId) throws Exception;
1278    
1279            public boolean isLayoutDescendant(Layout layout, long layoutId)
1280                    throws PortalException, SystemException;
1281    
1282            public boolean isLayoutFirstPageable(Layout layout);
1283    
1284            public boolean isLayoutFirstPageable(String type);
1285    
1286            public boolean isLayoutFriendliable(Layout layout);
1287    
1288            public boolean isLayoutFriendliable(String type);
1289    
1290            public boolean isLayoutParentable(Layout layout);
1291    
1292            public boolean isLayoutParentable(String type);
1293    
1294            public boolean isLayoutSitemapable(Layout layout);
1295    
1296            public boolean isLoginRedirectRequired(HttpServletRequest request)
1297                    throws SystemException;
1298    
1299            public boolean isMethodGet(PortletRequest portletRequest);
1300    
1301            public boolean isMethodPost(PortletRequest portletRequest);
1302    
1303            public boolean isMultipartRequest(HttpServletRequest request);
1304    
1305            public boolean isOmniadmin(long userId);
1306    
1307            public boolean isOmniadmin(User user);
1308    
1309            public boolean isReservedParameter(String name);
1310    
1311            public boolean isRightToLeft(HttpServletRequest request);
1312    
1313            public boolean isRSSFeedsEnabled();
1314    
1315            public boolean isSecure(HttpServletRequest request);
1316    
1317            public boolean isSkipPortletContentProcessing(
1318                            Group group, HttpServletRequest httpServletRequest,
1319                            LayoutTypePortlet layoutTypePortlet, PortletDisplay portletDisplay,
1320                            String portletName)
1321                    throws Exception;
1322    
1323            public boolean isSkipPortletContentRendering(
1324                            Group group, LayoutTypePortlet layoutTypePortlet,
1325                            PortletDisplay portletDisplay, String portletName)
1326                    throws PortalException, SystemException;
1327    
1328            public boolean isSystemGroup(String groupName);
1329    
1330            public boolean isSystemRole(String roleName);
1331    
1332            public boolean isUpdateAvailable() throws SystemException;
1333    
1334            public boolean isValidResourceId(String resourceId);
1335    
1336            public void removePortalPortEventListener(
1337                    PortalPortEventListener portalPortEventListener);
1338    
1339            public void resetCDNHosts();
1340    
1341            /**
1342             * @deprecated As of 6.2.0, replaced by {@link
1343             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#resetPortletInvocationWhitelist}
1344             */
1345            public Set<String> resetPortletAddDefaultResourceCheckWhitelist();
1346    
1347            /**
1348             * @deprecated As of 6.2.0, replaced by {@link
1349             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#resetPortletInvocationWhitelistActions}
1350             */
1351            public Set<String> resetPortletAddDefaultResourceCheckWhitelistActions();
1352    
1353            public String resetPortletParameters(String url, String portletId);
1354    
1355            public void sendError(
1356                            Exception e, ActionRequest actionRequest,
1357                            ActionResponse actionResponse)
1358                    throws IOException;
1359    
1360            public void sendError(
1361                            Exception e, HttpServletRequest request,
1362                            HttpServletResponse response)
1363                    throws IOException, ServletException;
1364    
1365            public void sendError(
1366                            int status, Exception e, ActionRequest actionRequest,
1367                            ActionResponse actionResponse)
1368                    throws IOException;
1369    
1370            public void sendError(
1371                            int status, Exception e, HttpServletRequest request,
1372                            HttpServletResponse response)
1373                    throws IOException, ServletException;
1374    
1375            public void sendRSSFeedsDisabledError(
1376                            HttpServletRequest request, HttpServletResponse response)
1377                    throws IOException, ServletException;
1378    
1379            public void sendRSSFeedsDisabledError(
1380                            PortletRequest portletRequest, PortletResponse portletResponse)
1381                    throws IOException, ServletException;
1382    
1383            /**
1384             * Sets the description for the page, overriding the existing page
1385             * description.
1386             */
1387            public void setPageDescription(
1388                    String description, HttpServletRequest request);
1389    
1390            /**
1391             * Sets the keywords for the page, overriding the existing page keywords.
1392             */
1393            public void setPageKeywords(String keywords, HttpServletRequest request);
1394    
1395            /**
1396             * Sets the subtitle for the page, overriding the existing page subtitle.
1397             */
1398            public void setPageSubtitle(String subtitle, HttpServletRequest request);
1399    
1400            /**
1401             * Sets the whole title for the page, overriding the existing page whole
1402             * title.
1403             */
1404            public void setPageTitle(String title, HttpServletRequest request);
1405    
1406            /**
1407             * Sets the port obtained on the first request to the portal.
1408             */
1409            public void setPortalPort(HttpServletRequest request);
1410    
1411            public void storePreferences(PortletPreferences portletPreferences)
1412                    throws IOException, ValidatorException;
1413    
1414            public String[] stripURLAnchor(String url, String separator);
1415    
1416            public String transformCustomSQL(String sql);
1417    
1418            public String transformSQL(String sql);
1419    
1420            public PortletMode updatePortletMode(
1421                            String portletId, User user, Layout layout, PortletMode portletMode,
1422                            HttpServletRequest request)
1423                    throws PortalException, SystemException;
1424    
1425            public String updateRedirect(
1426                    String redirect, String oldPath, String newPath);
1427    
1428            public WindowState updateWindowState(
1429                    String portletId, User user, Layout layout, WindowState windowState,
1430                    HttpServletRequest request);
1431    
1432    }