1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.portlet.journal.service;
24  
25  import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26  
27  /**
28   * <a href="JournalArticleServiceUtil.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides static methods for the
37   * {@link JournalArticleService} bean. The static methods of
38   * this class calls the same methods of the bean instance. It's convenient to be
39   * able to just write one line to call a method on a bean instead of writing a
40   * lookup call and a method call.
41   * </p>
42   *
43   * @author    Brian Wing Shun Chan
44   * @see       JournalArticleService
45   * @generated
46   */
47  public class JournalArticleServiceUtil {
48      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
49          long groupId, java.lang.String articleId, boolean autoArticleId,
50          java.lang.String title, java.lang.String description,
51          java.lang.String content, java.lang.String type,
52          java.lang.String structureId, java.lang.String templateId,
53          int displayDateMonth, int displayDateDay, int displayDateYear,
54          int displayDateHour, int displayDateMinute, int expirationDateMonth,
55          int expirationDateDay, int expirationDateYear, int expirationDateHour,
56          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
57          int reviewDateDay, int reviewDateYear, int reviewDateHour,
58          int reviewDateMinute, boolean neverReview, boolean indexable,
59          java.lang.String articleURL,
60          com.liferay.portal.service.ServiceContext serviceContext)
61          throws com.liferay.portal.PortalException,
62              com.liferay.portal.SystemException {
63          return getService()
64                     .addArticle(groupId, articleId, autoArticleId, title,
65              description, content, type, structureId, templateId,
66              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
67              displayDateMinute, expirationDateMonth, expirationDateDay,
68              expirationDateYear, expirationDateHour, expirationDateMinute,
69              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
70              reviewDateHour, reviewDateMinute, neverReview, indexable,
71              articleURL, serviceContext);
72      }
73  
74      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
75          long groupId, java.lang.String articleId, boolean autoArticleId,
76          java.lang.String title, java.lang.String description,
77          java.lang.String content, java.lang.String type,
78          java.lang.String structureId, java.lang.String templateId,
79          int displayDateMonth, int displayDateDay, int displayDateYear,
80          int displayDateHour, int displayDateMinute, int expirationDateMonth,
81          int expirationDateDay, int expirationDateYear, int expirationDateHour,
82          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
83          int reviewDateDay, int reviewDateYear, int reviewDateHour,
84          int reviewDateMinute, boolean neverReview, boolean indexable,
85          boolean smallImage, java.lang.String smallImageURL,
86          java.io.File smallFile, java.util.Map<String, byte[]> images,
87          java.lang.String articleURL,
88          com.liferay.portal.service.ServiceContext serviceContext)
89          throws com.liferay.portal.PortalException,
90              com.liferay.portal.SystemException {
91          return getService()
92                     .addArticle(groupId, articleId, autoArticleId, title,
93              description, content, type, structureId, templateId,
94              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
95              displayDateMinute, expirationDateMonth, expirationDateDay,
96              expirationDateYear, expirationDateHour, expirationDateMinute,
97              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
98              reviewDateHour, reviewDateMinute, neverReview, indexable,
99              smallImage, smallImageURL, smallFile, images, articleURL,
100             serviceContext);
101     }
102 
103     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
104         long groupId, java.lang.String articleId, double version,
105         java.lang.String articleURL,
106         com.liferay.portal.service.ServiceContext serviceContext)
107         throws com.liferay.portal.PortalException,
108             com.liferay.portal.SystemException {
109         return getService()
110                    .approveArticle(groupId, articleId, version, articleURL,
111             serviceContext);
112     }
113 
114     public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
115         long groupId, java.lang.String oldArticleId,
116         java.lang.String newArticleId, boolean autoArticleId, double version)
117         throws com.liferay.portal.PortalException,
118             com.liferay.portal.SystemException {
119         return getService()
120                    .copyArticle(groupId, oldArticleId, newArticleId,
121             autoArticleId, version);
122     }
123 
124     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
125         long groupId, java.lang.String articleId)
126         throws com.liferay.portal.PortalException,
127             com.liferay.portal.SystemException {
128         return getService().getArticle(groupId, articleId);
129     }
130 
131     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
132         long groupId, java.lang.String articleId, double version)
133         throws com.liferay.portal.PortalException,
134             com.liferay.portal.SystemException {
135         return getService().getArticle(groupId, articleId, version);
136     }
137 
138     public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
139         long groupId, java.lang.String urlTitle)
140         throws com.liferay.portal.PortalException,
141             com.liferay.portal.SystemException {
142         return getService().getArticleByUrlTitle(groupId, urlTitle);
143     }
144 
145     public static java.lang.String getArticleContent(long groupId,
146         java.lang.String articleId, java.lang.String languageId,
147         com.liferay.portal.theme.ThemeDisplay themeDisplay)
148         throws com.liferay.portal.PortalException,
149             com.liferay.portal.SystemException {
150         return getService()
151                    .getArticleContent(groupId, articleId, languageId,
152             themeDisplay);
153     }
154 
155     public static java.lang.String getArticleContent(long groupId,
156         java.lang.String articleId, double version,
157         java.lang.String languageId,
158         com.liferay.portal.theme.ThemeDisplay themeDisplay)
159         throws com.liferay.portal.PortalException,
160             com.liferay.portal.SystemException {
161         return getService()
162                    .getArticleContent(groupId, articleId, version, languageId,
163             themeDisplay);
164     }
165 
166     public static void deleteArticle(long groupId, java.lang.String articleId,
167         double version, java.lang.String articleURL,
168         com.liferay.portal.service.ServiceContext serviceContext)
169         throws com.liferay.portal.PortalException,
170             com.liferay.portal.SystemException {
171         getService()
172             .deleteArticle(groupId, articleId, version, articleURL,
173             serviceContext);
174     }
175 
176     public static void expireArticle(long groupId, java.lang.String articleId,
177         double version, java.lang.String articleURL,
178         com.liferay.portal.service.ServiceContext serviceContext)
179         throws com.liferay.portal.PortalException,
180             com.liferay.portal.SystemException {
181         getService()
182             .expireArticle(groupId, articleId, version, articleURL,
183             serviceContext);
184     }
185 
186     public static void removeArticleLocale(long companyId,
187         java.lang.String languageId)
188         throws com.liferay.portal.PortalException,
189             com.liferay.portal.SystemException {
190         getService().removeArticleLocale(companyId, languageId);
191     }
192 
193     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
194         long groupId, java.lang.String articleId, double version,
195         java.lang.String languageId)
196         throws com.liferay.portal.PortalException,
197             com.liferay.portal.SystemException {
198         return getService()
199                    .removeArticleLocale(groupId, articleId, version, languageId);
200     }
201 
202     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
203         long groupId, java.lang.String articleId, double version,
204         boolean incrementVersion, java.lang.String content)
205         throws com.liferay.portal.PortalException,
206             com.liferay.portal.SystemException {
207         return getService()
208                    .updateArticle(groupId, articleId, version,
209             incrementVersion, content);
210     }
211 
212     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
213         long groupId, java.lang.String articleId, double version,
214         boolean incrementVersion, java.lang.String title,
215         java.lang.String description, java.lang.String content,
216         java.lang.String type, java.lang.String structureId,
217         java.lang.String templateId, int displayDateMonth, int displayDateDay,
218         int displayDateYear, int displayDateHour, int displayDateMinute,
219         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
220         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
221         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
222         int reviewDateHour, int reviewDateMinute, boolean neverReview,
223         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
224         java.io.File smallFile, java.util.Map<String, byte[]> images,
225         java.lang.String articleURL,
226         com.liferay.portal.service.ServiceContext serviceContext)
227         throws com.liferay.portal.PortalException,
228             com.liferay.portal.SystemException {
229         return getService()
230                    .updateArticle(groupId, articleId, version,
231             incrementVersion, title, description, content, type, structureId,
232             templateId, displayDateMonth, displayDateDay, displayDateYear,
233             displayDateHour, displayDateMinute, expirationDateMonth,
234             expirationDateDay, expirationDateYear, expirationDateHour,
235             expirationDateMinute, neverExpire, reviewDateMonth, reviewDateDay,
236             reviewDateYear, reviewDateHour, reviewDateMinute, neverReview,
237             indexable, smallImage, smallImageURL, smallFile, images,
238             articleURL, serviceContext);
239     }
240 
241     public static com.liferay.portlet.journal.model.JournalArticle updateContent(
242         long groupId, java.lang.String articleId, double version,
243         java.lang.String content)
244         throws com.liferay.portal.PortalException,
245             com.liferay.portal.SystemException {
246         return getService().updateContent(groupId, articleId, version, content);
247     }
248 
249     public static JournalArticleService getService() {
250         if (_service == null) {
251             _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName());
252         }
253 
254         return _service;
255     }
256 
257     public void setService(JournalArticleService service) {
258         _service = service;
259     }
260 
261     private static JournalArticleService _service;
262 }