1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portal.theme;
24  
25  import com.liferay.portal.kernel.language.LanguageUtil;
26  import com.liferay.portal.kernel.log.Log;
27  import com.liferay.portal.kernel.log.LogFactoryUtil;
28  import com.liferay.portal.kernel.util.StringPool;
29  import com.liferay.portal.model.Account;
30  import com.liferay.portal.model.ColorScheme;
31  import com.liferay.portal.model.Company;
32  import com.liferay.portal.model.Contact;
33  import com.liferay.portal.model.Layout;
34  import com.liferay.portal.model.LayoutTypePortlet;
35  import com.liferay.portal.model.Theme;
36  import com.liferay.portal.model.User;
37  import com.liferay.portal.security.permission.PermissionChecker;
38  
39  import java.io.Serializable;
40  
41  import java.util.List;
42  import java.util.Locale;
43  import java.util.TimeZone;
44  
45  import javax.portlet.PortletURL;
46  
47  /**
48   * <a href="ThemeDisplay.java.html"><b><i>View Source</i></b></a>
49   *
50   * @author Brian Wing Shun Chan
51   *
52   */
53  public class ThemeDisplay implements Serializable {
54  
55      public ThemeDisplay() {
56          if (_log.isDebugEnabled()) {
57              _log.debug("Creating new instance " + hashCode());
58          }
59  
60          _portletDisplay.setThemeDisplay(this);
61      }
62  
63      public Company getCompany() {
64          return _company;
65      }
66  
67      public void setCompany(Company company) {
68          _company = company;
69  
70          setAccount(company.getAccount());
71      }
72  
73      public long getCompanyId() {
74          return _company.getCompanyId();
75      }
76  
77      public String getCompanyLogo() {
78          return _companyLogo;
79      }
80  
81      public void setCompanyLogo(String companyLogo) {
82          _companyLogo = companyLogo;
83      }
84  
85      public int getCompanyLogoHeight() {
86          return _companyLogoHeight;
87      }
88  
89      public void setCompanyLogoHeight(int companyLogoHeight) {
90          _companyLogoHeight = companyLogoHeight;
91      }
92  
93      public int getCompanyLogoWidth() {
94          return _companyLogoWidth;
95      }
96  
97      public void setCompanyLogoWidth(int companyLogoWidth) {
98          _companyLogoWidth = companyLogoWidth;
99      }
100 
101     public String getRealCompanyLogo() {
102         return _realCompanyLogo;
103     }
104 
105     public void setRealCompanyLogo(String realCompanyLogo) {
106         _realCompanyLogo = realCompanyLogo;
107     }
108 
109     public int getRealCompanyLogoHeight() {
110         return _realCompanyLogoHeight;
111     }
112 
113     public void setRealCompanyLogoHeight(int realCompanyLogoHeight) {
114         _realCompanyLogoHeight = realCompanyLogoHeight;
115     }
116 
117     public int getRealCompanyLogoWidth() {
118         return _realCompanyLogoWidth;
119     }
120 
121     public void setRealCompanyLogoWidth(int realCompanyLogoWidth) {
122         _realCompanyLogoWidth = realCompanyLogoWidth;
123     }
124 
125     public Account getAccount() {
126         return _account;
127     }
128 
129     public void setAccount(Account account) {
130         _account = account;
131     }
132 
133     public User getDefaultUser() {
134         if (_defaultUser == null) {
135             _defaultUser = _company.getDefaultUser();
136         }
137 
138         return _defaultUser;
139     }
140 
141     public long getDefaultUserId() {
142         return getDefaultUser().getUserId();
143     }
144 
145     public User getUser() {
146         return _user;
147     }
148 
149     public void setUser(User user) {
150         _user = user;
151 
152         setContact(user.getContact());
153     }
154 
155     public long getUserId() {
156         return _user.getUserId();
157     }
158 
159     public User getRealUser() {
160         return _realUser;
161     }
162 
163     public void setRealUser(User realUser) {
164         _realUser = realUser;
165     }
166 
167     public long getRealUserId() {
168         return _realUser.getUserId();
169     }
170 
171     public String getDoAsUserId() {
172         return _doAsUserId;
173     }
174 
175     public void setDoAsUserId(String doAsUserId) {
176         _doAsUserId = doAsUserId;
177     }
178 
179     public boolean isImpersonated() {
180         if (getUserId() == getRealUserId()) {
181             return false;
182         }
183         else {
184             return true;
185         }
186     }
187 
188     public Contact getContact() {
189         return _contact;
190     }
191 
192     public void setContact(Contact contact) {
193         _contact = contact;
194     }
195 
196     public String getLayoutSetLogo() {
197         return _layoutSetLogo;
198     }
199 
200     public void setLayoutSetLogo(String layoutSetLogo) {
201         _layoutSetLogo = layoutSetLogo;
202     }
203 
204     public Layout getLayout() {
205         return _layout;
206     }
207 
208     public void setLayout(Layout layout) {
209         _layout = layout;
210     }
211 
212     public List<Layout> getLayouts() {
213         return _layouts;
214     }
215 
216     public void setLayouts(List<Layout> layouts) {
217         _layouts = layouts;
218     }
219 
220     public long getPlid() {
221         return _plid;
222     }
223 
224     public void setPlid(long plid) {
225         _plid = plid;
226     }
227 
228     public LayoutTypePortlet getLayoutTypePortlet() {
229         return _layoutTypePortlet;
230     }
231 
232     public void setLayoutTypePortlet(LayoutTypePortlet layoutTypePortlet) {
233         _layoutTypePortlet = layoutTypePortlet;
234     }
235 
236     public long getPortletGroupId() {
237         return _portletGroupId;
238     }
239 
240     public void setPortletGroupId(long portletGroupId) {
241         _portletGroupId = portletGroupId;
242     }
243 
244     public boolean isSignedIn() {
245         return _signedIn;
246     }
247 
248     public void setSignedIn(boolean signedIn) {
249         _signedIn = signedIn;
250     }
251 
252     public PermissionChecker getPermissionChecker() {
253         return _permissionChecker;
254     }
255 
256     public void setPermissionChecker(PermissionChecker permissionChecker) {
257         _permissionChecker = permissionChecker;
258     }
259 
260     public Locale getLocale() {
261         return _locale;
262     }
263 
264     public void setLocale(Locale locale) {
265         _locale = locale;
266     }
267 
268     public String getLanguageId() {
269         return _languageId;
270     }
271 
272     public void setLanguageId(String languageId) {
273         _languageId = languageId;
274     }
275 
276     public String translate(String key) {
277         return LanguageUtil.get(getCompanyId(), getLocale(), key);
278     }
279 
280     public String translate(String pattern, Object argument) {
281         return LanguageUtil.format(
282             getCompanyId(), getLocale(), pattern, argument);
283     }
284 
285     public String translate(String pattern, Object[] arguments) {
286         return LanguageUtil.format(
287             getCompanyId(), getLocale(), pattern, arguments);
288     }
289 
290     public TimeZone getTimeZone() {
291         return _timeZone;
292     }
293 
294     public void setTimeZone(TimeZone timeZone) {
295         _timeZone = timeZone;
296     }
297 
298     public Theme getTheme() {
299         return _theme;
300     }
301 
302     public String getThemeId() {
303         return _theme.getThemeId();
304     }
305 
306     public ColorScheme getColorScheme() {
307         return _colorScheme;
308     }
309 
310     public String getColorSchemeId() {
311         return _colorScheme.getColorSchemeId();
312     }
313 
314     public boolean isWapTheme() {
315         return _theme.isWapTheme();
316     }
317 
318     public void setLookAndFeel(Theme theme, ColorScheme colorScheme) {
319         setLookAndFeel(getPathContext(), theme, colorScheme);
320     }
321 
322     public void setLookAndFeel(
323         String contextPath, Theme theme, ColorScheme colorScheme) {
324 
325         _theme = theme;
326         _colorScheme = colorScheme;
327 
328         if ((theme != null) && (colorScheme != null)) {
329             String themeContextPath = contextPath;
330 
331             if (theme.isWARFile()) {
332                 themeContextPath = theme.getContextPath();
333             }
334 
335             String cdnHost = getCDNHost();
336 
337             setPathColorSchemeImages(
338                 cdnHost + themeContextPath +
339                     colorScheme.getColorSchemeImagesPath());
340 
341             setPathThemeCss(cdnHost + themeContextPath + theme.getCssPath());
342             setPathThemeImages(
343                 cdnHost + themeContextPath + theme.getImagesPath());
344             setPathThemeJavaScript(
345                 cdnHost + themeContextPath + theme.getJavaScriptPath());
346             setPathThemeRoot(themeContextPath + theme.getRootPath());
347         }
348     }
349 
350     public boolean isThemeCssFastLoad() {
351         return _themeCssFastLoad;
352     }
353 
354     public void setThemeCssFastLoad(boolean themeCssFastLoad) {
355         _themeCssFastLoad = themeCssFastLoad;
356     }
357 
358     public boolean isThemeJsBarebone() {
359         return _themeJsBarebone;
360     }
361 
362     public void setThemeJsBarebone(boolean themeJsBarebone) {
363         _themeJsBarebone = themeJsBarebone;
364     }
365 
366     public boolean isThemeJsFastLoad() {
367         return _themeJsFastLoad;
368     }
369 
370     public void setThemeJsFastLoad(boolean themeJsFastLoad) {
371         _themeJsFastLoad = themeJsFastLoad;
372     }
373 
374     public boolean isFreeformLayout() {
375         return _freeformLayout;
376     }
377 
378     public void setFreeformLayout(boolean freeformLayout) {
379         _freeformLayout = freeformLayout;
380     }
381 
382     public String getServerName() {
383         return _serverName;
384     }
385 
386     public void setServerName(String serverName) {
387         _serverName = serverName;
388     }
389 
390     public int getServerPort() {
391         return _serverPort;
392     }
393 
394     public void setServerPort(int serverPort) {
395         _serverPort = serverPort;
396     }
397 
398     public boolean isSecure() {
399         return _secure;
400     }
401 
402     public void setSecure(boolean secure) {
403         _secure = secure;
404     }
405 
406     public String getLifecycle() {
407         return _lifecycle;
408     }
409 
410     public void setLifecycle(String lifecycle) {
411         _lifecycle = lifecycle;
412     }
413 
414     public boolean isLifecycleAction() {
415         return _lifecycleAction;
416     }
417 
418     public void setLifecycleAction(boolean lifecycleAction) {
419         _lifecycleAction = lifecycleAction;
420     }
421 
422     public boolean isLifecycleRender() {
423         return _lifecycleRender;
424     }
425 
426     public void setLifecycleRender(boolean lifecycleRender) {
427         _lifecycleRender = lifecycleRender;
428     }
429 
430     public boolean isLifecycleResource() {
431         return _lifecycleResource;
432     }
433 
434     public void setLifecycleResource(boolean lifecycleResource) {
435         _lifecycleResource = lifecycleResource;
436     }
437 
438     public boolean isStateExclusive() {
439         return _stateExclusive;
440     }
441 
442     public void setStateExclusive(boolean stateExclusive) {
443         _stateExclusive = stateExclusive;
444     }
445 
446     public boolean isStateMaximized() {
447         return _stateMaximized;
448     }
449 
450     public void setStateMaximized(boolean stateMaximized) {
451         _stateMaximized = stateMaximized;
452     }
453 
454     public boolean isStatePopUp() {
455         return _statePopUp;
456     }
457 
458     public void setStatePopUp(boolean statePopUp) {
459         _statePopUp = statePopUp;
460     }
461 
462     public String getCDNHost() {
463         return _cdnHost;
464     }
465 
466     public void setCDNHost(String cdnHost) {
467         _cdnHost = cdnHost;
468     }
469 
470     public String getPathApplet() {
471         return _pathApplet;
472     }
473 
474     public void setPathApplet(String pathApplet) {
475         _pathApplet = pathApplet;
476     }
477 
478     public String getPathCms() {
479         return _pathCms;
480     }
481 
482     public void setPathCms(String pathCms) {
483         _pathCms = pathCms;
484     }
485 
486     public String getPathColorSchemeImages() {
487         return _pathColorSchemeImages;
488     }
489 
490     public void setPathColorSchemeImages(String pathColorSchemeImages) {
491         _pathColorSchemeImages = pathColorSchemeImages;
492     }
493 
494     public String getPathContext() {
495         return _pathContext;
496     }
497 
498     public void setPathContext(String pathContext) {
499         _pathContext = pathContext;
500     }
501 
502     public String getPathFlash() {
503         return _pathFlash;
504     }
505 
506     public void setPathFlash(String pathFlash) {
507         _pathFlash = pathFlash;
508     }
509 
510     public String getPathFriendlyURLPrivateGroup() {
511         return _pathFriendlyURLPrivateGroup;
512     }
513 
514     public void setPathFriendlyURLPrivateGroup(
515         String pathFriendlyURLPrivateGroup) {
516 
517         _pathFriendlyURLPrivateGroup = pathFriendlyURLPrivateGroup;
518     }
519 
520     public String getPathFriendlyURLPrivateUser() {
521         return _pathFriendlyURLPrivateUser;
522     }
523 
524     public void setPathFriendlyURLPrivateUser(
525         String pathFriendlyURLPrivateUser) {
526 
527         _pathFriendlyURLPrivateUser = pathFriendlyURLPrivateUser;
528     }
529 
530     public String getPathFriendlyURLPublic() {
531         return _pathFriendlyURLPublic;
532     }
533 
534     public void setPathFriendlyURLPublic(String pathFriendlyURLPublic) {
535         _pathFriendlyURLPublic = pathFriendlyURLPublic;
536     }
537 
538     public String getPathImage() {
539         return _pathImage;
540     }
541 
542     public void setPathImage(String pathImage) {
543         _pathImage = pathImage;
544     }
545 
546     public String getPathJavaScript() {
547         return _pathJavaScript;
548     }
549 
550     public void setPathJavaScript(String pathJavaScript) {
551         _pathJavaScript = pathJavaScript;
552     }
553 
554     public String getPathMain() {
555         return _pathMain;
556     }
557 
558     public void setPathMain(String pathMain) {
559         _pathMain = pathMain;
560     }
561 
562     public String getPathSound() {
563         return _pathSound;
564     }
565 
566     public void setPathSound(String pathSound) {
567         _pathSound = pathSound;
568     }
569 
570     public String getPathThemeCss() {
571         return _pathThemeCss;
572     }
573 
574     public void setPathThemeCss(String pathThemeCss) {
575         _pathThemeCss = pathThemeCss;
576     }
577 
578     /**
579      * @deprecated Use <code>getPathThemeImages</code>.
580      */
581     public String getPathThemeImage() {
582         return getPathThemeImages();
583     }
584 
585     public String getPathThemeImages() {
586         return _pathThemeImages;
587     }
588 
589     public void setPathThemeImages(String pathThemeImages) {
590         _pathThemeImages = pathThemeImages;
591     }
592 
593     public String getPathThemeJavaScript() {
594         return _pathThemeJavaScript;
595     }
596 
597     public void setPathThemeJavaScript(String pathThemeJavaScript) {
598         _pathThemeJavaScript = pathThemeJavaScript;
599     }
600 
601     public String getPathThemeRoot() {
602         return _pathThemeRoot;
603     }
604 
605     public void setPathThemeRoot(String pathThemeRoot) {
606         _pathThemeRoot = pathThemeRoot;
607     }
608 
609     public boolean isShowAddContentIcon() {
610         return _showAddContentIcon;
611     }
612 
613     public void setShowAddContentIcon(boolean showAddContentIcon) {
614         _showAddContentIcon = showAddContentIcon;
615     }
616 
617     public boolean isShowHomeIcon() {
618         return _showHomeIcon;
619     }
620 
621     public void setShowHomeIcon(boolean showHomeIcon) {
622         _showHomeIcon = showHomeIcon;
623     }
624 
625     public boolean isShowLayoutTemplatesIcon() {
626         return _showLayoutTemplatesIcon;
627     }
628 
629     public void setShowLayoutTemplatesIcon(boolean showLayoutTemplatesIcon) {
630         _showLayoutTemplatesIcon = showLayoutTemplatesIcon;
631     }
632 
633     public boolean isShowMyAccountIcon() {
634         return _showMyAccountIcon;
635     }
636 
637     public void setShowMyAccountIcon(boolean showMyAccountIcon) {
638         _showMyAccountIcon = showMyAccountIcon;
639     }
640 
641     public boolean isShowPageSettingsIcon() {
642         return _showPageSettingsIcon;
643     }
644 
645     public void setShowPageSettingsIcon(boolean showPageSettingsIcon) {
646         _showPageSettingsIcon = showPageSettingsIcon;
647     }
648 
649     public boolean isShowPortalIcon() {
650         return _showPortalIcon;
651     }
652 
653     public void setShowPortalIcon(boolean showPortalIcon) {
654         _showPortalIcon = showPortalIcon;
655     }
656 
657     public boolean isShowSignInIcon() {
658         return _showSignInIcon;
659     }
660 
661     public void setShowSignInIcon(boolean showSignInIcon) {
662         _showSignInIcon = showSignInIcon;
663     }
664 
665     public boolean isShowSignOutIcon() {
666         return _showSignOutIcon;
667     }
668 
669     public void setShowSignOutIcon(boolean showSignOutIcon) {
670         _showSignOutIcon = showSignOutIcon;
671     }
672 
673     public boolean isShowStagingIcon() {
674         return _showStagingIcon;
675     }
676 
677     public void setShowStagingIcon(boolean showStagingIcon) {
678         _showStagingIcon = showStagingIcon;
679     }
680 
681     public String getURLAddContent() {
682         return _urlAddContent;
683     }
684 
685     public void setURLAddContent(String urlAddContent) {
686         _urlAddContent = urlAddContent;
687     }
688 
689     public PortletURL getURLCreateAccount() {
690         return _urlCreateAccount;
691     }
692 
693     public void setURLCreateAccount(PortletURL urlCreateAccount) {
694         _urlCreateAccount = urlCreateAccount;
695     }
696 
697     public String getURLCurrent() {
698         return _urlCurrent;
699     }
700 
701     public void setURLCurrent(String urlCurrent) {
702         _urlCurrent = urlCurrent;
703     }
704 
705     public String getURLHome() {
706         return _urlHome;
707     }
708 
709     public void setURLHome(String urlHome) {
710         _urlHome = urlHome;
711     }
712 
713     public String getURLLayoutTemplates() {
714         return _urlLayoutTemplates;
715     }
716 
717     public void setURLLayoutTemplates(String urlLayoutTemplates) {
718         _urlLayoutTemplates = urlLayoutTemplates;
719     }
720 
721     public PortletURL getURLMyAccount() {
722         return _urlMyAccount;
723     }
724 
725     public void setURLMyAccount(PortletURL urlMyAccount) {
726         _urlMyAccount = urlMyAccount;
727     }
728 
729     public PortletURL getURLPageSettings() {
730         return _urlPageSettings;
731     }
732 
733     public void setURLPageSettings(PortletURL urlPageSettings) {
734         _urlPageSettings = urlPageSettings;
735     }
736 
737     public String getURLPortal() {
738         return _urlPortal;
739     }
740 
741     public void setURLPortal(String urlPortal) {
742         _urlPortal = urlPortal;
743     }
744 
745     public PortletURL getURLPublishToLive() {
746         return _urlPublishToLive;
747     }
748 
749     public void setURLPublishToLive(PortletURL urlPublishToLive) {
750         _urlPublishToLive = urlPublishToLive;
751     }
752 
753     public String getURLSignIn() {
754         return _urlSignIn;
755     }
756 
757     public void setURLSignIn(String urlSignIn) {
758         _urlSignIn = urlSignIn;
759     }
760 
761     public String getURLSignOut() {
762         return _urlSignOut;
763     }
764 
765     public void setURLSignOut(String urlSignOut) {
766         _urlSignOut = urlSignOut;
767     }
768 
769     public PortletURL getURLUpdateManager() {
770         return _urlUpdateManager;
771     }
772 
773     public void setURLUpdateManager(PortletURL urlUpdateManager) {
774         _urlUpdateManager = urlUpdateManager;
775     }
776 
777     public String getTilesTitle() {
778         return _tilesTitle;
779     }
780 
781     public void setTilesTitle(String tilesTitle) {
782         _tilesTitle = tilesTitle;
783     }
784 
785     public String getTilesContent() {
786         return _tilesContent;
787     }
788 
789     public void setTilesContent(String tilesContent) {
790         _tilesContent = tilesContent;
791     }
792 
793     public boolean isTilesSelectable() {
794         return _tilesSelectable;
795     }
796 
797     public void setTilesSelectable(boolean tilesSelectable) {
798         _tilesSelectable = tilesSelectable;
799     }
800 
801     public boolean isIncludeCalendarJs() {
802         return _includeCalendarJs;
803     }
804 
805     public void setIncludeCalendarJs(boolean includeCalendarJs) {
806         _includeCalendarJs = includeCalendarJs;
807     }
808 
809     public boolean isIncludePortletCssJs() {
810         return _includePortletCssJs;
811     }
812 
813     public void setIncludePortletCssJs(boolean includePortletCssJs) {
814         _includePortletCssJs = includePortletCssJs;
815     }
816 
817     public boolean isIncludeServiceJs() {
818         return _includeServiceJs;
819     }
820 
821     public void setIncludeServiceJs(boolean includeServiceJs) {
822         _includeServiceJs = includeServiceJs;
823     }
824 
825     public boolean isIncludedJs(String js) {
826         String path = getPathJavaScript();
827 
828         if (isIncludeCalendarJs() &&
829             js.equals(path + "/calendar/calendar_stripped.js")) {
830 
831             return true;
832         }
833         else if (isIncludePortletCssJs() &&
834                  js.equals(path + "/liferay/portlet_css_packed.js")) {
835 
836             return true;
837         }
838         else if (isIncludeServiceJs() &&
839                  js.equals(path + "/liferay/service_packed.js")) {
840 
841             return true;
842         }
843         else {
844             return false;
845         }
846     }
847 
848     public PortletDisplay getPortletDisplay() {
849         return _portletDisplay;
850     }
851 
852     /*public void setPortletDisplay(PortletDisplay portletDisplay) {
853         _portletDisplay = portletDisplay;
854     }*/
855 
856     public void recycle() {
857         if (_log.isDebugEnabled()) {
858             _log.debug("Recycling instance " + hashCode());
859         }
860 
861         _company = null;
862         _companyLogo = StringPool.BLANK;
863         _companyLogoHeight = 0;
864         _companyLogoWidth = 0;
865         _realCompanyLogo = StringPool.BLANK;
866         _realCompanyLogoHeight = 0;
867         _realCompanyLogoWidth = 0;
868         _account = null;
869         _defaultUser = null;
870         _user = null;
871         _realUser = null;
872         _doAsUserId = StringPool.BLANK;
873         _layoutSetLogo = StringPool.BLANK;
874         _layout = null;
875         _layouts = null;
876         _plid = 0;
877         _layoutTypePortlet = null;
878         _portletGroupId = 0;
879         _signedIn = false;
880         _permissionChecker = null;
881         _locale = null;
882         _languageId = null;
883         _timeZone = null;
884         _theme = null;
885         _colorScheme = null;
886         _themeCssFastLoad = false;
887         _themeJsBarebone = false;
888         _themeJsFastLoad = false;
889         _freeformLayout = false;
890         _serverName = StringPool.BLANK;
891         _serverPort = 0;
892         _secure = false;
893         _lifecycle = StringPool.BLANK;
894         _lifecycleAction = false;
895         _lifecycleRender = false;
896         _lifecycleResource = false;
897         _stateExclusive = false;
898         _stateMaximized = false;
899         _statePopUp = false;
900         _cdnHost = StringPool.BLANK;
901         _pathApplet = StringPool.BLANK;
902         _pathCms = StringPool.BLANK;
903         _pathColorSchemeImages = StringPool.BLANK;
904         _pathContext = StringPool.BLANK;
905         _pathFlash = StringPool.BLANK;
906         _pathFriendlyURLPrivateGroup = StringPool.BLANK;
907         _pathFriendlyURLPrivateUser = StringPool.BLANK;
908         _pathFriendlyURLPublic = StringPool.BLANK;
909         _pathImage = StringPool.BLANK;
910         _pathJavaScript = StringPool.BLANK;
911         _pathMain = StringPool.BLANK;
912         _pathSound = StringPool.BLANK;
913         _pathThemeCss = StringPool.BLANK;
914         _pathThemeImages = StringPool.BLANK;
915         _pathThemeJavaScript = StringPool.BLANK;
916         _pathThemeRoot = StringPool.BLANK;
917         _showAddContentIcon = false;
918         _showHomeIcon = false;
919         _showLayoutTemplatesIcon = false;
920         _showMyAccountIcon = false;
921         _showPageSettingsIcon = false;
922         _showPortalIcon = false;
923         _showSignInIcon = false;
924         _showSignOutIcon = false;
925         _showStagingIcon = false;
926         _urlAddContent = StringPool.BLANK;
927         _urlCreateAccount = null;
928         _urlCurrent = StringPool.BLANK;
929         _urlHome = StringPool.BLANK;
930         _urlLayoutTemplates = StringPool.BLANK;
931         _urlMyAccount = null;
932         _urlPageSettings = null;
933         _urlPortal = StringPool.BLANK;
934         _urlPublishToLive = null;
935         _urlSignIn = StringPool.BLANK;
936         _urlSignOut = StringPool.BLANK;
937         _urlUpdateManager = null;
938         _tilesTitle = StringPool.BLANK;
939         _tilesContent = StringPool.BLANK;
940         _tilesSelectable = false;
941         _includeCalendarJs = false;
942         _includePortletCssJs = false;
943         _includeServiceJs = false;
944         _portletDisplay.recycle();
945     }
946 
947     private static Log _log = LogFactoryUtil.getLog(ThemeDisplay.class);
948 
949     private Company _company;
950     private String _companyLogo = StringPool.BLANK;
951     private int _companyLogoHeight;
952     private int _companyLogoWidth;
953     private String _realCompanyLogo = StringPool.BLANK;
954     private int _realCompanyLogoHeight;
955     private int _realCompanyLogoWidth;
956     private Account _account;
957     private User _defaultUser;
958     private User _user;
959     private User _realUser;
960     private String _doAsUserId = StringPool.BLANK;
961     private Contact _contact;
962     private String _layoutSetLogo = StringPool.BLANK;
963     private Layout _layout;
964     private List<Layout> _layouts;
965     private long _plid;
966     private LayoutTypePortlet _layoutTypePortlet;
967     private long _portletGroupId;
968     private boolean _signedIn;
969     private PermissionChecker _permissionChecker;
970     private Locale _locale;
971     private String _languageId;
972     private TimeZone _timeZone;
973     private Theme _theme;
974     private ColorScheme _colorScheme;
975     private boolean _themeCssFastLoad;
976     private boolean _themeJsBarebone;
977     private boolean _themeJsFastLoad;
978     private boolean _freeformLayout;
979     private String _serverName;
980     private int _serverPort;
981     private boolean _secure;
982     private String _lifecycle;
983     private boolean _lifecycleAction;
984     private boolean _lifecycleRender;
985     private boolean _lifecycleResource;
986     private boolean _stateExclusive;
987     private boolean _stateMaximized;
988     private boolean _statePopUp;
989     private String _cdnHost = StringPool.BLANK;
990     private String _pathApplet = StringPool.BLANK;
991     private String _pathCms = StringPool.BLANK;
992     private String _pathColorSchemeImages = StringPool.BLANK;
993     private String _pathContext = StringPool.BLANK;
994     private String _pathFlash = StringPool.BLANK;
995     private String _pathFriendlyURLPrivateGroup = StringPool.BLANK;
996     private String _pathFriendlyURLPrivateUser = StringPool.BLANK;
997     private String _pathFriendlyURLPublic = StringPool.BLANK;
998     private String _pathImage = StringPool.BLANK;
999     private String _pathJavaScript = StringPool.BLANK;
1000    private String _pathMain = StringPool.BLANK;
1001    private String _pathSound = StringPool.BLANK;
1002    private String _pathThemeCss = StringPool.BLANK;
1003    private String _pathThemeImages = StringPool.BLANK;
1004    private String _pathThemeJavaScript = StringPool.BLANK;
1005    private String _pathThemeRoot = StringPool.BLANK;
1006    private boolean _showAddContentIcon;
1007    private boolean _showHomeIcon;
1008    private boolean _showLayoutTemplatesIcon;
1009    private boolean _showMyAccountIcon;
1010    private boolean _showPageSettingsIcon;
1011    private boolean _showPortalIcon;
1012    private boolean _showSignInIcon;
1013    private boolean _showSignOutIcon;
1014    private boolean _showStagingIcon;
1015    private String _urlAddContent = StringPool.BLANK;
1016    private transient PortletURL _urlCreateAccount = null;
1017    private String _urlCurrent = StringPool.BLANK;
1018    private String _urlHome = StringPool.BLANK;
1019    private String _urlLayoutTemplates = StringPool.BLANK;
1020    private transient PortletURL _urlMyAccount = null;
1021    private transient PortletURL _urlPageSettings = null;
1022    private String _urlPortal = StringPool.BLANK;
1023    private transient PortletURL _urlPublishToLive = null;
1024    private String _urlSignIn = StringPool.BLANK;
1025    private String _urlSignOut = StringPool.BLANK;
1026    private transient PortletURL _urlUpdateManager = null;
1027    private String _tilesTitle = StringPool.BLANK;
1028    private String _tilesContent = StringPool.BLANK;
1029    private boolean _tilesSelectable;
1030    private boolean _includeCalendarJs;
1031    private boolean _includePortletCssJs;
1032    private boolean _includeServiceJs;
1033    private PortletDisplay _portletDisplay = new PortletDisplay();
1034
1035}