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.portlet.journal.service;
022:
023: /**
024: * <a href="JournalTemplateServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.journal.service.JournalTemplateService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.journal.service.JournalTemplateServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.journal.service.JournalTemplateService
047: * @see com.liferay.portlet.journal.service.JournalTemplateServiceFactory
048: *
049: */
050: public class JournalTemplateServiceUtil {
051: public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
052: java.lang.String templateId, boolean autoTemplateId,
053: long plid, java.lang.String structureId,
054: java.lang.String name, java.lang.String description,
055: java.lang.String xsl, boolean formatXsl,
056: java.lang.String langType, boolean cacheable,
057: boolean smallImage, java.lang.String smallImageURL,
058: java.io.File smallFile, boolean addCommunityPermissions,
059: boolean addGuestPermissions)
060: throws com.liferay.portal.PortalException,
061: com.liferay.portal.SystemException,
062: java.rmi.RemoteException {
063: JournalTemplateService journalTemplateService = JournalTemplateServiceFactory
064: .getService();
065:
066: return journalTemplateService.addTemplate(templateId,
067: autoTemplateId, plid, structureId, name, description,
068: xsl, formatXsl, langType, cacheable, smallImage,
069: smallImageURL, smallFile, addCommunityPermissions,
070: addGuestPermissions);
071: }
072:
073: public static com.liferay.portlet.journal.model.JournalTemplate addTemplate(
074: java.lang.String templateId, boolean autoTemplateId,
075: long plid, java.lang.String structureId,
076: java.lang.String name, java.lang.String description,
077: java.lang.String xsl, boolean formatXsl,
078: java.lang.String langType, boolean cacheable,
079: boolean smallImage, java.lang.String smallImageURL,
080: java.io.File smallFile,
081: java.lang.String[] communityPermissions,
082: java.lang.String[] guestPermissions)
083: throws com.liferay.portal.PortalException,
084: com.liferay.portal.SystemException,
085: java.rmi.RemoteException {
086: JournalTemplateService journalTemplateService = JournalTemplateServiceFactory
087: .getService();
088:
089: return journalTemplateService.addTemplate(templateId,
090: autoTemplateId, plid, structureId, name, description,
091: xsl, formatXsl, langType, cacheable, smallImage,
092: smallImageURL, smallFile, communityPermissions,
093: guestPermissions);
094: }
095:
096: public static void deleteTemplate(long groupId,
097: java.lang.String templateId)
098: throws com.liferay.portal.PortalException,
099: com.liferay.portal.SystemException,
100: java.rmi.RemoteException {
101: JournalTemplateService journalTemplateService = JournalTemplateServiceFactory
102: .getService();
103:
104: journalTemplateService.deleteTemplate(groupId, templateId);
105: }
106:
107: public static com.liferay.portlet.journal.model.JournalTemplate getTemplate(
108: long groupId, java.lang.String templateId)
109: throws com.liferay.portal.PortalException,
110: com.liferay.portal.SystemException,
111: java.rmi.RemoteException {
112: JournalTemplateService journalTemplateService = JournalTemplateServiceFactory
113: .getService();
114:
115: return journalTemplateService.getTemplate(groupId, templateId);
116: }
117:
118: public static com.liferay.portlet.journal.model.JournalTemplate updateTemplate(
119: long groupId, java.lang.String templateId,
120: java.lang.String structureId, java.lang.String name,
121: java.lang.String description, java.lang.String xsl,
122: boolean formatXsl, java.lang.String langType,
123: boolean cacheable, boolean smallImage,
124: java.lang.String smallImageURL, java.io.File smallFile)
125: throws com.liferay.portal.PortalException,
126: com.liferay.portal.SystemException,
127: java.rmi.RemoteException {
128: JournalTemplateService journalTemplateService = JournalTemplateServiceFactory
129: .getService();
130:
131: return journalTemplateService.updateTemplate(groupId,
132: templateId, structureId, name, description, xsl,
133: formatXsl, langType, cacheable, smallImage,
134: smallImageURL, smallFile);
135: }
136: }
|