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