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  
26  /**
27   * <a href="JournalArticleServiceUtil.java.html"><b><i>View Source</i></b></a>
28   *
29   * <p>
30   * ServiceBuilder generated this class. Modifications in this class will be
31   * overwritten the next time is generated.
32   * </p>
33   *
34   * <p>
35   * This class provides static methods for the
36   * {@link JournalArticleService} bean. The static methods of
37   * this class calls the same methods of the bean instance. It's convenient to be
38   * able to just write one line to call a method on a bean instead of writing a
39   * lookup call and a method call.
40   * </p>
41   *
42   * @author    Brian Wing Shun Chan
43   * @see       JournalArticleService
44   * @generated
45   */
46  public class JournalArticleServiceUtil {
47      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
48          long groupId, java.lang.String articleId, boolean autoArticleId,
49          java.lang.String title, java.lang.String description,
50          java.lang.String content, java.lang.String type,
51          java.lang.String structureId, java.lang.String templateId,
52          int displayDateMonth, int displayDateDay, int displayDateYear,
53          int displayDateHour, int displayDateMinute, int expirationDateMonth,
54          int expirationDateDay, int expirationDateYear, int expirationDateHour,
55          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
56          int reviewDateDay, int reviewDateYear, int reviewDateHour,
57          int reviewDateMinute, boolean neverReview, boolean indexable,
58          java.lang.String articleURL,
59          com.liferay.portal.service.ServiceContext serviceContext)
60          throws com.liferay.portal.PortalException,
61              com.liferay.portal.SystemException {
62          return getService()
63                     .addArticle(groupId, articleId, autoArticleId, title,
64              description, content, type, structureId, templateId,
65              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
66              displayDateMinute, expirationDateMonth, expirationDateDay,
67              expirationDateYear, expirationDateHour, expirationDateMinute,
68              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
69              reviewDateHour, reviewDateMinute, neverReview, indexable,
70              articleURL, serviceContext);
71      }
72  
73      public static com.liferay.portlet.journal.model.JournalArticle addArticle(
74          long groupId, java.lang.String articleId, boolean autoArticleId,
75          java.lang.String title, java.lang.String description,
76          java.lang.String content, java.lang.String type,
77          java.lang.String structureId, java.lang.String templateId,
78          int displayDateMonth, int displayDateDay, int displayDateYear,
79          int displayDateHour, int displayDateMinute, int expirationDateMonth,
80          int expirationDateDay, int expirationDateYear, int expirationDateHour,
81          int expirationDateMinute, boolean neverExpire, int reviewDateMonth,
82          int reviewDateDay, int reviewDateYear, int reviewDateHour,
83          int reviewDateMinute, boolean neverReview, boolean indexable,
84          boolean smallImage, java.lang.String smallImageURL,
85          java.io.File smallFile, java.util.Map<String, byte[]> images,
86          java.lang.String articleURL,
87          com.liferay.portal.service.ServiceContext serviceContext)
88          throws com.liferay.portal.PortalException,
89              com.liferay.portal.SystemException {
90          return getService()
91                     .addArticle(groupId, articleId, autoArticleId, title,
92              description, content, type, structureId, templateId,
93              displayDateMonth, displayDateDay, displayDateYear, displayDateHour,
94              displayDateMinute, expirationDateMonth, expirationDateDay,
95              expirationDateYear, expirationDateHour, expirationDateMinute,
96              neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear,
97              reviewDateHour, reviewDateMinute, neverReview, indexable,
98              smallImage, smallImageURL, smallFile, images, articleURL,
99              serviceContext);
100     }
101 
102     public static com.liferay.portlet.journal.model.JournalArticle approveArticle(
103         long groupId, java.lang.String articleId, double version,
104         java.lang.String articleURL,
105         com.liferay.portal.service.ServiceContext serviceContext)
106         throws com.liferay.portal.PortalException,
107             com.liferay.portal.SystemException {
108         return getService()
109                    .approveArticle(groupId, articleId, version, articleURL,
110             serviceContext);
111     }
112 
113     public static com.liferay.portlet.journal.model.JournalArticle copyArticle(
114         long groupId, java.lang.String oldArticleId,
115         java.lang.String newArticleId, boolean autoArticleId, double version)
116         throws com.liferay.portal.PortalException,
117             com.liferay.portal.SystemException {
118         return getService()
119                    .copyArticle(groupId, oldArticleId, newArticleId,
120             autoArticleId, version);
121     }
122 
123     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
124         long groupId, java.lang.String articleId)
125         throws com.liferay.portal.PortalException,
126             com.liferay.portal.SystemException {
127         return getService().getArticle(groupId, articleId);
128     }
129 
130     public static com.liferay.portlet.journal.model.JournalArticle getArticle(
131         long groupId, java.lang.String articleId, double version)
132         throws com.liferay.portal.PortalException,
133             com.liferay.portal.SystemException {
134         return getService().getArticle(groupId, articleId, version);
135     }
136 
137     public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle(
138         long groupId, java.lang.String urlTitle)
139         throws com.liferay.portal.PortalException,
140             com.liferay.portal.SystemException {
141         return getService().getArticleByUrlTitle(groupId, urlTitle);
142     }
143 
144     public static java.lang.String getArticleContent(long groupId,
145         java.lang.String articleId, java.lang.String languageId,
146         com.liferay.portal.theme.ThemeDisplay themeDisplay)
147         throws com.liferay.portal.PortalException,
148             com.liferay.portal.SystemException {
149         return getService()
150                    .getArticleContent(groupId, articleId, languageId,
151             themeDisplay);
152     }
153 
154     public static java.lang.String getArticleContent(long groupId,
155         java.lang.String articleId, double version,
156         java.lang.String languageId,
157         com.liferay.portal.theme.ThemeDisplay themeDisplay)
158         throws com.liferay.portal.PortalException,
159             com.liferay.portal.SystemException {
160         return getService()
161                    .getArticleContent(groupId, articleId, version, languageId,
162             themeDisplay);
163     }
164 
165     public static void deleteArticle(long groupId, java.lang.String articleId,
166         double version, java.lang.String articleURL,
167         com.liferay.portal.service.ServiceContext serviceContext)
168         throws com.liferay.portal.PortalException,
169             com.liferay.portal.SystemException {
170         getService()
171             .deleteArticle(groupId, articleId, version, articleURL,
172             serviceContext);
173     }
174 
175     public static void expireArticle(long groupId, java.lang.String articleId,
176         double version, java.lang.String articleURL,
177         com.liferay.portal.service.ServiceContext serviceContext)
178         throws com.liferay.portal.PortalException,
179             com.liferay.portal.SystemException {
180         getService()
181             .expireArticle(groupId, articleId, version, articleURL,
182             serviceContext);
183     }
184 
185     public static void removeArticleLocale(long companyId,
186         java.lang.String languageId)
187         throws com.liferay.portal.PortalException,
188             com.liferay.portal.SystemException {
189         getService().removeArticleLocale(companyId, languageId);
190     }
191 
192     public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale(
193         long groupId, java.lang.String articleId, double version,
194         java.lang.String languageId)
195         throws com.liferay.portal.PortalException,
196             com.liferay.portal.SystemException {
197         return getService()
198                    .removeArticleLocale(groupId, articleId, version, languageId);
199     }
200 
201     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
202         long groupId, java.lang.String articleId, double version,
203         boolean incrementVersion, java.lang.String content)
204         throws com.liferay.portal.PortalException,
205             com.liferay.portal.SystemException {
206         return getService()
207                    .updateArticle(groupId, articleId, version,
208             incrementVersion, content);
209     }
210 
211     public static com.liferay.portlet.journal.model.JournalArticle updateArticle(
212         long groupId, java.lang.String articleId, double version,
213         boolean incrementVersion, java.lang.String title,
214         java.lang.String description, java.lang.String content,
215         java.lang.String type, java.lang.String structureId,
216         java.lang.String templateId, int displayDateMonth, int displayDateDay,
217         int displayDateYear, int displayDateHour, int displayDateMinute,
218         int expirationDateMonth, int expirationDateDay, int expirationDateYear,
219         int expirationDateHour, int expirationDateMinute, boolean neverExpire,
220         int reviewDateMonth, int reviewDateDay, int reviewDateYear,
221         int reviewDateHour, int reviewDateMinute, boolean neverReview,
222         boolean indexable, boolean smallImage, java.lang.String smallImageURL,
223         java.io.File smallFile, java.util.Map<String, byte[]> images,
224         java.lang.String articleURL,
225         com.liferay.portal.service.ServiceContext serviceContext)
226         throws com.liferay.portal.PortalException,
227             com.liferay.portal.SystemException {
228         return getService()
229                    .updateArticle(groupId, articleId, version,
230             incrementVersion, title, description, content, type, structureId,
231             templateId, displayDateMonth, displayDateDay, displayDateYear,
232             displayDateHour, displayDateMinute, expirationDateMonth,
233             expirationDateDay, expirationDateYear, expirationDateHour,
234             expirationDateMinute, neverExpire, reviewDateMonth, reviewDateDay,
235             reviewDateYear, reviewDateHour, reviewDateMinute, neverReview,
236             indexable, smallImage, smallImageURL, smallFile, images,
237             articleURL, serviceContext);
238     }
239 
240     public static com.liferay.portlet.journal.model.JournalArticle updateContent(
241         long groupId, java.lang.String articleId, double version,
242         java.lang.String content)
243         throws com.liferay.portal.PortalException,
244             com.liferay.portal.SystemException {
245         return getService().updateContent(groupId, articleId, version, content);
246     }
247 
248     public static JournalArticleService getService() {
249         if (_service == null) {
250             throw new RuntimeException("JournalArticleService is not set");
251         }
252 
253         return _service;
254     }
255 
256     public void setService(JournalArticleService service) {
257         _service = service;
258     }
259 
260     private static JournalArticleService _service;
261 }