/portal-kernel/src/com/liferay/portal/kernel/model/LayoutSetWrapper.java

https://github.com/kiyoshilee/liferay-portal · Java · 662 lines · 317 code · 97 blank · 248 comment · 28 complexity · 9e1e6ec55c94bee14ac5ae1656c197c0 MD5 · raw file

  1. /**
  2. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or modify it under
  5. * the terms of the GNU Lesser General Public License as published by the Free
  6. * Software Foundation; either version 2.1 of the License, or (at your option)
  7. * any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  11. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  12. * details.
  13. */
  14. package com.liferay.portal.kernel.model;
  15. import com.liferay.portal.kernel.model.wrapper.BaseModelWrapper;
  16. import java.util.Date;
  17. import java.util.HashMap;
  18. import java.util.Map;
  19. /**
  20. * <p>
  21. * This class is a wrapper for {@link LayoutSet}.
  22. * </p>
  23. *
  24. * @author Brian Wing Shun Chan
  25. * @see LayoutSet
  26. * @generated
  27. */
  28. public class LayoutSetWrapper
  29. extends BaseModelWrapper<LayoutSet>
  30. implements LayoutSet, ModelWrapper<LayoutSet> {
  31. public LayoutSetWrapper(LayoutSet layoutSet) {
  32. super(layoutSet);
  33. }
  34. @Override
  35. public Map<String, Object> getModelAttributes() {
  36. Map<String, Object> attributes = new HashMap<String, Object>();
  37. attributes.put("mvccVersion", getMvccVersion());
  38. attributes.put("layoutSetId", getLayoutSetId());
  39. attributes.put("groupId", getGroupId());
  40. attributes.put("companyId", getCompanyId());
  41. attributes.put("createDate", getCreateDate());
  42. attributes.put("modifiedDate", getModifiedDate());
  43. attributes.put("privateLayout", isPrivateLayout());
  44. attributes.put("logoId", getLogoId());
  45. attributes.put("themeId", getThemeId());
  46. attributes.put("colorSchemeId", getColorSchemeId());
  47. attributes.put("css", getCss());
  48. attributes.put("settings", getSettings());
  49. attributes.put("layoutSetPrototypeUuid", getLayoutSetPrototypeUuid());
  50. attributes.put(
  51. "layoutSetPrototypeLinkEnabled", isLayoutSetPrototypeLinkEnabled());
  52. return attributes;
  53. }
  54. @Override
  55. public void setModelAttributes(Map<String, Object> attributes) {
  56. Long mvccVersion = (Long)attributes.get("mvccVersion");
  57. if (mvccVersion != null) {
  58. setMvccVersion(mvccVersion);
  59. }
  60. Long layoutSetId = (Long)attributes.get("layoutSetId");
  61. if (layoutSetId != null) {
  62. setLayoutSetId(layoutSetId);
  63. }
  64. Long groupId = (Long)attributes.get("groupId");
  65. if (groupId != null) {
  66. setGroupId(groupId);
  67. }
  68. Long companyId = (Long)attributes.get("companyId");
  69. if (companyId != null) {
  70. setCompanyId(companyId);
  71. }
  72. Date createDate = (Date)attributes.get("createDate");
  73. if (createDate != null) {
  74. setCreateDate(createDate);
  75. }
  76. Date modifiedDate = (Date)attributes.get("modifiedDate");
  77. if (modifiedDate != null) {
  78. setModifiedDate(modifiedDate);
  79. }
  80. Boolean privateLayout = (Boolean)attributes.get("privateLayout");
  81. if (privateLayout != null) {
  82. setPrivateLayout(privateLayout);
  83. }
  84. Long logoId = (Long)attributes.get("logoId");
  85. if (logoId != null) {
  86. setLogoId(logoId);
  87. }
  88. String themeId = (String)attributes.get("themeId");
  89. if (themeId != null) {
  90. setThemeId(themeId);
  91. }
  92. String colorSchemeId = (String)attributes.get("colorSchemeId");
  93. if (colorSchemeId != null) {
  94. setColorSchemeId(colorSchemeId);
  95. }
  96. String css = (String)attributes.get("css");
  97. if (css != null) {
  98. setCss(css);
  99. }
  100. String settings = (String)attributes.get("settings");
  101. if (settings != null) {
  102. setSettings(settings);
  103. }
  104. String layoutSetPrototypeUuid = (String)attributes.get(
  105. "layoutSetPrototypeUuid");
  106. if (layoutSetPrototypeUuid != null) {
  107. setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
  108. }
  109. Boolean layoutSetPrototypeLinkEnabled = (Boolean)attributes.get(
  110. "layoutSetPrototypeLinkEnabled");
  111. if (layoutSetPrototypeLinkEnabled != null) {
  112. setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
  113. }
  114. }
  115. /**
  116. * Returns the layout set's color scheme.
  117. *
  118. * <p>
  119. * Just like themes, color schemes can be configured on the layout set
  120. * level. The layout set's color scheme can be overridden on the layout
  121. * level.
  122. * </p>
  123. *
  124. * @return the layout set's color scheme
  125. */
  126. @Override
  127. public ColorScheme getColorScheme() {
  128. return model.getColorScheme();
  129. }
  130. /**
  131. * Returns the color scheme ID of this layout set.
  132. *
  133. * @return the color scheme ID of this layout set
  134. */
  135. @Override
  136. public String getColorSchemeId() {
  137. return model.getColorSchemeId();
  138. }
  139. @Override
  140. public String getCompanyFallbackVirtualHostname() {
  141. return model.getCompanyFallbackVirtualHostname();
  142. }
  143. /**
  144. * Returns the company ID of this layout set.
  145. *
  146. * @return the company ID of this layout set
  147. */
  148. @Override
  149. public long getCompanyId() {
  150. return model.getCompanyId();
  151. }
  152. /**
  153. * Returns the create date of this layout set.
  154. *
  155. * @return the create date of this layout set
  156. */
  157. @Override
  158. public Date getCreateDate() {
  159. return model.getCreateDate();
  160. }
  161. /**
  162. * Returns the css of this layout set.
  163. *
  164. * @return the css of this layout set
  165. */
  166. @Override
  167. public String getCss() {
  168. return model.getCss();
  169. }
  170. /**
  171. * Returns the layout set's group.
  172. *
  173. * @return the layout set's group
  174. */
  175. @Override
  176. public Group getGroup()
  177. throws com.liferay.portal.kernel.exception.PortalException {
  178. return model.getGroup();
  179. }
  180. /**
  181. * Returns the group ID of this layout set.
  182. *
  183. * @return the group ID of this layout set
  184. */
  185. @Override
  186. public long getGroupId() {
  187. return model.getGroupId();
  188. }
  189. /**
  190. * Returns the layout set ID of this layout set.
  191. *
  192. * @return the layout set ID of this layout set
  193. */
  194. @Override
  195. public long getLayoutSetId() {
  196. return model.getLayoutSetId();
  197. }
  198. /**
  199. * Returns the layout set prototype's ID, or <code>0</code> if it has no
  200. * layout set prototype.
  201. *
  202. * <p>
  203. * Prototype is Liferay's technical name for a site template.
  204. * </p>
  205. *
  206. * @return the layout set prototype's ID, or <code>0</code> if it has no
  207. layout set prototype
  208. */
  209. @Override
  210. public long getLayoutSetPrototypeId()
  211. throws com.liferay.portal.kernel.exception.PortalException {
  212. return model.getLayoutSetPrototypeId();
  213. }
  214. /**
  215. * Returns the layout set prototype link enabled of this layout set.
  216. *
  217. * @return the layout set prototype link enabled of this layout set
  218. */
  219. @Override
  220. public boolean getLayoutSetPrototypeLinkEnabled() {
  221. return model.getLayoutSetPrototypeLinkEnabled();
  222. }
  223. /**
  224. * Returns the layout set prototype uuid of this layout set.
  225. *
  226. * @return the layout set prototype uuid of this layout set
  227. */
  228. @Override
  229. public String getLayoutSetPrototypeUuid() {
  230. return model.getLayoutSetPrototypeUuid();
  231. }
  232. @Override
  233. public long getLiveLogoId() {
  234. return model.getLiveLogoId();
  235. }
  236. @Override
  237. public boolean getLogo() {
  238. return model.getLogo();
  239. }
  240. /**
  241. * Returns the logo ID of this layout set.
  242. *
  243. * @return the logo ID of this layout set
  244. */
  245. @Override
  246. public long getLogoId() {
  247. return model.getLogoId();
  248. }
  249. /**
  250. * Returns the modified date of this layout set.
  251. *
  252. * @return the modified date of this layout set
  253. */
  254. @Override
  255. public Date getModifiedDate() {
  256. return model.getModifiedDate();
  257. }
  258. /**
  259. * Returns the mvcc version of this layout set.
  260. *
  261. * @return the mvcc version of this layout set
  262. */
  263. @Override
  264. public long getMvccVersion() {
  265. return model.getMvccVersion();
  266. }
  267. @Override
  268. public int getPageCount() {
  269. return model.getPageCount();
  270. }
  271. /**
  272. * Returns the primary key of this layout set.
  273. *
  274. * @return the primary key of this layout set
  275. */
  276. @Override
  277. public long getPrimaryKey() {
  278. return model.getPrimaryKey();
  279. }
  280. /**
  281. * Returns the private layout of this layout set.
  282. *
  283. * @return the private layout of this layout set
  284. */
  285. @Override
  286. public boolean getPrivateLayout() {
  287. return model.getPrivateLayout();
  288. }
  289. /**
  290. * Returns the settings of this layout set.
  291. *
  292. * @return the settings of this layout set
  293. */
  294. @Override
  295. public String getSettings() {
  296. return model.getSettings();
  297. }
  298. @Override
  299. public com.liferay.portal.kernel.util.UnicodeProperties
  300. getSettingsProperties() {
  301. return model.getSettingsProperties();
  302. }
  303. @Override
  304. public String getSettingsProperty(String key) {
  305. return model.getSettingsProperty(key);
  306. }
  307. @Override
  308. public Theme getTheme() {
  309. return model.getTheme();
  310. }
  311. /**
  312. * Returns the theme ID of this layout set.
  313. *
  314. * @return the theme ID of this layout set
  315. */
  316. @Override
  317. public String getThemeId() {
  318. return model.getThemeId();
  319. }
  320. @Override
  321. public String getThemeSetting(String key, String device) {
  322. return model.getThemeSetting(key, device);
  323. }
  324. /**
  325. * Returns the name of the layout set's default virtual host.
  326. *
  327. * <p>
  328. * When accessing a layout set that has a the virtual host, the URL elements
  329. * "/web/sitename" or "/group/sitename" can be omitted.
  330. * </p>
  331. *
  332. * @return the layout set's default virtual host name, or an empty
  333. string if the layout set has no virtual hosts configured
  334. * @deprecated As of Mueller (7.2.x), replaced by {@link
  335. #getVirtualHostnames()}
  336. */
  337. @Deprecated
  338. @Override
  339. public String getVirtualHostname() {
  340. return model.getVirtualHostname();
  341. }
  342. /**
  343. * Returns the names of the layout set's virtual hosts.
  344. *
  345. * <p>
  346. * When accessing a layout set that has a the virtual host, the URL elements
  347. * "/web/sitename" or "/group/sitename" can be omitted.
  348. * </p>
  349. *
  350. * @return the layout set's virtual host names, or an empty string if the
  351. layout set has no virtual hosts configured
  352. */
  353. @Override
  354. public java.util.TreeMap<String, String> getVirtualHostnames() {
  355. return model.getVirtualHostnames();
  356. }
  357. @Override
  358. public boolean hasSetModifiedDate() {
  359. return model.hasSetModifiedDate();
  360. }
  361. @Override
  362. public boolean isLayoutSetPrototypeLinkActive() {
  363. return model.isLayoutSetPrototypeLinkActive();
  364. }
  365. /**
  366. * Returns <code>true</code> if this layout set is layout set prototype link enabled.
  367. *
  368. * @return <code>true</code> if this layout set is layout set prototype link enabled; <code>false</code> otherwise
  369. */
  370. @Override
  371. public boolean isLayoutSetPrototypeLinkEnabled() {
  372. return model.isLayoutSetPrototypeLinkEnabled();
  373. }
  374. @Override
  375. public boolean isLogo() {
  376. return model.isLogo();
  377. }
  378. /**
  379. * Returns <code>true</code> if this layout set is private layout.
  380. *
  381. * @return <code>true</code> if this layout set is private layout; <code>false</code> otherwise
  382. */
  383. @Override
  384. public boolean isPrivateLayout() {
  385. return model.isPrivateLayout();
  386. }
  387. @Override
  388. public void persist() {
  389. model.persist();
  390. }
  391. /**
  392. * Sets the color scheme ID of this layout set.
  393. *
  394. * @param colorSchemeId the color scheme ID of this layout set
  395. */
  396. @Override
  397. public void setColorSchemeId(String colorSchemeId) {
  398. model.setColorSchemeId(colorSchemeId);
  399. }
  400. @Override
  401. public void setCompanyFallbackVirtualHostname(
  402. String companyFallbackVirtualHostname) {
  403. model.setCompanyFallbackVirtualHostname(companyFallbackVirtualHostname);
  404. }
  405. /**
  406. * Sets the company ID of this layout set.
  407. *
  408. * @param companyId the company ID of this layout set
  409. */
  410. @Override
  411. public void setCompanyId(long companyId) {
  412. model.setCompanyId(companyId);
  413. }
  414. /**
  415. * Sets the create date of this layout set.
  416. *
  417. * @param createDate the create date of this layout set
  418. */
  419. @Override
  420. public void setCreateDate(Date createDate) {
  421. model.setCreateDate(createDate);
  422. }
  423. /**
  424. * Sets the css of this layout set.
  425. *
  426. * @param css the css of this layout set
  427. */
  428. @Override
  429. public void setCss(String css) {
  430. model.setCss(css);
  431. }
  432. /**
  433. * Sets the group ID of this layout set.
  434. *
  435. * @param groupId the group ID of this layout set
  436. */
  437. @Override
  438. public void setGroupId(long groupId) {
  439. model.setGroupId(groupId);
  440. }
  441. /**
  442. * Sets the layout set ID of this layout set.
  443. *
  444. * @param layoutSetId the layout set ID of this layout set
  445. */
  446. @Override
  447. public void setLayoutSetId(long layoutSetId) {
  448. model.setLayoutSetId(layoutSetId);
  449. }
  450. /**
  451. * Sets whether this layout set is layout set prototype link enabled.
  452. *
  453. * @param layoutSetPrototypeLinkEnabled the layout set prototype link enabled of this layout set
  454. */
  455. @Override
  456. public void setLayoutSetPrototypeLinkEnabled(
  457. boolean layoutSetPrototypeLinkEnabled) {
  458. model.setLayoutSetPrototypeLinkEnabled(layoutSetPrototypeLinkEnabled);
  459. }
  460. /**
  461. * Sets the layout set prototype uuid of this layout set.
  462. *
  463. * @param layoutSetPrototypeUuid the layout set prototype uuid of this layout set
  464. */
  465. @Override
  466. public void setLayoutSetPrototypeUuid(String layoutSetPrototypeUuid) {
  467. model.setLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
  468. }
  469. /**
  470. * Sets the logo ID of this layout set.
  471. *
  472. * @param logoId the logo ID of this layout set
  473. */
  474. @Override
  475. public void setLogoId(long logoId) {
  476. model.setLogoId(logoId);
  477. }
  478. /**
  479. * Sets the modified date of this layout set.
  480. *
  481. * @param modifiedDate the modified date of this layout set
  482. */
  483. @Override
  484. public void setModifiedDate(Date modifiedDate) {
  485. model.setModifiedDate(modifiedDate);
  486. }
  487. /**
  488. * Sets the mvcc version of this layout set.
  489. *
  490. * @param mvccVersion the mvcc version of this layout set
  491. */
  492. @Override
  493. public void setMvccVersion(long mvccVersion) {
  494. model.setMvccVersion(mvccVersion);
  495. }
  496. /**
  497. * Sets the primary key of this layout set.
  498. *
  499. * @param primaryKey the primary key of this layout set
  500. */
  501. @Override
  502. public void setPrimaryKey(long primaryKey) {
  503. model.setPrimaryKey(primaryKey);
  504. }
  505. /**
  506. * Sets whether this layout set is private layout.
  507. *
  508. * @param privateLayout the private layout of this layout set
  509. */
  510. @Override
  511. public void setPrivateLayout(boolean privateLayout) {
  512. model.setPrivateLayout(privateLayout);
  513. }
  514. /**
  515. * Sets the settings of this layout set.
  516. *
  517. * @param settings the settings of this layout set
  518. */
  519. @Override
  520. public void setSettings(String settings) {
  521. model.setSettings(settings);
  522. }
  523. @Override
  524. public void setSettingsProperties(
  525. com.liferay.portal.kernel.util.UnicodeProperties settingsProperties) {
  526. model.setSettingsProperties(settingsProperties);
  527. }
  528. /**
  529. * Sets the theme ID of this layout set.
  530. *
  531. * @param themeId the theme ID of this layout set
  532. */
  533. @Override
  534. public void setThemeId(String themeId) {
  535. model.setThemeId(themeId);
  536. }
  537. /**
  538. * Sets the name of the layout set's virtual host.
  539. *
  540. * @param virtualHostname the name of the layout set's virtual host
  541. * @see #getVirtualHostname()
  542. * @deprecated As of Mueller (7.2.x), replaced by {@link
  543. #setVirtualHostnames(TreeMap)}
  544. */
  545. @Deprecated
  546. @Override
  547. public void setVirtualHostname(String virtualHostname) {
  548. model.setVirtualHostname(virtualHostname);
  549. }
  550. /**
  551. * Sets the names of the layout set's virtual host name and language IDs.
  552. *
  553. * @param virtualHostnames the map of the layout set's virtual host name and
  554. language IDs
  555. * @see #getVirtualHostnames()
  556. */
  557. @Override
  558. public void setVirtualHostnames(java.util.TreeMap virtualHostnames) {
  559. model.setVirtualHostnames(virtualHostnames);
  560. }
  561. @Override
  562. protected LayoutSetWrapper wrap(LayoutSet layoutSet) {
  563. return new LayoutSetWrapper(layoutSet);
  564. }
  565. }