Source Code Cross Referenced for ThemeDisplay.java in  » Portal » liferay-portal-4.4.2 » com » liferay » portal » theme » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » liferay portal 4.4.2 » com.liferay.portal.theme 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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