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