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            /**
489             * Returns the ID of certain portlets from the fully qualified name of one
490             * of their classes. The portlets this method supports are: blogs,
491             * calendar, document library, image gallery, journal, message boards, and
492             * wiki.
493             *
494             * @param  className the fully qualified name of a class in a portlet
495             * @return the ID of the portlet the class is a part of, or an empty string
496             *         if the class is not supported
497             */
498            public String getClassNamePortletId(String className);
499    
500            public Company getCompany(HttpServletRequest request)
501                    throws PortalException;
502    
503            public Company getCompany(PortletRequest portletRequest)
504                    throws PortalException;
505    
506            public long getCompanyId(HttpServletRequest requestuest);
507    
508            public long getCompanyId(PortletRequest portletRequest);
509    
510            public long[] getCompanyIds();
511    
512            public String getComputerAddress();
513    
514            public String getComputerName();
515    
516            public Map<String, List<Portlet>> getControlPanelCategoriesMap(
517                    HttpServletRequest request);
518    
519            public String getControlPanelCategory(
520                    String portletId, ThemeDisplay themeDisplay);
521    
522            public String getControlPanelFullURL(
523                            long scopeGroupId, String ppid, Map<String, String[]> params)
524                    throws PortalException;
525    
526            public long getControlPanelPlid(long companyId) throws PortalException;
527    
528            public long getControlPanelPlid(PortletRequest portletRequest)
529                    throws PortalException;
530    
531            public Set<Portlet> getControlPanelPortlets(
532                    long companyId, String category);
533    
534            public List<Portlet> getControlPanelPortlets(
535                    String category, ThemeDisplay themeDisplay);
536    
537            public PortletURL getControlPanelPortletURL(
538                    HttpServletRequest request, String portletId, long referrerPlid,
539                    String lifecycle);
540    
541            public PortletURL getControlPanelPortletURL(
542                    PortletRequest portletRequest, String portletId, long referrerPlid,
543                    String lifecycle);
544    
545            public String getCreateAccountURL(
546                            HttpServletRequest request, ThemeDisplay themeDisplay)
547                    throws Exception;
548    
549            public long[] getCurrentAndAncestorSiteGroupIds(long groupId)
550                    throws PortalException;
551    
552            public List<Group> getCurrentAndAncestorSiteGroups(long groupId)
553                    throws PortalException;
554    
555            public String getCurrentCompleteURL(HttpServletRequest request);
556    
557            public String getCurrentURL(HttpServletRequest request);
558    
559            public String getCurrentURL(PortletRequest portletRequest);
560    
561            public String getCustomSQLFunctionIsNotNull();
562    
563            public String getCustomSQLFunctionIsNull();
564    
565            /**
566             * Returns the date object for the specified month, day, and year, or
567             * <code>null</code> if the date is invalid.
568             *
569             * @param  month the month (0-based, meaning 0 for January)
570             * @param  day the day of the month
571             * @param  year the year
572             * @return the date object, or <code>null</code> if the date is invalid
573             */
574            public Date getDate(int month, int day, int year);
575    
576            /**
577             * Returns the date object for the specified month, day, and year,
578             * optionally throwing an exception if the date is invalid.
579             *
580             * @param  month the month (0-based, meaning 0 for January)
581             * @param  day the day of the month
582             * @param  year the year
583             * @param  clazz the exception class to throw if the date is invalid. If
584             *         <code>null</code>, no exception will be thrown for an invalid
585             *         date.
586             * @return the date object, or <code>null</code> if the date is invalid and
587             *         no exception to throw was provided
588             * @throws PortalException if the date was invalid and <code>clazz</code>
589             *         was not <code>null</code>
590             */
591            public Date getDate(
592                            int month, int day, int year,
593                            Class<? extends PortalException> clazz)
594                    throws PortalException;
595    
596            /**
597             * Returns the date object for the specified month, day, year, hour, and
598             * minute, optionally throwing an exception if the date is invalid.
599             *
600             * @param  month the month (0-based, meaning 0 for January)
601             * @param  day the day of the month
602             * @param  year the year
603             * @param  hour the hour (0-24)
604             * @param  min the minute of the hour
605             * @param  clazz the exception class to throw if the date is invalid. If
606             *         <code>null</code>, no exception will be thrown for an invalid
607             *         date.
608             * @return the date object, or <code>null</code> if the date is invalid and
609             *         no exception to throw was provided
610             * @throws PortalException if the date was invalid and <code>clazz</code>
611             *         was not <code>null</code>
612             */
613            public Date getDate(
614                            int month, int day, int year, int hour, int min,
615                            Class<? extends PortalException> clazz)
616                    throws PortalException;
617    
618            /**
619             * Returns the date object for the specified month, day, year, hour, minute,
620             * and time zone, optionally throwing an exception if the date is invalid.
621             *
622             * @param  month the month (0-based, meaning 0 for January)
623             * @param  day the day of the month
624             * @param  year the year
625             * @param  hour the hour (0-24)
626             * @param  min the minute of the hour
627             * @param  timeZone the time zone of the date
628             * @param  clazz the exception class to throw if the date is invalid. If
629             *         <code>null</code>, no exception will be thrown for an invalid
630             *         date.
631             * @return the date object, or <code>null</code> if the date is invalid and
632             *         no exception to throw was provided
633             * @throws PortalException if the date was invalid and <code>clazz</code>
634             *         was not <code>null</code>
635             */
636            public Date getDate(
637                            int month, int day, int year, int hour, int min, TimeZone timeZone,
638                            Class<? extends PortalException> clazz)
639                    throws PortalException;
640    
641            /**
642             * Returns the date object for the specified month, day, year, and time
643             * zone, optionally throwing an exception if the date is invalid.
644             *
645             * @param  month the month (0-based, meaning 0 for January)
646             * @param  day the day of the month
647             * @param  year the year
648             * @param  timeZone the time zone of the date
649             * @param  clazz the exception class to throw if the date is invalid. If
650             *         <code>null</code>, no exception will be thrown for an invalid
651             *         date.
652             * @return the date object, or <code>null</code> if the date is invalid and
653             *         no exception to throw was provided
654             * @throws PortalException if the date was invalid and <code>clazz</code>
655             *         was not <code>null</code>
656             */
657            public Date getDate(
658                            int month, int day, int year, TimeZone timeZone,
659                            Class<? extends PortalException> clazz)
660                    throws PortalException;
661    
662            public long getDefaultCompanyId();
663    
664            public long getDigestAuthUserId(HttpServletRequest request)
665                    throws PortalException;
666    
667            public String getEmailFromAddress(
668                    PortletPreferences preferences, long companyId, String defaultValue);
669    
670            public String getEmailFromName(
671                    PortletPreferences preferences, long companyId, String defaultValue);
672    
673            public Map<String, Serializable> getExpandoBridgeAttributes(
674                            ExpandoBridge expandoBridge, PortletRequest portletRequest)
675                    throws PortalException;
676    
677            public Map<String, Serializable> getExpandoBridgeAttributes(
678                            ExpandoBridge expandoBridge,
679                            UploadPortletRequest uploadPortletRequest)
680                    throws PortalException;
681    
682            public Serializable getExpandoValue(
683                            PortletRequest portletRequest, String name, int type,
684                            String displayType)
685                    throws PortalException;
686    
687            public Serializable getExpandoValue(
688                            UploadPortletRequest uploadPortletRequest, String name, int type,
689                            String displayType)
690                    throws PortalException;
691    
692            public String getFacebookURL(
693                            Portlet portlet, String facebookCanvasPageURL,
694                            ThemeDisplay themeDisplay)
695                    throws PortalException;
696    
697            public Portlet getFirstMyAccountPortlet(ThemeDisplay themeDisplay);
698    
699            public String getFirstPageLayoutTypes(HttpServletRequest request);
700    
701            public Portlet getFirstSiteAdministrationPortlet(ThemeDisplay themeDisplay);
702    
703            public String getFullName(
704                    String firstName, String middleName, String lastName);
705    
706            public String getGlobalLibDir();
707    
708            public String getGoogleGadgetURL(Portlet portlet, ThemeDisplay themeDisplay)
709                    throws PortalException;
710    
711            public String getGroupFriendlyURL(
712                            Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay)
713                    throws PortalException;
714    
715            public String getGroupFriendlyURL(
716                            Group group, boolean privateLayoutSet, ThemeDisplay themeDisplay,
717                            Locale locale)
718                    throws PortalException;
719    
720            public int[] getGroupFriendlyURLIndex(String requestURI);
721    
722            public String[] getGroupPermissions(HttpServletRequest request);
723    
724            public String[] getGroupPermissions(
725                    HttpServletRequest request, String className);
726    
727            public String[] getGroupPermissions(PortletRequest portletRequest);
728    
729            public String[] getGroupPermissions(
730                    PortletRequest portletRequest, String className);
731    
732            public String[] getGuestPermissions(HttpServletRequest request);
733    
734            public String[] getGuestPermissions(
735                    HttpServletRequest request, String className);
736    
737            public String[] getGuestPermissions(PortletRequest portletRequest);
738    
739            public String[] getGuestPermissions(
740                    PortletRequest portletRequest, String className);
741    
742            public String getHomeURL(HttpServletRequest request) throws PortalException;
743    
744            public String getHost(HttpServletRequest request);
745    
746            public String getHost(PortletRequest portletRequest);
747    
748            public HttpServletRequest getHttpServletRequest(
749                    PortletRequest portletRequest);
750    
751            public HttpServletResponse getHttpServletResponse(
752                    PortletResponse portletResponse);
753    
754            public String getI18nPathLanguageId(
755                    Locale locale, String defaultI18nPathLanguageId);
756    
757            public String getJournalArticleActualURL(
758                            long groupId, boolean privateLayout, String mainPath,
759                            String friendlyURL, Map<String, String[]> params,
760                            Map<String, Object> requestContext)
761                    throws PortalException;
762    
763            public Layout getJournalArticleLayout(
764                            long groupId, boolean privateLayout, String friendlyURL)
765                    throws PortalException;
766    
767            public String getJsSafePortletId(String portletId);
768    
769            public String getLayoutActualURL(Layout layout);
770    
771            public String getLayoutActualURL(Layout layout, String mainPath);
772    
773            public String getLayoutActualURL(
774                            long groupId, boolean privateLayout, String mainPath,
775                            String friendlyURL)
776                    throws PortalException;
777    
778            public String getLayoutActualURL(
779                            long groupId, boolean privateLayout, String mainPath,
780                            String friendlyURL, Map<String, String[]> params,
781                            Map<String, Object> requestContext)
782                    throws PortalException;
783    
784            public String getLayoutFriendlyURL(Layout layout, ThemeDisplay themeDisplay)
785                    throws PortalException;
786    
787            public String getLayoutFriendlyURL(
788                            Layout layout, ThemeDisplay themeDisplay, Locale locale)
789                    throws PortalException;
790    
791            public LayoutFriendlyURLComposite getLayoutFriendlyURLComposite(
792                            long groupId, boolean privateLayout, String friendlyURL,
793                            Map<String, String[]> params, Map<String, Object> requestContext)
794                    throws PortalException;
795    
796            public String getLayoutFullURL(Layout layout, ThemeDisplay themeDisplay)
797                    throws PortalException;
798    
799            public String getLayoutFullURL(
800                            Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
801                    throws PortalException;
802    
803            public String getLayoutFullURL(long groupId, String portletId)
804                    throws PortalException;
805    
806            public String getLayoutFullURL(
807                            long groupId, String portletId, boolean secure)
808                    throws PortalException;
809    
810            public String getLayoutFullURL(ThemeDisplay themeDisplay)
811                    throws PortalException;
812    
813            public String getLayoutRelativeURL(Layout layout, ThemeDisplay themeDisplay)
814                    throws PortalException;
815    
816            public String getLayoutRelativeURL(
817                            Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
818                    throws PortalException;
819    
820            public String getLayoutSetFriendlyURL(
821                            LayoutSet layoutSet, ThemeDisplay themeDisplay)
822                    throws PortalException;
823    
824            public String getLayoutTarget(Layout layout);
825    
826            public String getLayoutURL(Layout layout, ThemeDisplay themeDisplay)
827                    throws PortalException;
828    
829            public String getLayoutURL(
830                            Layout layout, ThemeDisplay themeDisplay, boolean doAsUser)
831                    throws PortalException;
832    
833            public String getLayoutURL(
834                            Layout layout, ThemeDisplay themeDisplay, Locale locale)
835                    throws PortalException;
836    
837            public String getLayoutURL(ThemeDisplay themeDisplay)
838                    throws PortalException;
839    
840            public LiferayPortletRequest getLiferayPortletRequest(
841                    PortletRequest portletRequest);
842    
843            public LiferayPortletResponse getLiferayPortletResponse(
844                    PortletResponse portletResponse);
845    
846            public Locale getLocale(HttpServletRequest request);
847    
848            public Locale getLocale(
849                    HttpServletRequest request, HttpServletResponse response,
850                    boolean initialize);
851    
852            public Locale getLocale(PortletRequest portletRequest);
853    
854            public String getLocalizedFriendlyURL(
855                            HttpServletRequest request, Layout layout, Locale locale,
856                            Locale originalLocale)
857                    throws Exception;
858    
859            public String getMailId(String mx, String popPortletPrefix, Object... ids);
860    
861            public String getNetvibesURL(Portlet portlet, ThemeDisplay themeDisplay)
862                    throws PortalException;
863    
864            public String getNewPortletTitle(
865                    String portletTitle, String oldScopeName, String newScopeName);
866    
867            public HttpServletRequest getOriginalServletRequest(
868                    HttpServletRequest request);
869    
870            /**
871             * @deprecated As of 6.2.0 renamed to {@link #getSiteGroupId(long)}
872             */
873            @Deprecated
874            public long getParentGroupId(long scopeGroupId) throws PortalException;
875    
876            public String getPathContext();
877    
878            public String getPathContext(HttpServletRequest request);
879    
880            public String getPathContext(PortletRequest portletRequest);
881    
882            public String getPathContext(String contextPath);
883    
884            public String getPathFriendlyURLPrivateGroup();
885    
886            public String getPathFriendlyURLPrivateUser();
887    
888            public String getPathFriendlyURLPublic();
889    
890            public String getPathImage();
891    
892            public String getPathMain();
893    
894            public String getPathModule();
895    
896            public String getPathProxy();
897    
898            public long getPlidFromFriendlyURL(long companyId, String friendlyURL);
899    
900            public long getPlidFromPortletId(
901                            long groupId, boolean privateLayout, String portletId)
902                    throws PortalException;
903    
904            public long getPlidFromPortletId(long groupId, String portletId)
905                    throws PortalException;
906    
907            public PortalInetSocketAddressEventListener[]
908                    getPortalInetSocketAddressEventListeners();
909    
910            public String getPortalLibDir();
911    
912            public InetAddress getPortalLocalInetAddress(boolean secure);
913    
914            public int getPortalLocalPort(boolean secure);
915    
916            /**
917             * @deprecated As of 6.2.0, replaced by the more general {@link
918             *             #getPortalPort(boolean)}
919             */
920            @Deprecated
921            public int getPortalPort();
922    
923            /**
924             * @deprecated As of 7.0.0, replaced by {@link
925             *             #getPortalServerPort(boolean)}
926             */
927            @Deprecated
928            public int getPortalPort(boolean secure);
929    
930            public Properties getPortalProperties();
931    
932            public InetAddress getPortalServerInetAddress(boolean secure);
933    
934            public int getPortalServerPort(boolean secure);
935    
936            public String getPortalURL(HttpServletRequest request);
937    
938            public String getPortalURL(HttpServletRequest request, boolean secure);
939    
940            public String getPortalURL(Layout layout, ThemeDisplay themeDisplay)
941                    throws PortalException;
942    
943            public String getPortalURL(PortletRequest portletRequest);
944    
945            public String getPortalURL(PortletRequest portletRequest, boolean secure);
946    
947            public String getPortalURL(
948                    String serverName, int serverPort, boolean secure);
949    
950            public String getPortalURL(ThemeDisplay themeDisplay)
951                    throws PortalException;
952    
953            public String getPortalWebDir();
954    
955            /**
956             * @deprecated As of 6.2.0, replaced by {@link
957             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletInvocationWhitelist}
958             */
959            @Deprecated
960            public Set<String> getPortletAddDefaultResourceCheckWhitelist();
961    
962            /**
963             * @deprecated As of 6.2.0, replaced by {@link
964             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#getPortletInvocationWhitelistActions}
965             */
966            @Deprecated
967            public Set<String> getPortletAddDefaultResourceCheckWhitelistActions();
968    
969            /**
970             * @deprecated As of 6.2.0, replaced by {@link
971             *             #getPortletBreadcrumbs(HttpServletRequest)}
972             */
973            @Deprecated
974            public List<BreadcrumbEntry> getPortletBreadcrumbList(
975                    HttpServletRequest request);
976    
977            /**
978             * @deprecated As of 7.0.0, replaced by {@link
979             *             com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbUtil#getPortletBreadcrumbEntries(
980             *             HttpServletRequest)}
981             */
982            @Deprecated
983            public List<BreadcrumbEntry> getPortletBreadcrumbs(
984                    HttpServletRequest request);
985    
986            public PortletConfig getPortletConfig(
987                            long companyId, String portletId, ServletContext servletContext)
988                    throws PortletException;
989    
990            public String getPortletDescription(
991                    Portlet portlet, ServletContext servletContext, Locale locale);
992    
993            public String getPortletDescription(Portlet portlet, User user);
994    
995            public String getPortletDescription(String portletId, Locale locale);
996    
997            public String getPortletDescription(String portletId, String languageId);
998    
999            public String getPortletDescription(String portletId, User user);
1000    
1001            public String getPortletId(HttpServletRequest request);
1002    
1003            public String getPortletId(PortletRequest portletRequest);
1004    
1005            public String getPortletLongTitle(Portlet portlet, Locale locale);
1006    
1007            public String getPortletLongTitle(
1008                    Portlet portlet, ServletContext servletContext, Locale locale);
1009    
1010            public String getPortletLongTitle(Portlet portlet, String languageId);
1011    
1012            public String getPortletLongTitle(Portlet portlet, User user);
1013    
1014            public String getPortletLongTitle(String portletId, Locale locale);
1015    
1016            public String getPortletLongTitle(String portletId, String languageId);
1017    
1018            public String getPortletLongTitle(String portletId, User user);
1019    
1020            public String getPortletNamespace(String portletId);
1021    
1022            public String getPortletTitle(Portlet portlet, Locale locale);
1023    
1024            public String getPortletTitle(
1025                    Portlet portlet, ServletContext servletContext, Locale locale);
1026    
1027            public String getPortletTitle(Portlet portlet, String languageId);
1028    
1029            public String getPortletTitle(Portlet portlet, User user);
1030    
1031            public String getPortletTitle(PortletRequest portletRequest);
1032    
1033            public String getPortletTitle(PortletResponse portletResponse);
1034    
1035            public String getPortletTitle(String portletId, Locale locale);
1036    
1037            public String getPortletTitle(String portletId, String languageId);
1038    
1039            public String getPortletTitle(String portletId, User user);
1040    
1041            public String getPortletXmlFileName();
1042    
1043            public PortletPreferences getPreferences(HttpServletRequest request);
1044    
1045            public PreferencesValidator getPreferencesValidator(Portlet portlet);
1046    
1047            public String getRelativeHomeURL(HttpServletRequest request)
1048                    throws PortalException;
1049    
1050            public ResourceBundle getResourceBundle(Locale locale);
1051    
1052            public long getScopeGroupId(HttpServletRequest request)
1053                    throws PortalException;
1054    
1055            public long getScopeGroupId(HttpServletRequest request, String portletId)
1056                    throws PortalException;
1057    
1058            public long getScopeGroupId(
1059                            HttpServletRequest request, String portletId,
1060                            boolean checkStagingGroup)
1061                    throws PortalException;
1062    
1063            public long getScopeGroupId(Layout layout);
1064    
1065            public long getScopeGroupId(Layout layout, String portletId);
1066    
1067            public long getScopeGroupId(long plid);
1068    
1069            public long getScopeGroupId(PortletRequest portletRequest)
1070                    throws PortalException;
1071    
1072            public User getSelectedUser(HttpServletRequest request)
1073                    throws PortalException;
1074    
1075            public User getSelectedUser(
1076                            HttpServletRequest request, boolean checkPermission)
1077                    throws PortalException;
1078    
1079            public User getSelectedUser(PortletRequest portletRequest)
1080                    throws PortalException;
1081    
1082            public User getSelectedUser(
1083                            PortletRequest portletRequest, boolean checkPermission)
1084                    throws PortalException;
1085    
1086            public String getServletContextName();
1087    
1088            public long[] getSharedContentSiteGroupIds(
1089                            long companyId, long groupId, long userId)
1090                    throws PortalException;
1091    
1092            public Map<String, List<Portlet>> getSiteAdministrationCategoriesMap(
1093                    HttpServletRequest request);
1094    
1095            public PortletURL getSiteAdministrationURL(
1096                    HttpServletRequest request, ThemeDisplay themeDisplay);
1097    
1098            public PortletURL getSiteAdministrationURL(
1099                    HttpServletRequest request, ThemeDisplay themeDisplay,
1100                    String portletName);
1101    
1102            public PortletURL getSiteAdministrationURL(
1103                    PortletResponse portletResponse, ThemeDisplay themeDisplay);
1104    
1105            public PortletURL getSiteAdministrationURL(
1106                    PortletResponse portletResponse, ThemeDisplay themeDisplay,
1107                    String portletName);
1108    
1109            /**
1110             * @deprecated As of 7.0.0, replaced by {@link
1111             *             #getCurrentAndAncestorSiteGroupIds(long)}
1112             */
1113            @Deprecated
1114            public long[] getSiteAndCompanyGroupIds(long groupId)
1115                    throws PortalException;
1116    
1117            /**
1118             * @deprecated As of 7.0.0, replaced by {@link
1119             *             #getCurrentAndAncestorSiteGroupIds(long)}
1120             */
1121            @Deprecated
1122            public long[] getSiteAndCompanyGroupIds(ThemeDisplay themeDisplay)
1123                    throws PortalException;
1124    
1125            public Locale getSiteDefaultLocale(long groupId) throws PortalException;
1126    
1127            public long getSiteGroupId(long groupId) throws PortalException;
1128    
1129            /**
1130             * Returns the URL of the login page for the current site if one is
1131             * available.
1132             *
1133             * @param  themeDisplay the theme display for the current page
1134             * @return the URL of the login page for the current site, or
1135             *         <code>null</code> if one is not available
1136             * @throws PortalException if a portal exception occurred
1137             */
1138            public String getSiteLoginURL(ThemeDisplay themeDisplay)
1139                    throws PortalException;
1140    
1141            public String getStaticResourceURL(HttpServletRequest request, String uri);
1142    
1143            public String getStaticResourceURL(
1144                    HttpServletRequest request, String uri, long timestamp);
1145    
1146            public String getStaticResourceURL(
1147                    HttpServletRequest request, String uri, String queryString);
1148    
1149            public String getStaticResourceURL(
1150                    HttpServletRequest request, String uri, String queryString,
1151                    long timestamp);
1152    
1153            public String getStrutsAction(HttpServletRequest request);
1154    
1155            public String[] getSystemGroups();
1156    
1157            public String[] getSystemOrganizationRoles();
1158    
1159            public String[] getSystemRoles();
1160    
1161            public String[] getSystemSiteRoles();
1162    
1163            public String getUniqueElementId(
1164                    HttpServletRequest request, String namespace, String id);
1165    
1166            public String getUniqueElementId(
1167                    PortletRequest request, String namespace, String id);
1168    
1169            public UploadPortletRequest getUploadPortletRequest(
1170                    PortletRequest portletRequest);
1171    
1172            public UploadServletRequest getUploadServletRequest(
1173                    HttpServletRequest request);
1174    
1175            public Date getUptime();
1176    
1177            public String getURLWithSessionId(String url, String sessionId);
1178    
1179            public User getUser(HttpServletRequest request) throws PortalException;
1180    
1181            public User getUser(PortletRequest portletRequest) throws PortalException;
1182    
1183            public String getUserEmailAddress(long userId);
1184    
1185            public long getUserId(HttpServletRequest request);
1186    
1187            public long getUserId(PortletRequest portletRequest);
1188    
1189            public String getUserName(BaseModel<?> baseModel);
1190    
1191            public String getUserName(long userId, String defaultUserName);
1192    
1193            public String getUserName(
1194                    long userId, String defaultUserName, HttpServletRequest request);
1195    
1196            public String getUserName(
1197                    long userId, String defaultUserName, String userAttribute);
1198    
1199            public String getUserName(
1200                    long userId, String defaultUserName, String userAttribute,
1201                    HttpServletRequest request);
1202    
1203            public String getUserPassword(HttpServletRequest request);
1204    
1205            public String getUserPassword(HttpSession session);
1206    
1207            public String getUserPassword(PortletRequest portletRequest);
1208    
1209            /**
1210             * @deprecated As of 7.0.0, with no direct replacement
1211             */
1212            @Deprecated
1213            public String getUserValue(long userId, String param, String defaultValue);
1214    
1215            public String getValidPortalDomain(long companyId, String domain);
1216    
1217            public long getValidUserId(long companyId, long userId)
1218                    throws PortalException;
1219    
1220            public String getVirtualHostname(LayoutSet layoutSet);
1221    
1222            public String getVirtualLayoutActualURL(
1223                            long groupId, boolean privateLayout, String mainPath,
1224                            String friendlyURL, Map<String, String[]> params,
1225                            Map<String, Object> requestContext)
1226                    throws PortalException;
1227    
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            public void invokeTaglibDiscussion(
1241                            PortletConfig portletConfig, ActionRequest actionRequest,
1242                            ActionResponse actionResponse)
1243                    throws Exception;
1244    
1245            /**
1246             * @deprecated As of 6.2.0, with no direct replacement
1247             */
1248            @Deprecated
1249            public boolean isAllowAddPortletDefaultResource(
1250                            HttpServletRequest request, Portlet portlet)
1251                    throws PortalException;
1252    
1253            public boolean isCDNDynamicResourcesEnabled(HttpServletRequest request)
1254                    throws PortalException;
1255    
1256            public boolean isCDNDynamicResourcesEnabled(long companyId);
1257    
1258            /**
1259             * @deprecated As of 6.1.0, renamed to {@link #isGroupAdmin(User, long)}
1260             */
1261            @Deprecated
1262            public boolean isCommunityAdmin(User user, long groupId) throws Exception;
1263    
1264            /**
1265             * @deprecated As of 6.1.0, renamed to {@link #isGroupOwner(User, long)}
1266             */
1267            @Deprecated
1268            public boolean isCommunityOwner(User user, long groupId) throws Exception;
1269    
1270            public boolean isCompanyAdmin(User user) throws Exception;
1271    
1272            public boolean isCompanyControlPanelPortlet(
1273                            String portletId, String category, ThemeDisplay themeDisplay)
1274                    throws PortalException;
1275    
1276            public boolean isCompanyControlPanelPortlet(
1277                            String portletId, ThemeDisplay themeDisplay)
1278                    throws PortalException;
1279    
1280            public boolean isCompanyControlPanelVisible(ThemeDisplay themeDisplay)
1281                    throws PortalException;
1282    
1283            public boolean isControlPanelPortlet(
1284                    String portletId, String category, ThemeDisplay themeDisplay);
1285    
1286            public boolean isControlPanelPortlet(
1287                    String portletId, ThemeDisplay themeDisplay);
1288    
1289            public boolean isGroupAdmin(User user, long groupId) throws Exception;
1290    
1291            public boolean isGroupFriendlyURL(
1292                    String fullURL, String groupFriendlyURL, String layoutFriendlyURL);
1293    
1294            public boolean isGroupOwner(User user, long groupId) throws Exception;
1295    
1296            public boolean isLayoutDescendant(Layout layout, long layoutId)
1297                    throws PortalException;
1298    
1299            public boolean isLayoutSitemapable(Layout layout);
1300    
1301            public boolean isLoginRedirectRequired(HttpServletRequest request);
1302    
1303            public boolean isMethodGet(PortletRequest portletRequest);
1304    
1305            public boolean isMethodPost(PortletRequest portletRequest);
1306    
1307            public boolean isMultipartRequest(HttpServletRequest request);
1308    
1309            public boolean isOmniadmin(long userId);
1310    
1311            public boolean isOmniadmin(User user);
1312    
1313            public boolean isReservedParameter(String name);
1314    
1315            public boolean isRightToLeft(HttpServletRequest request);
1316    
1317            public boolean isRSSFeedsEnabled();
1318    
1319            public boolean isSecure(HttpServletRequest request);
1320    
1321            public boolean isSystemGroup(String groupName);
1322    
1323            public boolean isSystemRole(String roleName);
1324    
1325            public boolean isUpdateAvailable();
1326    
1327            public boolean isValidResourceId(String resourceId);
1328    
1329            public boolean removePortalInetSocketAddressEventListener(
1330                    PortalInetSocketAddressEventListener
1331                            portalInetSocketAddressEventListener);
1332    
1333            /**
1334             * @deprecated As of 7.0.0, replaced by {@link
1335             *             #removePortalInetSocketAddressEventListener(
1336             *             PortalInetSocketAddressEventListener)}
1337             */
1338            @Deprecated
1339            public void removePortalPortEventListener(
1340                    PortalPortEventListener portalPortEventListener);
1341    
1342            public void resetCDNHosts();
1343    
1344            /**
1345             * @deprecated As of 6.2.0, replaced by {@link
1346             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#resetPortletInvocationWhitelist}
1347             */
1348            @Deprecated
1349            public Set<String> resetPortletAddDefaultResourceCheckWhitelist();
1350    
1351            /**
1352             * @deprecated As of 6.2.0, replaced by {@link
1353             *             com.liferay.portal.security.auth.AuthTokenWhitelistUtil#resetPortletInvocationWhitelistActions}
1354             */
1355            @Deprecated
1356            public Set<String> resetPortletAddDefaultResourceCheckWhitelistActions();
1357    
1358            public String resetPortletParameters(String url, String portletId);
1359    
1360            public void sendError(
1361                            Exception e, ActionRequest actionRequest,
1362                            ActionResponse actionResponse)
1363                    throws IOException;
1364    
1365            public void sendError(
1366                            Exception e, HttpServletRequest request,
1367                            HttpServletResponse response)
1368                    throws IOException, ServletException;
1369    
1370            public void sendError(
1371                            int status, Exception e, ActionRequest actionRequest,
1372                            ActionResponse actionResponse)
1373                    throws IOException;
1374    
1375            public void sendError(
1376                            int status, Exception e, HttpServletRequest request,
1377                            HttpServletResponse response)
1378                    throws IOException, ServletException;
1379    
1380            public void sendRSSFeedsDisabledError(
1381                            HttpServletRequest request, HttpServletResponse response)
1382                    throws IOException, ServletException;
1383    
1384            public void sendRSSFeedsDisabledError(
1385                            PortletRequest portletRequest, PortletResponse portletResponse)
1386                    throws IOException, ServletException;
1387    
1388            /**
1389             * Sets the description for the page, overriding the existing page
1390             * description.
1391             */
1392            public void setPageDescription(
1393                    String description, HttpServletRequest request);
1394    
1395            /**
1396             * Sets the keywords for the page, overriding the existing page keywords.
1397             */
1398            public void setPageKeywords(String keywords, HttpServletRequest request);
1399    
1400            /**
1401             * Sets the subtitle for the page, overriding the existing page subtitle.
1402             */
1403            public void setPageSubtitle(String subtitle, HttpServletRequest request);
1404    
1405            /**
1406             * Sets the whole title for the page, overriding the existing page whole
1407             * title.
1408             */
1409            public void setPageTitle(String title, HttpServletRequest request);
1410    
1411            public void setPortalInetSocketAddresses(HttpServletRequest request);
1412    
1413            /**
1414             * Sets the port obtained on the first request to the portal.
1415             *
1416             * @deprecated As of 7.0.0, replaced by {@link
1417             *             #setPortalInetSocketAddresses(HttpServletRequest)}
1418             */
1419            @Deprecated
1420            public void setPortalPort(HttpServletRequest request);
1421    
1422            public void storePreferences(PortletPreferences portletPreferences)
1423                    throws IOException, ValidatorException;
1424    
1425            public String[] stripURLAnchor(String url, String separator);
1426    
1427            public String transformCustomSQL(String sql);
1428    
1429            public String transformSQL(String sql);
1430    
1431            public void updateImageId(
1432                            BaseModel<?> baseModel, boolean image, byte[] bytes,
1433                            String fieldName, long maxSize, int maxHeight, int maxWidth)
1434                    throws PortalException;
1435    
1436            public PortletMode updatePortletMode(
1437                    String portletId, User user, Layout layout, PortletMode portletMode,
1438                    HttpServletRequest request);
1439    
1440            public String updateRedirect(
1441                    String redirect, String oldPath, String newPath);
1442    
1443            public WindowState updateWindowState(
1444                    String portletId, User user, Layout layout, WindowState windowState,
1445                    HttpServletRequest request);
1446    
1447    }