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