1
14
15 package com.liferay.portlet.journal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class JournalTemplateServiceUtil {
42 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
43 long groupId, java.lang.String templateId, boolean autoTemplateId,
44 java.lang.String structureId, java.lang.String name,
45 java.lang.String description, java.lang.String xsl, boolean formatXsl,
46 java.lang.String langType, boolean cacheable,
47 com.liferay.portal.service.ServiceContext serviceContext)
48 throws com.liferay.portal.PortalException,
49 com.liferay.portal.SystemException {
50 return getService()
51 .addTemplate(groupId, templateId, autoTemplateId,
52 structureId, name, description, xsl, formatXsl, langType,
53 cacheable, serviceContext);
54 }
55
56 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
57 long groupId, java.lang.String templateId, boolean autoTemplateId,
58 java.lang.String structureId, java.lang.String name,
59 java.lang.String description, java.lang.String xsl, boolean formatXsl,
60 java.lang.String langType, boolean cacheable, boolean smallImage,
61 java.lang.String smallImageURL, java.io.File smallFile,
62 com.liferay.portal.service.ServiceContext serviceContext)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 return getService()
66 .addTemplate(groupId, templateId, autoTemplateId,
67 structureId, name, description, xsl, formatXsl, langType,
68 cacheable, smallImage, smallImageURL, smallFile, serviceContext);
69 }
70
71 public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
72 long groupId, java.lang.String oldTemplateId,
73 java.lang.String newTemplateId, boolean autoTemplateId)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService()
77 .copyTemplate(groupId, oldTemplateId, newTemplateId,
78 autoTemplateId);
79 }
80
81 public static void deleteTemplate(long groupId, java.lang.String templateId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException {
84 getService().deleteTemplate(groupId, templateId);
85 }
86
87 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
88 long groupId, java.lang.String structureId)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException {
91 return getService().getStructureTemplates(groupId, structureId);
92 }
93
94 public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
95 long groupId, java.lang.String templateId)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 return getService().getTemplate(groupId, templateId);
99 }
100
101 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
102 long groupId, java.lang.String templateId,
103 java.lang.String structureId, java.lang.String name,
104 java.lang.String description, java.lang.String xsl, boolean formatXsl,
105 java.lang.String langType, boolean cacheable,
106 com.liferay.portal.service.ServiceContext serviceContext)
107 throws com.liferay.portal.PortalException,
108 com.liferay.portal.SystemException {
109 return getService()
110 .updateTemplate(groupId, templateId, structureId, name,
111 description, xsl, formatXsl, langType, cacheable, serviceContext);
112 }
113
114 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
115 long groupId, java.lang.String templateId,
116 java.lang.String structureId, java.lang.String name,
117 java.lang.String description, java.lang.String xsl, boolean formatXsl,
118 java.lang.String langType, boolean cacheable, boolean smallImage,
119 java.lang.String smallImageURL, java.io.File smallFile,
120 com.liferay.portal.service.ServiceContext serviceContext)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException {
123 return getService()
124 .updateTemplate(groupId, templateId, structureId, name,
125 description, xsl, formatXsl, langType, cacheable, smallImage,
126 smallImageURL, smallFile, serviceContext);
127 }
128
129 public static JournalTemplateService getService() {
130 if (_service == null) {
131 _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
132
133 ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
134 "_service");
135 MethodCache.remove(JournalTemplateService.class);
136 }
137
138 return _service;
139 }
140
141 public void setService(JournalTemplateService service) {
142 MethodCache.remove(JournalTemplateService.class);
143
144 _service = service;
145
146 ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
147 "_service");
148 MethodCache.remove(JournalTemplateService.class);
149 }
150
151 private static JournalTemplateService _service;
152 }