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