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