001
014
015 package com.liferay.portlet.journal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class JournalTemplateServiceUtil {
035
040 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
041 long groupId, java.lang.String templateId, boolean autoTemplateId,
042 java.lang.String structureId, java.lang.String name,
043 java.lang.String description, java.lang.String xsl, boolean formatXsl,
044 java.lang.String langType, boolean cacheable,
045 com.liferay.portal.service.ServiceContext serviceContext)
046 throws com.liferay.portal.kernel.exception.PortalException,
047 com.liferay.portal.kernel.exception.SystemException {
048 return getService()
049 .addTemplate(groupId, templateId, autoTemplateId,
050 structureId, name, description, xsl, formatXsl, langType,
051 cacheable, serviceContext);
052 }
053
054 public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
055 long groupId, java.lang.String templateId, boolean autoTemplateId,
056 java.lang.String structureId, java.lang.String name,
057 java.lang.String description, java.lang.String xsl, boolean formatXsl,
058 java.lang.String langType, boolean cacheable, boolean smallImage,
059 java.lang.String smallImageURL, java.io.File smallFile,
060 com.liferay.portal.service.ServiceContext serviceContext)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 return getService()
064 .addTemplate(groupId, templateId, autoTemplateId,
065 structureId, name, description, xsl, formatXsl, langType,
066 cacheable, smallImage, smallImageURL, smallFile, serviceContext);
067 }
068
069 public static com.liferay.portlet.journal.model.JournalTemplate copyTemplate(
070 long groupId, java.lang.String oldTemplateId,
071 java.lang.String newTemplateId, boolean autoTemplateId)
072 throws com.liferay.portal.kernel.exception.PortalException,
073 com.liferay.portal.kernel.exception.SystemException {
074 return getService()
075 .copyTemplate(groupId, oldTemplateId, newTemplateId,
076 autoTemplateId);
077 }
078
079 public static void deleteTemplate(long groupId, java.lang.String templateId)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 getService().deleteTemplate(groupId, templateId);
083 }
084
085 public static java.util.List<com.liferay.portlet.journal.model.JournalTemplate> getStructureTemplates(
086 long groupId, java.lang.String structureId)
087 throws com.liferay.portal.kernel.exception.PortalException,
088 com.liferay.portal.kernel.exception.SystemException {
089 return getService().getStructureTemplates(groupId, structureId);
090 }
091
092 public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
093 long groupId, java.lang.String templateId)
094 throws com.liferay.portal.kernel.exception.PortalException,
095 com.liferay.portal.kernel.exception.SystemException {
096 return getService().getTemplate(groupId, templateId);
097 }
098
099 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
100 long groupId, java.lang.String templateId,
101 java.lang.String structureId, java.lang.String name,
102 java.lang.String description, java.lang.String xsl, boolean formatXsl,
103 java.lang.String langType, boolean cacheable,
104 com.liferay.portal.service.ServiceContext serviceContext)
105 throws com.liferay.portal.kernel.exception.PortalException,
106 com.liferay.portal.kernel.exception.SystemException {
107 return getService()
108 .updateTemplate(groupId, templateId, structureId, name,
109 description, xsl, formatXsl, langType, cacheable, serviceContext);
110 }
111
112 public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
113 long groupId, java.lang.String templateId,
114 java.lang.String structureId, java.lang.String name,
115 java.lang.String description, java.lang.String xsl, boolean formatXsl,
116 java.lang.String langType, boolean cacheable, boolean smallImage,
117 java.lang.String smallImageURL, java.io.File smallFile,
118 com.liferay.portal.service.ServiceContext serviceContext)
119 throws com.liferay.portal.kernel.exception.PortalException,
120 com.liferay.portal.kernel.exception.SystemException {
121 return getService()
122 .updateTemplate(groupId, templateId, structureId, name,
123 description, xsl, formatXsl, langType, cacheable, smallImage,
124 smallImageURL, smallFile, serviceContext);
125 }
126
127 public static JournalTemplateService getService() {
128 if (_service == null) {
129 _service = (JournalTemplateService)PortalBeanLocatorUtil.locate(JournalTemplateService.class.getName());
130
131 ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
132 "_service");
133 MethodCache.remove(JournalTemplateService.class);
134 }
135
136 return _service;
137 }
138
139 public void setService(JournalTemplateService service) {
140 MethodCache.remove(JournalTemplateService.class);
141
142 _service = service;
143
144 ReferenceRegistry.registerReference(JournalTemplateServiceUtil.class,
145 "_service");
146 MethodCache.remove(JournalTemplateService.class);
147 }
148
149 private static JournalTemplateService _service;
150 }