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="JournalArticleServiceUtil.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.JournalArticleService</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.JournalArticleServiceFactory</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.JournalArticleService
047: * @see com.liferay.portlet.journal.service.JournalArticleServiceFactory
048: *
049: */
050: public class JournalArticleServiceUtil {
051: public static com.liferay.portlet.journal.model.JournalArticle addArticle(
052: java.lang.String articleId, boolean autoArticleId,
053: long plid, java.lang.String title,
054: java.lang.String description, java.lang.String content,
055: java.lang.String type, java.lang.String structureId,
056: java.lang.String templateId, int displayDateMonth,
057: int displayDateDay, int displayDateYear,
058: int displayDateHour, int displayDateMinute,
059: int expirationDateMonth, int expirationDateDay,
060: int expirationDateYear, int expirationDateHour,
061: int expirationDateMinute, boolean neverExpire,
062: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
063: int reviewDateHour, int reviewDateMinute,
064: boolean neverReview, boolean indexable, boolean smallImage,
065: java.lang.String smallImageURL, java.io.File smallFile,
066: java.util.Map images, java.lang.String articleURL,
067: javax.portlet.PortletPreferences prefs,
068: java.lang.String[] tagsEntries,
069: boolean addCommunityPermissions, boolean addGuestPermissions)
070: throws com.liferay.portal.PortalException,
071: com.liferay.portal.SystemException,
072: java.rmi.RemoteException {
073: JournalArticleService journalArticleService = JournalArticleServiceFactory
074: .getService();
075:
076: return journalArticleService.addArticle(articleId,
077: autoArticleId, plid, title, description, content, type,
078: structureId, templateId, displayDateMonth,
079: displayDateDay, displayDateYear, displayDateHour,
080: displayDateMinute, expirationDateMonth,
081: expirationDateDay, expirationDateYear,
082: expirationDateHour, expirationDateMinute, neverExpire,
083: reviewDateMonth, reviewDateDay, reviewDateYear,
084: reviewDateHour, reviewDateMinute, neverReview,
085: indexable, smallImage, smallImageURL, smallFile,
086: images, articleURL, prefs, tagsEntries,
087: addCommunityPermissions, addGuestPermissions);
088: }
089:
090: public static com.liferay.portlet.journal.model.JournalArticle addArticle(
091: java.lang.String articleId, boolean autoArticleId,
092: long plid, java.lang.String title,
093: java.lang.String description, java.lang.String content,
094: java.lang.String type, java.lang.String structureId,
095: java.lang.String templateId, int displayDateMonth,
096: int displayDateDay, int displayDateYear,
097: int displayDateHour, int displayDateMinute,
098: int expirationDateMonth, int expirationDateDay,
099: int expirationDateYear, int expirationDateHour,
100: int expirationDateMinute, boolean neverExpire,
101: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
102: int reviewDateHour, int reviewDateMinute,
103: boolean neverReview, boolean indexable, boolean smallImage,
104: java.lang.String smallImageURL, java.io.File smallFile,
105: java.util.Map images, java.lang.String articleURL,
106: javax.portlet.PortletPreferences prefs,
107: java.lang.String[] tagsEntries,
108: java.lang.String[] communityPermissions,
109: java.lang.String[] guestPermissions)
110: throws com.liferay.portal.PortalException,
111: com.liferay.portal.SystemException,
112: java.rmi.RemoteException {
113: JournalArticleService journalArticleService = JournalArticleServiceFactory
114: .getService();
115:
116: return journalArticleService.addArticle(articleId,
117: autoArticleId, plid, title, description, content, type,
118: structureId, templateId, displayDateMonth,
119: displayDateDay, displayDateYear, displayDateHour,
120: displayDateMinute, expirationDateMonth,
121: expirationDateDay, expirationDateYear,
122: expirationDateHour, expirationDateMinute, neverExpire,
123: reviewDateMonth, reviewDateDay, reviewDateYear,
124: reviewDateHour, reviewDateMinute, neverReview,
125: indexable, smallImage, smallImageURL, smallFile,
126: images, articleURL, prefs, tagsEntries,
127: communityPermissions, guestPermissions);
128: }
129:
130: public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
131: long groupId, java.lang.String articleId, double version,
132: long plid, java.lang.String articleURL,
133: javax.portlet.PortletPreferences prefs)
134: throws com.liferay.portal.PortalException,
135: com.liferay.portal.SystemException,
136: java.rmi.RemoteException {
137: JournalArticleService journalArticleService = JournalArticleServiceFactory
138: .getService();
139:
140: return journalArticleService.approveArticle(groupId, articleId,
141: version, plid, articleURL, prefs);
142: }
143:
144: public static com.liferay.portlet.journal.model.JournalArticle getArticle(
145: long groupId, java.lang.String articleId, double version)
146: throws com.liferay.portal.PortalException,
147: com.liferay.portal.SystemException,
148: java.rmi.RemoteException {
149: JournalArticleService journalArticleService = JournalArticleServiceFactory
150: .getService();
151:
152: return journalArticleService.getArticle(groupId, articleId,
153: version);
154: }
155:
156: public static java.lang.String getArticleContent(long groupId,
157: java.lang.String articleId, java.lang.String languageId,
158: com.liferay.portal.theme.ThemeDisplay themeDisplay)
159: throws com.liferay.portal.PortalException,
160: com.liferay.portal.SystemException,
161: java.rmi.RemoteException {
162: JournalArticleService journalArticleService = JournalArticleServiceFactory
163: .getService();
164:
165: return journalArticleService.getArticleContent(groupId,
166: articleId, languageId, themeDisplay);
167: }
168:
169: public static java.lang.String getArticleContent(long groupId,
170: java.lang.String articleId, double version,
171: java.lang.String languageId,
172: com.liferay.portal.theme.ThemeDisplay themeDisplay)
173: throws com.liferay.portal.PortalException,
174: com.liferay.portal.SystemException,
175: java.rmi.RemoteException {
176: JournalArticleService journalArticleService = JournalArticleServiceFactory
177: .getService();
178:
179: return journalArticleService.getArticleContent(groupId,
180: articleId, version, languageId, themeDisplay);
181: }
182:
183: public static void deleteArticle(long groupId,
184: java.lang.String articleId, double version,
185: java.lang.String articleURL,
186: javax.portlet.PortletPreferences prefs)
187: throws com.liferay.portal.PortalException,
188: com.liferay.portal.SystemException,
189: java.rmi.RemoteException {
190: JournalArticleService journalArticleService = JournalArticleServiceFactory
191: .getService();
192:
193: journalArticleService.deleteArticle(groupId, articleId,
194: version, articleURL, prefs);
195: }
196:
197: public static void expireArticle(long groupId,
198: java.lang.String articleId, double version,
199: java.lang.String articleURL,
200: javax.portlet.PortletPreferences prefs)
201: throws com.liferay.portal.PortalException,
202: com.liferay.portal.SystemException,
203: java.rmi.RemoteException {
204: JournalArticleService journalArticleService = JournalArticleServiceFactory
205: .getService();
206:
207: journalArticleService.expireArticle(groupId, articleId,
208: version, articleURL, prefs);
209: }
210:
211: public static void removeArticleLocale(long companyId,
212: java.lang.String languageId)
213: throws com.liferay.portal.PortalException,
214: com.liferay.portal.SystemException,
215: java.rmi.RemoteException {
216: JournalArticleService journalArticleService = JournalArticleServiceFactory
217: .getService();
218:
219: journalArticleService
220: .removeArticleLocale(companyId, languageId);
221: }
222:
223: public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
224: long groupId, java.lang.String articleId, double version,
225: java.lang.String languageId)
226: throws com.liferay.portal.PortalException,
227: com.liferay.portal.SystemException,
228: java.rmi.RemoteException {
229: JournalArticleService journalArticleService = JournalArticleServiceFactory
230: .getService();
231:
232: return journalArticleService.removeArticleLocale(groupId,
233: articleId, version, languageId);
234: }
235:
236: public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
237: long groupId, java.lang.String articleId, double version,
238: boolean incrementVersion, java.lang.String title,
239: java.lang.String description, java.lang.String content,
240: java.lang.String type, java.lang.String structureId,
241: java.lang.String templateId, int displayDateMonth,
242: int displayDateDay, int displayDateYear,
243: int displayDateHour, int displayDateMinute,
244: int expirationDateMonth, int expirationDateDay,
245: int expirationDateYear, int expirationDateHour,
246: int expirationDateMinute, boolean neverExpire,
247: int reviewDateMonth, int reviewDateDay, int reviewDateYear,
248: int reviewDateHour, int reviewDateMinute,
249: boolean neverReview, boolean indexable, boolean smallImage,
250: java.lang.String smallImageURL, java.io.File smallFile,
251: java.util.Map images, java.lang.String articleURL,
252: javax.portlet.PortletPreferences prefs,
253: java.lang.String[] tagsEntries)
254: throws com.liferay.portal.PortalException,
255: com.liferay.portal.SystemException,
256: java.rmi.RemoteException {
257: JournalArticleService journalArticleService = JournalArticleServiceFactory
258: .getService();
259:
260: return journalArticleService.updateArticle(groupId, articleId,
261: version, incrementVersion, title, description, content,
262: type, structureId, templateId, displayDateMonth,
263: displayDateDay, displayDateYear, displayDateHour,
264: displayDateMinute, expirationDateMonth,
265: expirationDateDay, expirationDateYear,
266: expirationDateHour, expirationDateMinute, neverExpire,
267: reviewDateMonth, reviewDateDay, reviewDateYear,
268: reviewDateHour, reviewDateMinute, neverReview,
269: indexable, smallImage, smallImageURL, smallFile,
270: images, articleURL, prefs, tagsEntries);
271: }
272:
273: public static com.liferay.portlet.journal.model.JournalArticle updateContent(
274: long groupId, java.lang.String articleId, double version,
275: java.lang.String content)
276: throws com.liferay.portal.PortalException,
277: com.liferay.portal.SystemException,
278: java.rmi.RemoteException {
279: JournalArticleService journalArticleService = JournalArticleServiceFactory
280: .getService();
281:
282: return journalArticleService.updateContent(groupId, articleId,
283: version, content);
284: }
285: }
|