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