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.util.StringPool;
026:
027: import java.io.Serializable;
028:
029: /**
030: * <a href="PortletDisplay.java.html"><b><i>View Source</i></b></a>
031: *
032: * @author Brian Wing Shun Chan
033: *
034: */
035: public class PortletDisplay implements Serializable {
036:
037: public PortletDisplay() {
038: if (_log.isDebugEnabled()) {
039: _log.debug("Creating new instance " + hashCode());
040: }
041: }
042:
043: public String getId() {
044: return _id;
045: }
046:
047: public void setId(String id) {
048: _id = id;
049: }
050:
051: public String getRootPortletId() {
052: return _rootPortletId;
053: }
054:
055: public void setRootPortletId(String rootPortletId) {
056: _rootPortletId = rootPortletId;
057: }
058:
059: public String getInstanceId() {
060: return _instanceId;
061: }
062:
063: public void setInstanceId(String instanceId) {
064: _instanceId = instanceId;
065: }
066:
067: public String getResourcePK() {
068: return _resourcePK;
069: }
070:
071: public void setResourcePK(String resourcePK) {
072: _resourcePK = resourcePK;
073: }
074:
075: public String getPortletName() {
076: return _portletName;
077: }
078:
079: public void setPortletName(String portletName) {
080: _portletName = portletName;
081: }
082:
083: public String getNamespace() {
084: return _namespace;
085: }
086:
087: public void setNamespace(String namespace) {
088: _namespace = namespace;
089: }
090:
091: public String getTitle() {
092: return _title;
093: }
094:
095: public void setTitle(String title) {
096: _title = title;
097: }
098:
099: public boolean isAccess() {
100: return _access;
101: }
102:
103: public void setAccess(boolean access) {
104: _access = access;
105: }
106:
107: public boolean isActive() {
108: return _active;
109: }
110:
111: public void setActive(boolean active) {
112: _active = active;
113: }
114:
115: public String getColumnId() {
116: return _columnId;
117: }
118:
119: public void setColumnId(String columnId) {
120: _columnId = columnId;
121: }
122:
123: public int getColumnPos() {
124: return _columnPos;
125: }
126:
127: public void setColumnPos(int columnPos) {
128: _columnPos = columnPos;
129: }
130:
131: public int getColumnCount() {
132: return _columnCount;
133: }
134:
135: public void setColumnCount(int columnCount) {
136: _columnCount = columnCount;
137: }
138:
139: public boolean isStateExclusive() {
140: return _stateExclusive;
141: }
142:
143: public void setStateExclusive(boolean stateExclusive) {
144: _stateExclusive = stateExclusive;
145: }
146:
147: public boolean isStateMax() {
148: return _stateMax;
149: }
150:
151: public void setStateMax(boolean stateMax) {
152: _stateMax = stateMax;
153: }
154:
155: public boolean isStateMin() {
156: return _stateMin;
157: }
158:
159: public void setStateMin(boolean stateMin) {
160: _stateMin = stateMin;
161: }
162:
163: public boolean isStatePopUp() {
164: return _statePopUp;
165: }
166:
167: public void setStatePopUp(boolean statePopUp) {
168: _statePopUp = statePopUp;
169: }
170:
171: public boolean isModeAbout() {
172: return _modeAbout;
173: }
174:
175: public void setModeAbout(boolean modeAbout) {
176: _modeAbout = modeAbout;
177: }
178:
179: public boolean isModeConfig() {
180: return _modeConfig;
181: }
182:
183: public void setModeConfig(boolean modeConfig) {
184: _modeConfig = modeConfig;
185: }
186:
187: public boolean isModeEdit() {
188: return _modeEdit;
189: }
190:
191: public void setModeEdit(boolean modeEdit) {
192: _modeEdit = modeEdit;
193: }
194:
195: public boolean isModeEditDefaults() {
196: return _modeEditDefaults;
197: }
198:
199: public void setModeEditDefaults(boolean modeEditDefaults) {
200: _modeEditDefaults = modeEditDefaults;
201: }
202:
203: public boolean isModeEditGuest() {
204: return _modeEditGuest;
205: }
206:
207: public void setModeEditGuest(boolean modeEditGuest) {
208: _modeEditGuest = modeEditGuest;
209: }
210:
211: public boolean isModeHelp() {
212: return _modeHelp;
213: }
214:
215: public void setModeHelp(boolean modeHelp) {
216: _modeHelp = modeHelp;
217: }
218:
219: public boolean isModePreview() {
220: return _modePreview;
221: }
222:
223: public void setModePreview(boolean modePreview) {
224: _modePreview = modePreview;
225: }
226:
227: public boolean isModePrint() {
228: return _modePrint;
229: }
230:
231: public void setModePrint(boolean modePrint) {
232: _modePrint = modePrint;
233: }
234:
235: public boolean isShowBackIcon() {
236: return _showBackIcon;
237: }
238:
239: public void setShowBackIcon(boolean showBackIcon) {
240: _showBackIcon = showBackIcon;
241: }
242:
243: public boolean isShowCloseIcon() {
244: return _showCloseIcon;
245: }
246:
247: public void setShowCloseIcon(boolean showCloseIcon) {
248: _showCloseIcon = showCloseIcon;
249: }
250:
251: public boolean isShowConfigurationIcon() {
252: return _showConfigurationIcon;
253: }
254:
255: public void setShowConfigurationIcon(boolean showConfigurationIcon) {
256: _showConfigurationIcon = showConfigurationIcon;
257: }
258:
259: public boolean isShowEditIcon() {
260: return _showEditIcon;
261: }
262:
263: public void setShowEditIcon(boolean showEditIcon) {
264: _showEditIcon = showEditIcon;
265: }
266:
267: public boolean isShowEditDefaultsIcon() {
268: return _showEditDefaultsIcon;
269: }
270:
271: public void setShowEditDefaultsIcon(boolean showEditDefaultsIcon) {
272: _showEditDefaultsIcon = showEditDefaultsIcon;
273: }
274:
275: public boolean isShowEditGuestIcon() {
276: return _showEditGuestIcon;
277: }
278:
279: public void setShowEditGuestIcon(boolean showEditGuestIcon) {
280: _showEditGuestIcon = showEditGuestIcon;
281: }
282:
283: public boolean isShowHelpIcon() {
284: return _showHelpIcon;
285: }
286:
287: public void setShowHelpIcon(boolean showHelpIcon) {
288: _showHelpIcon = showHelpIcon;
289: }
290:
291: public boolean isShowMaxIcon() {
292: return _showMaxIcon;
293: }
294:
295: public void setShowMaxIcon(boolean showMaxIcon) {
296: _showMaxIcon = showMaxIcon;
297: }
298:
299: public boolean isShowMinIcon() {
300: return _showMinIcon;
301: }
302:
303: public void setShowMinIcon(boolean showMinIcon) {
304: _showMinIcon = showMinIcon;
305: }
306:
307: public boolean isShowMoveIcon() {
308: return _showMoveIcon;
309: }
310:
311: public void setShowMoveIcon(boolean showMoveIcon) {
312: _showMoveIcon = showMoveIcon;
313: }
314:
315: public boolean isShowPortletCssIcon() {
316: return _showPortletCssIcon;
317: }
318:
319: public void setShowPortletCssIcon(boolean showPortletCssIcon) {
320: _showPortletCssIcon = showPortletCssIcon;
321: }
322:
323: public boolean isShowPortletIcon() {
324: return _showPortletIcon;
325: }
326:
327: public void setShowPortletIcon(boolean showPortletIcon) {
328: _showPortletIcon = showPortletIcon;
329: }
330:
331: public boolean isShowPrintIcon() {
332: return _showPrintIcon;
333: }
334:
335: public void setShowPrintIcon(boolean showPrintIcon) {
336: _showPrintIcon = showPrintIcon;
337: }
338:
339: public boolean isShowRefreshIcon() {
340: return _showRefreshIcon;
341: }
342:
343: public void setShowRefreshIcon(boolean showRefreshIcon) {
344: _showRefreshIcon = showRefreshIcon;
345: }
346:
347: public String getURLBack() {
348: return _urlBack;
349: }
350:
351: public void setURLBack(String urlBack) {
352: _urlBack = urlBack;
353: }
354:
355: public String getURLClose() {
356: return _urlClose;
357: }
358:
359: public void setURLClose(String urlClose) {
360: _urlClose = urlClose;
361: }
362:
363: public String getURLConfiguration() {
364: return _urlConfiguration;
365: }
366:
367: public void setURLConfiguration(String urlConfiguration) {
368: _urlConfiguration = urlConfiguration;
369: }
370:
371: public String getURLEdit() {
372: return _urlEdit;
373: }
374:
375: public void setURLEdit(String urlEdit) {
376: _urlEdit = urlEdit;
377: }
378:
379: public String getURLEditDefaults() {
380: return _urlEditDefaults;
381: }
382:
383: public void setURLEditDefaults(String urlEditDefaults) {
384: _urlEditDefaults = urlEditDefaults;
385: }
386:
387: public String getURLEditGuest() {
388: return _urlEditGuest;
389: }
390:
391: public void setURLEditGuest(String urlEditGuest) {
392: _urlEditGuest = urlEditGuest;
393: }
394:
395: public String getURLHelp() {
396: return _urlHelp;
397: }
398:
399: public void setURLHelp(String urlHelp) {
400: _urlHelp = urlHelp;
401: }
402:
403: public String getURLMax() {
404: return _urlMax;
405: }
406:
407: public void setURLMax(String urlMax) {
408: _urlMax = urlMax;
409: }
410:
411: public String getURLMin() {
412: return _urlMin;
413: }
414:
415: public void setURLMin(String urlMin) {
416: _urlMin = urlMin;
417: }
418:
419: public String getURLPortlet() {
420: return _urlPortlet;
421: }
422:
423: public void setURLPortlet(String urlPortlet) {
424: _urlPortlet = urlPortlet;
425: }
426:
427: public String getURLPortletCss() {
428: return _urlPortletCss;
429: }
430:
431: public void setURLPortletCss(String urlPortletCss) {
432: _urlPortletCss = urlPortletCss;
433: }
434:
435: public String getURLPrint() {
436: return _urlPrint;
437: }
438:
439: public void setURLPrint(String urlPrint) {
440: _urlPrint = urlPrint;
441: }
442:
443: public String getURLRefresh() {
444: return _urlRefresh;
445: }
446:
447: public void setURLRefresh(String urlRefresh) {
448: _urlRefresh = urlRefresh;
449: }
450:
451: public boolean isRestoreCurrentView() {
452: return _restoreCurrentView;
453: }
454:
455: public void setRestoreCurrentView(boolean restoreCurrentView) {
456: _restoreCurrentView = restoreCurrentView;
457: }
458:
459: public String getContent() {
460: return _content;
461: }
462:
463: public void setContent(String content) {
464: _content = content;
465: }
466:
467: public void recycle() {
468: if (_log.isDebugEnabled()) {
469: _log.debug("Recycling instance " + hashCode());
470: }
471:
472: _id = StringPool.BLANK;
473: _rootPortletId = StringPool.BLANK;
474: _instanceId = StringPool.BLANK;
475: _resourcePK = StringPool.BLANK;
476: _portletName = StringPool.BLANK;
477: _namespace = StringPool.BLANK;
478: _title = StringPool.BLANK;
479: _access = false;
480: _active = false;
481: _columnId = StringPool.BLANK;
482: _stateExclusive = false;
483: _stateMax = false;
484: _stateMin = false;
485: _statePopUp = false;
486: _modeAbout = false;
487: _modeConfig = false;
488: _modeEdit = false;
489: _modeEditDefaults = false;
490: _modeEditGuest = false;
491: _modeHelp = false;
492: _modePreview = false;
493: _modePrint = false;
494: _showBackIcon = false;
495: _showCloseIcon = false;
496: _showConfigurationIcon = false;
497: _showEditIcon = false;
498: _showEditDefaultsIcon = false;
499: _showEditGuestIcon = false;
500: _showHelpIcon = false;
501: _showMaxIcon = false;
502: _showMinIcon = false;
503: _showMoveIcon = false;
504: _showPortletCssIcon = false;
505: _showPortletIcon = false;
506: _showPrintIcon = false;
507: _showRefreshIcon = false;
508: _urlBack = StringPool.BLANK;
509: _urlClose = StringPool.BLANK;
510: _urlConfiguration = StringPool.BLANK;
511: _urlEdit = StringPool.BLANK;
512: _urlEditDefaults = StringPool.BLANK;
513: _urlEditGuest = StringPool.BLANK;
514: _urlHelp = StringPool.BLANK;
515: _urlMax = StringPool.BLANK;
516: _urlMin = StringPool.BLANK;
517: _urlPortlet = StringPool.BLANK;
518: _urlPortletCss = StringPool.BLANK;
519: _urlPrint = StringPool.BLANK;
520: _urlRefresh = StringPool.BLANK;
521: _restoreCurrentView = false;
522: _content = StringPool.BLANK;
523: }
524:
525: public void copyFrom(PortletDisplay master) {
526: _id = master.getId();
527: _rootPortletId = master.getRootPortletId();
528: _instanceId = master.getInstanceId();
529: _resourcePK = master.getResourcePK();
530: _portletName = master.getPortletName();
531: _namespace = master.getNamespace();
532: _title = master.getTitle();
533: _access = master.isAccess();
534: _active = master.isActive();
535: _columnId = master.getColumnId();
536: _stateExclusive = master.isStateExclusive();
537: _stateMax = master.isStateMax();
538: _stateMin = master.isStateMin();
539: _statePopUp = master.isStatePopUp();
540: _modeAbout = master.isModeAbout();
541: _modeConfig = master.isModeConfig();
542: _modeEdit = master.isModeEdit();
543: _modeEditDefaults = master.isModeEditDefaults();
544: _modeEditGuest = master.isModeEditGuest();
545: _modeHelp = master.isModeHelp();
546: _modePreview = master.isModePreview();
547: _modePrint = master.isModePrint();
548: _showBackIcon = master.isShowBackIcon();
549: _showCloseIcon = master.isShowCloseIcon();
550: _showConfigurationIcon = master.isShowConfigurationIcon();
551: _showEditIcon = master.isShowEditIcon();
552: _showEditDefaultsIcon = master.isShowEditDefaultsIcon();
553: _showEditGuestIcon = master.isShowEditGuestIcon();
554: _showHelpIcon = master.isShowHelpIcon();
555: _showMaxIcon = master.isShowMaxIcon();
556: _showMinIcon = master.isShowMinIcon();
557: _showMoveIcon = master.isShowMoveIcon();
558: _showPortletCssIcon = master.isShowPortletCssIcon();
559: _showPortletIcon = master.isShowPortletIcon();
560: _showPrintIcon = master.isShowPrintIcon();
561: _showRefreshIcon = master.isShowRefreshIcon();
562: _urlBack = master.getURLBack();
563: _urlClose = master.getURLClose();
564: _urlConfiguration = master.getURLConfiguration();
565: _urlEdit = master.getURLEdit();
566: _urlEditDefaults = master.getURLEditDefaults();
567: _urlEditGuest = master.getURLEditGuest();
568: _urlHelp = master.getURLHelp();
569: _urlMax = master.getURLMax();
570: _urlMin = master.getURLMin();
571: _urlPortlet = master.getURLPortlet();
572: _urlPortletCss = master.getURLPortletCss();
573: _urlPrint = master.getURLPrint();
574: _urlRefresh = master.getURLRefresh();
575: _restoreCurrentView = master.isRestoreCurrentView();
576: _content = master.getContent();
577: }
578:
579: public void copyTo(PortletDisplay slave) {
580: slave.setId(_id);
581: slave.setRootPortletId(_rootPortletId);
582: slave.setInstanceId(_instanceId);
583: slave.setResourcePK(_resourcePK);
584: slave.setPortletName(_portletName);
585: slave.setNamespace(_namespace);
586: slave.setTitle(_title);
587: slave.setAccess(_access);
588: slave.setActive(_active);
589: slave.setColumnId(_columnId);
590: slave.setStateExclusive(_stateExclusive);
591: slave.setStateMax(_stateMax);
592: slave.setStateMin(_stateMin);
593: slave.setStatePopUp(_statePopUp);
594: slave.setModeAbout(_modeAbout);
595: slave.setModeConfig(_modeConfig);
596: slave.setModeEdit(_modeEdit);
597: slave.setModeEditDefaults(_modeEditDefaults);
598: slave.setModeEditGuest(_modeEditGuest);
599: slave.setModeHelp(_modeHelp);
600: slave.setModePreview(_modePreview);
601: slave.setModePrint(_modePrint);
602: slave.setShowBackIcon(_showBackIcon);
603: slave.setShowCloseIcon(_showCloseIcon);
604: slave.setShowConfigurationIcon(_showConfigurationIcon);
605: slave.setShowEditIcon(_showEditIcon);
606: slave.setShowEditDefaultsIcon(_showEditDefaultsIcon);
607: slave.setShowEditGuestIcon(_showEditGuestIcon);
608: slave.setShowHelpIcon(_showHelpIcon);
609: slave.setShowMaxIcon(_showMaxIcon);
610: slave.setShowMinIcon(_showMinIcon);
611: slave.setShowMoveIcon(_showMoveIcon);
612: slave.setShowPortletCssIcon(_showPortletCssIcon);
613: slave.setShowPortletIcon(_showPortletIcon);
614: slave.setShowPrintIcon(_showPrintIcon);
615: slave.setShowRefreshIcon(_showRefreshIcon);
616: slave.setURLBack(_urlBack);
617: slave.setURLClose(_urlClose);
618: slave.setURLConfiguration(_urlConfiguration);
619: slave.setURLEdit(_urlEdit);
620: slave.setURLEditDefaults(_urlEditDefaults);
621: slave.setURLEditGuest(_urlEditGuest);
622: slave.setURLHelp(_urlHelp);
623: slave.setURLMax(_urlMax);
624: slave.setURLMin(_urlMin);
625: slave.setURLPortlet(_urlPortlet);
626: slave.setURLPortletCss(_urlPortletCss);
627: slave.setURLPrint(_urlPrint);
628: slave.setURLRefresh(_urlRefresh);
629: slave.setRestoreCurrentView(_restoreCurrentView);
630: slave.setContent(_content);
631: }
632:
633: private static Log _log = LogFactoryUtil
634: .getLog(PortletDisplay.class);
635:
636: private String _id = StringPool.BLANK;
637: private String _rootPortletId = StringPool.BLANK;
638: private String _instanceId = StringPool.BLANK;
639: private String _resourcePK = StringPool.BLANK;
640: private String _portletName = StringPool.BLANK;
641: private String _namespace = StringPool.BLANK;
642: private String _title = StringPool.BLANK;
643: private boolean _access;
644: private boolean _active;
645: private String _columnId = StringPool.BLANK;
646: private int _columnPos;
647: private int _columnCount;
648: private boolean _stateExclusive;
649: private boolean _stateMax;
650: private boolean _stateMin;
651: private boolean _statePopUp;
652: private boolean _modeAbout;
653: private boolean _modeConfig;
654: private boolean _modeEdit;
655: private boolean _modeEditDefaults;
656: private boolean _modeEditGuest;
657: private boolean _modeHelp;
658: private boolean _modePreview;
659: private boolean _modePrint;
660: private boolean _showBackIcon;
661: private boolean _showCloseIcon;
662: private boolean _showConfigurationIcon;
663: private boolean _showEditIcon;
664: private boolean _showEditDefaultsIcon;
665: private boolean _showEditGuestIcon;
666: private boolean _showHelpIcon;
667: private boolean _showMaxIcon;
668: private boolean _showMinIcon;
669: private boolean _showMoveIcon;
670: private boolean _showPortletCssIcon;
671: private boolean _showPortletIcon;
672: private boolean _showPrintIcon;
673: private boolean _showRefreshIcon;
674: private String _urlBack = StringPool.BLANK;
675: private String _urlClose = StringPool.BLANK;
676: private String _urlConfiguration = StringPool.BLANK;
677: private String _urlEdit = StringPool.BLANK;
678: private String _urlEditDefaults = StringPool.BLANK;
679: private String _urlEditGuest = StringPool.BLANK;
680: private String _urlHelp = StringPool.BLANK;
681: private String _urlMax = StringPool.BLANK;
682: private String _urlMin = StringPool.BLANK;
683: private String _urlPortlet = StringPool.BLANK;
684: private String _urlPortletCss = StringPool.BLANK;
685: private String _urlPrint = StringPool.BLANK;
686: private String _urlRefresh = StringPool.BLANK;
687: private boolean _restoreCurrentView;
688: private String _content = StringPool.BLANK;
689:
690: }
|