001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.journal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the remote service utility for JournalArticle. This utility wraps 024 * {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on a remote server. Methods of this service are expected to have security 027 * checks based on the propagated JAAS credentials because this service can be 028 * accessed remotely. 029 * 030 * @author Brian Wing Shun Chan 031 * @see JournalArticleService 032 * @see com.liferay.portlet.journal.service.base.JournalArticleServiceBaseImpl 033 * @see com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class JournalArticleServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Returns the Spring bean ID for this bean. 046 * 047 * @return the Spring bean ID for this bean 048 */ 049 public static java.lang.String getBeanIdentifier() { 050 return getService().getBeanIdentifier(); 051 } 052 053 /** 054 * Sets the Spring bean ID for this bean. 055 * 056 * @param beanIdentifier the Spring bean ID for this bean 057 */ 058 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 059 getService().setBeanIdentifier(beanIdentifier); 060 } 061 062 /** 063 * Adds a web content article with additional parameters. 064 * 065 * @param groupId the primary key of the web content article's group 066 * @param folderId the primary key of the web content article folder 067 * @param classNameId the primary key of the DDMStructure class if the web 068 content article is related to a DDM structure, the primary key of 069 the class name associated with the article, or {@link 070 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 071 * @param classPK the primary key of the DDM structure, if the primary key 072 of the DDMStructure class is given as the 073 <code>classNameId</code> parameter, the primary key of the class 074 associated with the web content article, or <code>0</code> 075 otherwise 076 * @param articleId the primary key of the web content article 077 * @param autoArticleId whether to auto generate the web content article ID 078 * @param titleMap the web content article's locales and localized titles 079 * @param descriptionMap the web content article's locales and localized 080 descriptions 081 * @param content the HTML content wrapped in XML. For more information, 082 see the content example in the class description for {@link 083 JournalArticleLocalServiceImpl}. 084 * @param type the structure's type, if the web content article is related 085 to a DDM structure. For more information, see {@link 086 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 087 * @param ddmStructureKey the primary key of the web content article's DDM 088 structure, if the article is related to a DDM structure, or 089 <code>null</code> otherwise 090 * @param ddmTemplateKey the primary key of the web content article's DDM 091 template (optionally <code>null</code>). If the article is 092 related to a DDM structure, the template's structure must match 093 it. 094 * @param layoutUuid the unique string identifying the web content 095 article's display page 096 * @param displayDateMonth the month the web content article is set to 097 display 098 * @param displayDateDay the calendar day the web content article is set to 099 display 100 * @param displayDateYear the year the web content article is set to 101 display 102 * @param displayDateHour the hour the web content article is set to 103 display 104 * @param displayDateMinute the minute the web content article is set to 105 display 106 * @param expirationDateMonth the month the web content article is set to 107 expire 108 * @param expirationDateDay the calendar day the web content article is set 109 to expire 110 * @param expirationDateYear the year the web content article is set to 111 expire 112 * @param expirationDateHour the hour the web content article is set to 113 expire 114 * @param expirationDateMinute the minute the web content article is set to 115 expire 116 * @param neverExpire whether the web content article is not set to auto 117 expire 118 * @param reviewDateMonth the month the web content article is set for 119 review 120 * @param reviewDateDay the calendar day the web content article is set for 121 review 122 * @param reviewDateYear the year the web content article is set for review 123 * @param reviewDateHour the hour the web content article is set for review 124 * @param reviewDateMinute the minute the web content article is set for 125 review 126 * @param neverReview whether the web content article is not set for review 127 * @param indexable whether the web content article is searchable 128 * @param smallImage whether the web content article has a small image 129 * @param smallImageURL the web content article's small image URL 130 * @param smallFile the web content article's small image file 131 * @param images the web content's images 132 * @param articleURL the web content article's accessible URL 133 * @param serviceContext the service context to be applied. Can set the 134 UUID, creation date, modification date, expando bridge 135 attributes, guest permissions, group permissions, asset category 136 IDs, asset tag names, asset link entry IDs, the "urlTitle" 137 attribute, and workflow actions for the web content article. Can 138 also set whether to add the default guest and group permissions. 139 * @return the web content article 140 * @throws PortalException if the user did not have permission to add the 141 web content article or if a portal exception occurred 142 * @throws SystemException if a system exception occurred 143 */ 144 public static com.liferay.portlet.journal.model.JournalArticle addArticle( 145 long groupId, long folderId, long classNameId, long classPK, 146 java.lang.String articleId, boolean autoArticleId, 147 java.util.Map<java.util.Locale, java.lang.String> titleMap, 148 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 149 java.lang.String content, java.lang.String type, 150 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 151 java.lang.String layoutUuid, int displayDateMonth, int displayDateDay, 152 int displayDateYear, int displayDateHour, int displayDateMinute, 153 int expirationDateMonth, int expirationDateDay, int expirationDateYear, 154 int expirationDateHour, int expirationDateMinute, boolean neverExpire, 155 int reviewDateMonth, int reviewDateDay, int reviewDateYear, 156 int reviewDateHour, int reviewDateMinute, boolean neverReview, 157 boolean indexable, boolean smallImage, java.lang.String smallImageURL, 158 java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images, 159 java.lang.String articleURL, 160 com.liferay.portal.service.ServiceContext serviceContext) 161 throws com.liferay.portal.kernel.exception.PortalException, 162 com.liferay.portal.kernel.exception.SystemException { 163 return getService() 164 .addArticle(groupId, folderId, classNameId, classPK, 165 articleId, autoArticleId, titleMap, descriptionMap, content, type, 166 ddmStructureKey, ddmTemplateKey, layoutUuid, displayDateMonth, 167 displayDateDay, displayDateYear, displayDateHour, 168 displayDateMinute, expirationDateMonth, expirationDateDay, 169 expirationDateYear, expirationDateHour, expirationDateMinute, 170 neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear, 171 reviewDateHour, reviewDateMinute, neverReview, indexable, 172 smallImage, smallImageURL, smallFile, images, articleURL, 173 serviceContext); 174 } 175 176 /** 177 * Adds a web content article without any images. 178 * 179 * @param groupId the primary key of the web content article's group 180 * @param folderId the primary key of the web content article folder 181 * @param classNameId the primary key of the DDMStructure class if the web 182 content article is related to a DDM structure, the primary key of 183 the class name associated with the article, or {@link 184 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 185 * @param classPK the primary key of the DDM structure, if the primary key 186 of the DDMStructure class is given as the 187 <code>classNameId</code> parameter, the primary key of the class 188 associated with the web content article, or <code>0</code> 189 otherwise 190 * @param articleId the primary key of the web content article 191 * @param autoArticleId whether to auto generate the web content article ID 192 * @param titleMap the web content article's locales and localized titles 193 * @param descriptionMap the web content article's locales and localized 194 descriptions 195 * @param content the HTML content wrapped in XML. For more information, 196 see the content example in the class description for {@link 197 JournalArticleLocalServiceImpl}. 198 * @param type the structure's type, if the web content article is related 199 to a DDM structure. For more information, see {@link 200 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 201 * @param ddmStructureKey the primary key of the web content article's DDM 202 structure, if the article is related to a DDM structure, or 203 <code>null</code> otherwise 204 * @param ddmTemplateKey the primary key of the web content article's DDM 205 template (optionally <code>null</code>). If the article is 206 related to a DDM structure, the template's structure must match 207 it. 208 * @param layoutUuid the unique string identifying the web content 209 article's display page 210 * @param displayDateMonth the month the web content article is set to 211 display 212 * @param displayDateDay the calendar day the web content article is set to 213 display 214 * @param displayDateYear the year the web content article is set to 215 display 216 * @param displayDateHour the hour the web content article is set to 217 display 218 * @param displayDateMinute the minute the web content article is set to 219 display 220 * @param expirationDateMonth the month the web content article is set to 221 expire 222 * @param expirationDateDay the calendar day the web content article is set 223 to expire 224 * @param expirationDateYear the year the web content article is set to 225 expire 226 * @param expirationDateHour the hour the web content article is set to 227 expire 228 * @param expirationDateMinute the minute the web content article is set to 229 expire 230 * @param neverExpire whether the web content article is not set to auto 231 expire 232 * @param reviewDateMonth the month the web content article is set for 233 review 234 * @param reviewDateDay the calendar day the web content article is set for 235 review 236 * @param reviewDateYear the year the web content article is set for review 237 * @param reviewDateHour the hour the web content article is set for review 238 * @param reviewDateMinute the minute the web content article is set for 239 review 240 * @param neverReview whether the web content article is not set for review 241 * @param indexable whether the web content article is searchable 242 * @param articleURL the web content article's accessible URL 243 * @param serviceContext the service context to be applied. Can set the 244 UUID, creation date, modification date, expando bridge 245 attributes, guest permissions, group permissions, asset category 246 IDs, asset tag names, asset link entry IDs, the "urlTitle" 247 attribute, and workflow actions for the web content article. Can 248 also set whether to add the default guest and group permissions. 249 * @return the web content article 250 * @throws PortalException if the user did not have permission to add the 251 web content article or if a portal exception occurred 252 * @throws SystemException if a system exception occurred 253 */ 254 public static com.liferay.portlet.journal.model.JournalArticle addArticle( 255 long groupId, long folderId, long classNameId, long classPK, 256 java.lang.String articleId, boolean autoArticleId, 257 java.util.Map<java.util.Locale, java.lang.String> titleMap, 258 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 259 java.lang.String content, java.lang.String type, 260 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 261 java.lang.String layoutUuid, int displayDateMonth, int displayDateDay, 262 int displayDateYear, int displayDateHour, int displayDateMinute, 263 int expirationDateMonth, int expirationDateDay, int expirationDateYear, 264 int expirationDateHour, int expirationDateMinute, boolean neverExpire, 265 int reviewDateMonth, int reviewDateDay, int reviewDateYear, 266 int reviewDateHour, int reviewDateMinute, boolean neverReview, 267 boolean indexable, java.lang.String articleURL, 268 com.liferay.portal.service.ServiceContext serviceContext) 269 throws com.liferay.portal.kernel.exception.PortalException, 270 com.liferay.portal.kernel.exception.SystemException { 271 return getService() 272 .addArticle(groupId, folderId, classNameId, classPK, 273 articleId, autoArticleId, titleMap, descriptionMap, content, type, 274 ddmStructureKey, ddmTemplateKey, layoutUuid, displayDateMonth, 275 displayDateDay, displayDateYear, displayDateHour, 276 displayDateMinute, expirationDateMonth, expirationDateDay, 277 expirationDateYear, expirationDateHour, expirationDateMinute, 278 neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear, 279 reviewDateHour, reviewDateMinute, neverReview, indexable, 280 articleURL, serviceContext); 281 } 282 283 /** 284 * Copies the web content article matching the group, article ID, and 285 * version. This method creates a new article, extracting all the values 286 * from the old one and updating its article ID. 287 * 288 * @param groupId the primary key of the web content article's group 289 * @param oldArticleId the primary key of the old web content article 290 * @param newArticleId the primary key of the new web content article 291 * @param autoArticleId whether to auto-generate the web content article ID 292 * @param version the web content article's version 293 * @return the new web content article 294 * @throws PortalException if the user did not have permission to add the 295 copy the web content article, if a matching web content article 296 could not be found, or if a portal exception occurred 297 * @throws SystemException if a system exception occurred 298 */ 299 public static com.liferay.portlet.journal.model.JournalArticle copyArticle( 300 long groupId, java.lang.String oldArticleId, 301 java.lang.String newArticleId, boolean autoArticleId, double version) 302 throws com.liferay.portal.kernel.exception.PortalException, 303 com.liferay.portal.kernel.exception.SystemException { 304 return getService() 305 .copyArticle(groupId, oldArticleId, newArticleId, 306 autoArticleId, version); 307 } 308 309 /** 310 * Deletes the web content article and its resources matching the group, 311 * article ID, and version, optionally sending email notifying denial of the 312 * web content article if it had not yet been approved. 313 * 314 * @param groupId the primary key of the web content article's group 315 * @param articleId the primary key of the web content article 316 * @param version the web content article's version 317 * @param articleURL the web content article's accessible URL 318 * @param serviceContext the service context to be applied. Can set the 319 portlet preferences that include email information to notify 320 recipients of the unapproved web content article's denial. 321 * @throws PortalException if the user did not have permission to delete the 322 web content article, if a matching web content article could not 323 be found, or if a portal exception occurred 324 * @throws SystemException if a system exception occurred 325 */ 326 public static void deleteArticle(long groupId, java.lang.String articleId, 327 double version, java.lang.String articleURL, 328 com.liferay.portal.service.ServiceContext serviceContext) 329 throws com.liferay.portal.kernel.exception.PortalException, 330 com.liferay.portal.kernel.exception.SystemException { 331 getService() 332 .deleteArticle(groupId, articleId, version, articleURL, 333 serviceContext); 334 } 335 336 /** 337 * Deletes all web content articles and their resources matching the group 338 * and article ID, optionally sending email notifying denial of article if 339 * it had not yet been approved. 340 * 341 * @param groupId the primary key of the web content article's group 342 * @param articleId the primary key of the web content article 343 * @param articleURL the web content article's accessible URL 344 * @param serviceContext the service context to be applied. Can set the 345 portlet preferences that include email information to notify 346 recipients of the unapproved web content article's denial. 347 * @throws PortalException if the user did not have permission to delete the 348 web content article or if a portal exception occurred 349 * @throws SystemException if a system exception occurred 350 */ 351 public static void deleteArticle(long groupId, java.lang.String articleId, 352 java.lang.String articleURL, 353 com.liferay.portal.service.ServiceContext serviceContext) 354 throws com.liferay.portal.kernel.exception.PortalException, 355 com.liferay.portal.kernel.exception.SystemException { 356 getService() 357 .deleteArticle(groupId, articleId, articleURL, serviceContext); 358 } 359 360 /** 361 * Expires the web content article matching the group, article ID, and 362 * version. 363 * 364 * @param groupId the primary key of the web content article's group 365 * @param articleId the primary key of the web content article 366 * @param version the web content article's version 367 * @param articleURL the web content article's accessible URL 368 * @param serviceContext the service context to be applied. Can set the 369 modification date, status date, portlet preferences, and can set 370 whether to add the default command update for the web content 371 article. With respect to social activities, by setting the 372 service context's command to {@link 373 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 374 is considered a web content update activity; otherwise it is 375 considered a web content add activity. 376 * @return the web content article 377 * @throws PortalException if the user did not have permission to expire the 378 web content article, if a matching web content article could not 379 be found, or if a portal exception occurred 380 * @throws SystemException if a system exception occurred 381 */ 382 public static com.liferay.portlet.journal.model.JournalArticle expireArticle( 383 long groupId, java.lang.String articleId, double version, 384 java.lang.String articleURL, 385 com.liferay.portal.service.ServiceContext serviceContext) 386 throws com.liferay.portal.kernel.exception.PortalException, 387 com.liferay.portal.kernel.exception.SystemException { 388 return getService() 389 .expireArticle(groupId, articleId, version, articleURL, 390 serviceContext); 391 } 392 393 /** 394 * Expires the web content article matching the group and article ID, 395 * expiring all of its versions if the 396 * <code>journal.article.expire.all.versions</code> portal property is 397 * <code>true</code>, otherwise expiring only its latest approved version. 398 * 399 * @param groupId the primary key of the web content article's group 400 * @param articleId the primary key of the web content article 401 * @param articleURL the web content article's accessible URL 402 * @param serviceContext the service context to be applied. Can set the 403 modification date, status date, portlet preferences, and can set 404 whether to add the default command update for the web content 405 article. With respect to social activities, by setting the 406 service context's command to {@link 407 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 408 is considered a web content update activity; otherwise it is 409 considered a web content add activity. 410 * @throws PortalException if the user did not have permission to expire the 411 web content article, if a matching web content article could not 412 be found, or if a portal exception occurred 413 * @throws SystemException if a system exception occurred 414 */ 415 public static void expireArticle(long groupId, java.lang.String articleId, 416 java.lang.String articleURL, 417 com.liferay.portal.service.ServiceContext serviceContext) 418 throws com.liferay.portal.kernel.exception.PortalException, 419 com.liferay.portal.kernel.exception.SystemException { 420 getService() 421 .expireArticle(groupId, articleId, articleURL, serviceContext); 422 } 423 424 public static com.liferay.portlet.journal.model.JournalArticle fetchArticle( 425 long groupId, java.lang.String articleId) 426 throws com.liferay.portal.kernel.exception.PortalException, 427 com.liferay.portal.kernel.exception.SystemException { 428 return getService().fetchArticle(groupId, articleId); 429 } 430 431 /** 432 * Returns the web content article with the ID. 433 * 434 * @param id the primary key of the web content article 435 * @return the web content article with the ID 436 * @throws PortalException if a matching web content article could not be 437 found or if the user did not have permission to view the web 438 content article 439 * @throws SystemException if a system exception occurred 440 */ 441 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 442 long id) 443 throws com.liferay.portal.kernel.exception.PortalException, 444 com.liferay.portal.kernel.exception.SystemException { 445 return getService().getArticle(id); 446 } 447 448 /** 449 * Returns the latest approved web content article, or the latest unapproved 450 * article if none are approved. Both approved and unapproved articles must 451 * match the group and article ID. 452 * 453 * @param groupId the primary key of the web content article's group 454 * @param articleId the primary key of the web content article 455 * @return the matching web content article 456 * @throws PortalException if the user did not have permission to view the 457 web content article or if a matching web content article could 458 not be found 459 * @throws SystemException if a system exception occurred 460 */ 461 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 462 long groupId, java.lang.String articleId) 463 throws com.liferay.portal.kernel.exception.PortalException, 464 com.liferay.portal.kernel.exception.SystemException { 465 return getService().getArticle(groupId, articleId); 466 } 467 468 /** 469 * Returns the web content article matching the group, article ID, and 470 * version. 471 * 472 * @param groupId the primary key of the web content article's group 473 * @param articleId the primary key of the web content article 474 * @param version the web content article's version 475 * @return the matching web content article 476 * @throws PortalException if the user did not have permission to view the 477 web content article or if a matching web content article could 478 not be found 479 * @throws SystemException if a system exception occurred 480 */ 481 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 482 long groupId, java.lang.String articleId, double version) 483 throws com.liferay.portal.kernel.exception.PortalException, 484 com.liferay.portal.kernel.exception.SystemException { 485 return getService().getArticle(groupId, articleId, version); 486 } 487 488 /** 489 * Returns the web content article matching the group, class name, and class 490 * PK. 491 * 492 * @param groupId the primary key of the web content article's group 493 * @param className the DDMStructure class name if the web content article 494 is related to a DDM structure, the primary key of the class name 495 associated with the article, or {@link 496 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 497 * @param classPK the primary key of the DDM structure, if the the 498 DDMStructure class name is given as the <code>className</code> 499 parameter, the primary key of the class associated with the web 500 content article, or <code>0</code> otherwise 501 * @return the matching web content article 502 * @throws PortalException if a matching web content article could not be 503 found or if the user did not have permission to view the web 504 content article 505 * @throws SystemException if a system exception occurred 506 */ 507 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 508 long groupId, java.lang.String className, long classPK) 509 throws com.liferay.portal.kernel.exception.PortalException, 510 com.liferay.portal.kernel.exception.SystemException { 511 return getService().getArticle(groupId, className, classPK); 512 } 513 514 /** 515 * Returns the latest web content article that is approved, or the latest 516 * unapproved article if none are approved. Both approved and unapproved 517 * articles must match the group and URL title. 518 * 519 * @param groupId the primary key of the web content article's group 520 * @param urlTitle the web content article's accessible URL title 521 * @return the matching web content article 522 * @throws PortalException if the user did not have permission to view the 523 web content article or if a portal exception occurred 524 * @throws SystemException if a system exception occurred 525 */ 526 public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle( 527 long groupId, java.lang.String urlTitle) 528 throws com.liferay.portal.kernel.exception.PortalException, 529 com.liferay.portal.kernel.exception.SystemException { 530 return getService().getArticleByUrlTitle(groupId, urlTitle); 531 } 532 533 /** 534 * Returns the web content matching the group, article ID, and version. 535 * 536 * @param groupId the primary key of the web content article's group 537 * @param articleId the primary key of the web content article 538 * @param version the web content article's version 539 * @param languageId the primary key of the language translation to get 540 * @param themeDisplay the theme display 541 * @return the matching web content 542 * @throws PortalException if the user did not have permission to view the 543 web content article, if a matching web content article or DDM 544 template could not be found, or if a portal exception occurred 545 * @throws SystemException if a system exception occurred 546 */ 547 public static java.lang.String getArticleContent(long groupId, 548 java.lang.String articleId, double version, 549 java.lang.String languageId, 550 com.liferay.portal.theme.ThemeDisplay themeDisplay) 551 throws com.liferay.portal.kernel.exception.PortalException, 552 com.liferay.portal.kernel.exception.SystemException { 553 return getService() 554 .getArticleContent(groupId, articleId, version, languageId, 555 themeDisplay); 556 } 557 558 /** 559 * Returns the latest web content matching the group and article ID. 560 * 561 * @param groupId the primary key of the web content article's group 562 * @param articleId the primary key of the web content article 563 * @param languageId the primary key of the language translation to get 564 * @param themeDisplay the theme display 565 * @return the matching web content 566 * @throws PortalException if the user did not have permission to view the 567 web content article, if a matching web content article or DDM 568 template could not be found, or if a portal exception occurred 569 * @throws SystemException if a system exception occurred 570 */ 571 public static java.lang.String getArticleContent(long groupId, 572 java.lang.String articleId, java.lang.String languageId, 573 com.liferay.portal.theme.ThemeDisplay themeDisplay) 574 throws com.liferay.portal.kernel.exception.PortalException, 575 com.liferay.portal.kernel.exception.SystemException { 576 return getService() 577 .getArticleContent(groupId, articleId, languageId, 578 themeDisplay); 579 } 580 581 /** 582 * Returns all the web content articles matching the group and folder. 583 * 584 * @param groupId the primary key of the web content article's group 585 * @param folderId the primary key of the web content article folder 586 * @return the matching web content articles 587 * @throws SystemException if a system exception occurred 588 */ 589 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 590 long groupId, long folderId) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return getService().getArticles(groupId, folderId); 593 } 594 595 /** 596 * Returns an ordered range of all the web content articles matching the 597 * group and folder. 598 * 599 * <p> 600 * Useful when paginating results. Returns a maximum of <code>end - 601 * start</code> instances. <code>start</code> and <code>end</code> are not 602 * primary keys, they are indexes in the result set. Thus, <code>0</code> 603 * refers to the first result in the set. Setting both <code>start</code> 604 * and <code>end</code> to {@link 605 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 606 * result set. 607 * </p> 608 * 609 * @param groupId the primary key of the web content article's group 610 * @param folderId the primary key of the web content article folder 611 * @param start the lower bound of the range of web content articles to 612 return 613 * @param end the upper bound of the range of web content articles to 614 return (not inclusive) 615 * @param obc the comparator to order the web content articles 616 * @return the matching web content articles 617 * @throws SystemException if a system exception occurred 618 */ 619 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 620 long groupId, long folderId, int start, int end, 621 com.liferay.portal.kernel.util.OrderByComparator obc) 622 throws com.liferay.portal.kernel.exception.SystemException { 623 return getService().getArticles(groupId, folderId, start, end, obc); 624 } 625 626 /** 627 * Returns an ordered range of all the web content articles matching the 628 * group and article ID. 629 * 630 * <p> 631 * Useful when paginating results. Returns a maximum of <code>end - 632 * start</code> instances. <code>start</code> and <code>end</code> are not 633 * primary keys, they are indexes in the result set. Thus, <code>0</code> 634 * refers to the first result in the set. Setting both <code>start</code> 635 * and <code>end</code> to {@link 636 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 637 * result set. 638 * </p> 639 * 640 * @param groupId the primary key of the web content article's group 641 * @param articleId the primary key of the web content article 642 * @param start the lower bound of the range of web content articles to 643 return 644 * @param end the upper bound of the range of web content articles to 645 return (not inclusive) 646 * @param obc the comparator to order the web content articles 647 * @return the range of matching web content articles ordered by the 648 comparator 649 * @throws SystemException if a system exception occurred 650 */ 651 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByArticleId( 652 long groupId, java.lang.String articleId, int start, int end, 653 com.liferay.portal.kernel.util.OrderByComparator obc) 654 throws com.liferay.portal.kernel.exception.SystemException { 655 return getService() 656 .getArticlesByArticleId(groupId, articleId, start, end, obc); 657 } 658 659 /** 660 * Returns all the web content articles matching the group and layout UUID. 661 * 662 * @param groupId the primary key of the web content article's group 663 * @param layoutUuid the unique string identifying the web content 664 article's display page 665 * @return the matching web content articles 666 * @throws SystemException if a system exception occurred 667 */ 668 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByLayoutUuid( 669 long groupId, java.lang.String layoutUuid) 670 throws com.liferay.portal.kernel.exception.SystemException { 671 return getService().getArticlesByLayoutUuid(groupId, layoutUuid); 672 } 673 674 /** 675 * Returns an ordered range of all the web content articles matching the 676 * group, class name ID, DDM structure key, and workflow status. 677 * 678 * <p> 679 * Useful when paginating results. Returns a maximum of <code>end - 680 * start</code> instances. <code>start</code> and <code>end</code> are not 681 * primary keys, they are indexes in the result set. Thus, <code>0</code> 682 * refers to the first result in the set. Setting both <code>start</code> 683 * and <code>end</code> to {@link 684 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 685 * result set. 686 * </p> 687 * 688 * @param groupId the primary key of the web content article's group 689 * @param classNameId the primary key of the DDMStructure class if the web 690 content article is related to a DDM structure, the primary key of 691 the class name associated with the article, or {@link 692 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 693 * @param ddmStructureKey the primary key of the web content article's DDM 694 structure 695 * @param status the web content article's workflow status. For more 696 information see {@link WorkflowConstants} for constants starting 697 with the "STATUS_" prefix. 698 * @param start the lower bound of the range of web content articles to 699 return 700 * @param end the upper bound of the range of web content articles to 701 return (not inclusive) 702 * @param obc the comparator to order the web content articles 703 * @return the range of matching web content articles ordered by the 704 comparator 705 * @throws SystemException if a system exception occurred 706 */ 707 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByStructureId( 708 long groupId, long classNameId, java.lang.String ddmStructureKey, 709 int status, int start, int end, 710 com.liferay.portal.kernel.util.OrderByComparator obc) 711 throws com.liferay.portal.kernel.exception.SystemException { 712 return getService() 713 .getArticlesByStructureId(groupId, classNameId, 714 ddmStructureKey, status, start, end, obc); 715 } 716 717 /** 718 * Returns an ordered range of all the web content articles matching the 719 * group, default class name ID, and DDM structure key. 720 * 721 * <p> 722 * Useful when paginating results. Returns a maximum of <code>end - 723 * start</code> instances. <code>start</code> and <code>end</code> are not 724 * primary keys, they are indexes in the result set. Thus, <code>0</code> 725 * refers to the first result in the set. Setting both <code>start</code> 726 * and <code>end</code> to {@link 727 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 728 * result set. 729 * </p> 730 * 731 * @param groupId the primary key of the web content article's group 732 * @param ddmStructureKey the primary key of the web content article's DDM 733 structure 734 * @param start the lower bound of the range of web content articles to 735 return 736 * @param end the upper bound of the range of web content articles to 737 return (not inclusive) 738 * @param obc the comparator to order the web content articles 739 * @return the range of matching web content articles ordered by the 740 comparator 741 * @throws SystemException if a system exception occurred 742 */ 743 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByStructureId( 744 long groupId, java.lang.String ddmStructureKey, int start, int end, 745 com.liferay.portal.kernel.util.OrderByComparator obc) 746 throws com.liferay.portal.kernel.exception.SystemException { 747 return getService() 748 .getArticlesByStructureId(groupId, ddmStructureKey, start, 749 end, obc); 750 } 751 752 /** 753 * Returns the number of web content articles matching the group and folder. 754 * 755 * @param groupId the primary key of the web content article's group 756 * @param folderId the primary key of the web content article folder 757 * @return the number of matching web content articles 758 * @throws SystemException if a system exception occurred 759 */ 760 public static int getArticlesCount(long groupId, long folderId) 761 throws com.liferay.portal.kernel.exception.SystemException { 762 return getService().getArticlesCount(groupId, folderId); 763 } 764 765 public static int getArticlesCount(long groupId, long folderId, int status) 766 throws com.liferay.portal.kernel.exception.SystemException { 767 return getService().getArticlesCount(groupId, folderId, status); 768 } 769 770 /** 771 * Returns the number of web content articles matching the group and article 772 * ID. 773 * 774 * @param groupId the primary key of the web content article's group 775 * @param articleId the primary key of the web content article 776 * @return the number of matching web content articles 777 * @throws SystemException if a system exception occurred 778 */ 779 public static int getArticlesCountByArticleId(long groupId, 780 java.lang.String articleId) 781 throws com.liferay.portal.kernel.exception.SystemException { 782 return getService().getArticlesCountByArticleId(groupId, articleId); 783 } 784 785 /** 786 * Returns the number of web content articles matching the group, class name 787 * ID, DDM structure key, and workflow status. 788 * 789 * @param groupId the primary key of the web content article's group 790 * @param classNameId the primary key of the DDMStructure class if the web 791 content article is related to a DDM structure, the primary key of 792 the class name associated with the article, or {@link 793 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 794 * @param ddmStructureKey the primary key of the web content article's DDM 795 structure 796 * @param status the web content article's workflow status. For more 797 information see {@link WorkflowConstants} for constants starting 798 with the "STATUS_" prefix. 799 * @return the number of matching web content articles 800 * @throws SystemException if a system exception occurred 801 */ 802 public static int getArticlesCountByStructureId(long groupId, 803 long classNameId, java.lang.String ddmStructureKey, int status) 804 throws com.liferay.portal.kernel.exception.SystemException { 805 return getService() 806 .getArticlesCountByStructureId(groupId, classNameId, 807 ddmStructureKey, status); 808 } 809 810 /** 811 * Returns the number of web content articles matching the group, default 812 * class name ID, and DDM structure key. 813 * 814 * @param groupId the primary key of the web content article's group 815 * @param ddmStructureKey the primary key of the web content article's DDM 816 structure 817 * @return the number of matching web content articles 818 * @throws SystemException if a system exception occurred 819 */ 820 public static int getArticlesCountByStructureId(long groupId, 821 java.lang.String ddmStructureKey) 822 throws com.liferay.portal.kernel.exception.SystemException { 823 return getService() 824 .getArticlesCountByStructureId(groupId, ddmStructureKey); 825 } 826 827 /** 828 * Returns the web content article matching the URL title that is currently 829 * displayed or next to be displayed if no article is currently displayed. 830 * 831 * @param groupId the primary key of the web content article's group 832 * @param urlTitle the web content article's accessible URL title 833 * @return the web content article matching the URL title that is currently 834 displayed, or next one to be displayed if no version of the 835 article is currently displayed 836 * @throws PortalException if the user did not have permission to view the 837 web content article or if no approved matching web content 838 articles could be found 839 * @throws SystemException if a system exception occurred 840 */ 841 public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle( 842 long groupId, java.lang.String urlTitle) 843 throws com.liferay.portal.kernel.exception.PortalException, 844 com.liferay.portal.kernel.exception.SystemException { 845 return getService().getDisplayArticleByUrlTitle(groupId, urlTitle); 846 } 847 848 /** 849 * Returns the number of folders containing web content articles belonging 850 * to the group. 851 * 852 * @param groupId the primary key of the web content article's group 853 * @param folderIds the primary keys of the web content article folders 854 (optionally {@link java.util.Collections#EMPTY_LIST}) 855 * @return the number of matching folders containing web content articles 856 * @throws SystemException if a system exception occurred 857 */ 858 public static int getFoldersAndArticlesCount(long groupId, 859 java.util.List<java.lang.Long> folderIds) 860 throws com.liferay.portal.kernel.exception.SystemException { 861 return getService().getFoldersAndArticlesCount(groupId, folderIds); 862 } 863 864 /** 865 * Returns an ordered range of all the web content articles matching the 866 * group, user, the root folder or any of its subfolders. 867 * 868 * @param groupId the primary key of the web content article's group 869 * @param userId the primary key of the user (optionally <code>0</code>) 870 * @param rootFolderId the primary key of the root folder to begin the 871 search 872 * @param status the web content article's workflow status. For more 873 information see {@link WorkflowConstants} for constants starting 874 with the "STATUS_" prefix. 875 * @param start the lower bound of the range of web content articles to 876 return 877 * @param end the upper bound of the range of web content articles to 878 return (not inclusive) 879 * @param orderByComparator the comparator to order the web content 880 articles 881 * @return the range of matching web content articles ordered by the 882 comparator 883 * @throws PortalException if the root folder could not be found, if the 884 current user did not have permission to view the root folder, or 885 if a portal exception occurred 886 * @throws SystemException if a system exception occurred 887 */ 888 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getGroupArticles( 889 long groupId, long userId, long rootFolderId, int status, 890 boolean includeOwner, int start, int end, 891 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 892 throws com.liferay.portal.kernel.exception.PortalException, 893 com.liferay.portal.kernel.exception.SystemException { 894 return getService() 895 .getGroupArticles(groupId, userId, rootFolderId, status, 896 includeOwner, start, end, orderByComparator); 897 } 898 899 /** 900 * Returns an ordered range of all the web content articles matching the 901 * group, user, the root folder or any of its subfolders. 902 * 903 * @param groupId the primary key of the web content article's group 904 * @param userId the primary key of the user (optionally <code>0</code>) 905 * @param rootFolderId the primary key of the root folder to begin the 906 search 907 * @param status the web content article's workflow status. For more 908 information see {@link WorkflowConstants} for constants starting 909 with the "STATUS_" prefix. 910 * @param start the lower bound of the range of web content articles to 911 return 912 * @param end the upper bound of the range of web content articles to 913 return (not inclusive) 914 * @param orderByComparator the comparator to order the web content 915 articles 916 * @return the range of matching web content articles ordered by the 917 comparator 918 * @throws PortalException if the root folder could not be found, if the 919 current user did not have permission to view the root folder, or 920 if a portal exception occurred 921 * @throws SystemException if a system exception occurred 922 */ 923 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getGroupArticles( 924 long groupId, long userId, long rootFolderId, int status, int start, 925 int end, 926 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 927 throws com.liferay.portal.kernel.exception.PortalException, 928 com.liferay.portal.kernel.exception.SystemException { 929 return getService() 930 .getGroupArticles(groupId, userId, rootFolderId, status, 931 start, end, orderByComparator); 932 } 933 934 /** 935 * Returns an ordered range of all the web content articles matching the 936 * group, user, the root folder or any of its subfolders. 937 * 938 * <p> 939 * Useful when paginating results. Returns a maximum of <code>end - 940 * start</code> instances. <code>start</code> and <code>end</code> are not 941 * primary keys, they are indexes in the result set. Thus, <code>0</code> 942 * refers to the first result in the set. Setting both <code>start</code> 943 * and <code>end</code> to {@link 944 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 945 * result set. 946 * </p> 947 * 948 * @param groupId the primary key of the web content article's group 949 * @param userId the primary key of the user (optionally <code>0</code>) 950 * @param rootFolderId the primary key of the root folder to begin the 951 search 952 * @param start the lower bound of the range of web content articles to 953 return 954 * @param end the upper bound of the range of web content articles to 955 return (not inclusive) 956 * @param orderByComparator the comparator to order the web content 957 articles 958 * @return the range of matching web content articles ordered by the 959 comparator 960 * @throws PortalException if the root folder could not be found, if the 961 current user did not have permission to view the root folder, or 962 if a portal exception occurred 963 * @throws SystemException if a system exception occurred 964 */ 965 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getGroupArticles( 966 long groupId, long userId, long rootFolderId, int start, int end, 967 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 968 throws com.liferay.portal.kernel.exception.PortalException, 969 com.liferay.portal.kernel.exception.SystemException { 970 return getService() 971 .getGroupArticles(groupId, userId, rootFolderId, start, end, 972 orderByComparator); 973 } 974 975 /** 976 * Returns the number of web content articles matching the group, user, and 977 * the root folder or any of its subfolders. 978 * 979 * @param groupId the primary key of the web content article's group 980 * @param userId the primary key of the user (optionally <code>0</code>) 981 * @param rootFolderId the primary key of the root folder to begin the 982 search 983 * @return the number of matching web content articles 984 * @throws PortalException if the root folder could not be found, if the 985 current user did not have permission to view the root folder, or 986 if a portal exception occurred 987 * @throws SystemException if a system exception occurred 988 */ 989 public static int getGroupArticlesCount(long groupId, long userId, 990 long rootFolderId) 991 throws com.liferay.portal.kernel.exception.PortalException, 992 com.liferay.portal.kernel.exception.SystemException { 993 return getService().getGroupArticlesCount(groupId, userId, rootFolderId); 994 } 995 996 public static int getGroupArticlesCount(long groupId, long userId, 997 long rootFolderId, int status) 998 throws com.liferay.portal.kernel.exception.PortalException, 999 com.liferay.portal.kernel.exception.SystemException { 1000 return getService() 1001 .getGroupArticlesCount(groupId, userId, rootFolderId, status); 1002 } 1003 1004 /** 1005 * Returns the number of web content articles matching the group, user, 1006 * the root folder or any of its subfolders. 1007 * 1008 * @param groupId the primary key of the web content article's group 1009 * @param userId the primary key of the user (optionally <code>0</code>) 1010 * @param rootFolderId the primary key of the root folder to begin the 1011 search 1012 * @param status the web content article's workflow status. For more 1013 information see {@link WorkflowConstants} for constants starting 1014 with the "STATUS_" prefix. 1015 * @return the range of matching web content articles ordered by the 1016 comparator 1017 * @throws PortalException if the root folder could not be found, if the 1018 current user did not have permission to view the root folder, or 1019 if a portal exception occurred 1020 * @throws SystemException if a system exception occurred 1021 */ 1022 public static int getGroupArticlesCount(long groupId, long userId, 1023 long rootFolderId, int status, boolean includeOwner) 1024 throws com.liferay.portal.kernel.exception.PortalException, 1025 com.liferay.portal.kernel.exception.SystemException { 1026 return getService() 1027 .getGroupArticlesCount(groupId, userId, rootFolderId, 1028 status, includeOwner); 1029 } 1030 1031 /** 1032 * Returns the latest web content article matching the resource primary key, 1033 * preferring articles with approved workflow status. 1034 * 1035 * @param resourcePrimKey the primary key of the resource instance 1036 * @return the latest web content article matching the resource primary key, 1037 preferring articles with approved workflow status 1038 * @throws PortalException if the user did not have permission to view the 1039 web content article or if a matching web content article could 1040 not be found 1041 * @throws SystemException if a system exception occurred 1042 */ 1043 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1044 long resourcePrimKey) 1045 throws com.liferay.portal.kernel.exception.PortalException, 1046 com.liferay.portal.kernel.exception.SystemException { 1047 return getService().getLatestArticle(resourcePrimKey); 1048 } 1049 1050 /** 1051 * Returns the latest web content article matching the group, article ID, 1052 * and workflow status. 1053 * 1054 * @param groupId the primary key of the web content article's group 1055 * @param articleId the primary key of the web content article 1056 * @param status the web content article's workflow status. For more 1057 information see {@link WorkflowConstants} for constants starting 1058 with the "STATUS_" prefix. 1059 * @return the latest matching web content article 1060 * @throws PortalException if the user did not have permission to view the 1061 web content article or if a matching web content article could 1062 not be found 1063 * @throws SystemException if a system exception occurred 1064 */ 1065 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1066 long groupId, java.lang.String articleId, int status) 1067 throws com.liferay.portal.kernel.exception.PortalException, 1068 com.liferay.portal.kernel.exception.SystemException { 1069 return getService().getLatestArticle(groupId, articleId, status); 1070 } 1071 1072 /** 1073 * Returns the latest web content article matching the group, class name ID, 1074 * and class PK. 1075 * 1076 * @param groupId the primary key of the web content article's group 1077 * @param className the DDMStructure class name if the web content article 1078 is related to a DDM structure, the class name associated with the 1079 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1080 otherwise 1081 * @param classPK the primary key of the DDM structure, if the DDMStructure 1082 class name is given as the <code>className</code> parameter, the 1083 primary key of the class associated with the web content article, 1084 or <code>0</code> otherwise 1085 * @return the latest matching web content article 1086 * @throws PortalException if a matching web content article could not be 1087 found or if the user did not have permission to view the web 1088 content article 1089 * @throws SystemException if a system exception occurred 1090 */ 1091 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1092 long groupId, java.lang.String className, long classPK) 1093 throws com.liferay.portal.kernel.exception.PortalException, 1094 com.liferay.portal.kernel.exception.SystemException { 1095 return getService().getLatestArticle(groupId, className, classPK); 1096 } 1097 1098 /** 1099 * Moves all versions of the the web content article matching the group and 1100 * article ID to the folder. 1101 * 1102 * @param groupId the primary key of the web content article's group 1103 * @param articleId the primary key of the web content article 1104 * @param newFolderId the primary key of the web content article's new 1105 folder 1106 * @throws PortalException if the user did not have permission to update any 1107 one of the versions of the web content article or if any one of 1108 the versions of the web content article could not be moved to the 1109 folder 1110 * @throws SystemException if a system exception occurred 1111 */ 1112 public static void moveArticle(long groupId, java.lang.String articleId, 1113 long newFolderId) 1114 throws com.liferay.portal.kernel.exception.PortalException, 1115 com.liferay.portal.kernel.exception.SystemException { 1116 getService().moveArticle(groupId, articleId, newFolderId); 1117 } 1118 1119 /** 1120 * Moves the web content article from the Recycle Bin to the folder. 1121 * 1122 * @param groupId the primary key of the web content article's group 1123 * @param resourcePrimKey the primary key of the resource instance 1124 * @param newFolderId the primary key of the web content article's new 1125 folder 1126 * @param serviceContext the service context to be applied. Can set the 1127 modification date, portlet preferences, and can set whether to 1128 add the default command update for the web content article. With 1129 respect to social activities, by setting the service context's 1130 command to {@link 1131 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1132 is considered a web content update activity; otherwise it is 1133 considered a web content add activity. 1134 * @return the updated web content article, which was moved from the Recycle 1135 Bin to the folder 1136 * @throws PortalException if the user did not have permission to view or 1137 update the web content article, if a matching trashed web content 1138 article could not be found, or if a portal exception occurred 1139 * @throws SystemException if a system exception occurred 1140 */ 1141 public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash( 1142 long groupId, long resourcePrimKey, long newFolderId, 1143 com.liferay.portal.service.ServiceContext serviceContext) 1144 throws com.liferay.portal.kernel.exception.PortalException, 1145 com.liferay.portal.kernel.exception.SystemException { 1146 return getService() 1147 .moveArticleFromTrash(groupId, resourcePrimKey, newFolderId, 1148 serviceContext); 1149 } 1150 1151 /** 1152 * Moves the web content article from the Recycle Bin to the folder. 1153 * 1154 * @param groupId the primary key of the web content article's group 1155 * @param articleId the primary key of the web content article 1156 * @param newFolderId the primary key of the web content article's new 1157 folder 1158 * @param serviceContext the service context to be applied. Can set the 1159 modification date, portlet preferences, and can set whether to 1160 add the default command update for the web content article. With 1161 respect to social activities, by setting the service context's 1162 command to {@link 1163 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1164 is considered a web content update activity; otherwise it is 1165 considered a web content add activity. 1166 * @return the updated web content article, which was moved from the Recycle 1167 Bin to the folder 1168 * @throws PortalException if the user did not have permission to view or 1169 update the web content article, if a trashed web content article 1170 with the primary key could not be found, or if a portal exception 1171 occurred 1172 * @throws SystemException if a system exception occurred 1173 */ 1174 public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash( 1175 long groupId, java.lang.String articleId, long newFolderId, 1176 com.liferay.portal.service.ServiceContext serviceContext) 1177 throws com.liferay.portal.kernel.exception.PortalException, 1178 com.liferay.portal.kernel.exception.SystemException { 1179 return getService() 1180 .moveArticleFromTrash(groupId, articleId, newFolderId, 1181 serviceContext); 1182 } 1183 1184 /** 1185 * Moves the latest version of the web content article matching the group 1186 * and article ID to the recycle bin. 1187 * 1188 * @param groupId the primary key of the web content article's group 1189 * @param articleId the primary key of the web content article 1190 * @return the moved web content article or <code>null</code> if no matching 1191 article was found 1192 * @throws PortalException if the user did not have permission to move the 1193 article to the Recycle Bin or if a portal exception occurred 1194 * @throws SystemException if a system exception occurred 1195 */ 1196 public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash( 1197 long groupId, java.lang.String articleId) 1198 throws com.liferay.portal.kernel.exception.PortalException, 1199 com.liferay.portal.kernel.exception.SystemException { 1200 return getService().moveArticleToTrash(groupId, articleId); 1201 } 1202 1203 /** 1204 * Removes the web content of all the company's web content articles 1205 * matching the language. 1206 * 1207 * @param companyId the primary key of the web content article's company 1208 * @param languageId the primary key of the language locale to remove 1209 * @throws PortalException if the user did not have permission to update any 1210 one of the the web content articles or if web content matching 1211 the language could not be found for any one of the articles 1212 * @throws SystemException if a system exception occurred 1213 */ 1214 public static void removeArticleLocale(long companyId, 1215 java.lang.String languageId) 1216 throws com.liferay.portal.kernel.exception.PortalException, 1217 com.liferay.portal.kernel.exception.SystemException { 1218 getService().removeArticleLocale(companyId, languageId); 1219 } 1220 1221 /** 1222 * Removes the web content of the web content article matching the group, 1223 * article ID, and version, and language. 1224 * 1225 * @param groupId the primary key of the web content article's group 1226 * @param articleId the primary key of the web content article 1227 * @param version the web content article's version 1228 * @param languageId the primary key of the language locale to remove 1229 * @return the updated web content article with the locale removed 1230 * @throws PortalException if the user did not have permission to update the 1231 web content article or if a matching web content article could 1232 not be found 1233 * @throws SystemException if a system exception occurred 1234 */ 1235 public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale( 1236 long groupId, java.lang.String articleId, double version, 1237 java.lang.String languageId) 1238 throws com.liferay.portal.kernel.exception.PortalException, 1239 com.liferay.portal.kernel.exception.SystemException { 1240 return getService() 1241 .removeArticleLocale(groupId, articleId, version, languageId); 1242 } 1243 1244 /** 1245 * Restores the web content article associated with the resource primary key 1246 * from the Recycle Bin. 1247 * 1248 * @param resourcePrimKey the primary key of the resource instance 1249 * @throws PortalException if a matching web content article could not be 1250 found in the Recycle Bin, if the user did not have permission to 1251 view or restore the article, or if a portal exception occurred 1252 * @throws SystemException if a system exception occurred 1253 */ 1254 public static void restoreArticleFromTrash(long resourcePrimKey) 1255 throws com.liferay.portal.kernel.exception.PortalException, 1256 com.liferay.portal.kernel.exception.SystemException { 1257 getService().restoreArticleFromTrash(resourcePrimKey); 1258 } 1259 1260 /** 1261 * Restores the web content article from the Recycle Bin. 1262 * 1263 * @param groupId the primary key of the web content article's group 1264 * @param articleId the primary key of the web content article 1265 * @throws PortalException if the web content article with the primary key 1266 could not be found in the Recycle Bin, if the user did not have 1267 permission to restore the article, or if a portal exception 1268 occurred 1269 * @throws SystemException if a system exception occurred 1270 */ 1271 public static void restoreArticleFromTrash(long groupId, 1272 java.lang.String articleId) 1273 throws com.liferay.portal.kernel.exception.PortalException, 1274 com.liferay.portal.kernel.exception.SystemException { 1275 getService().restoreArticleFromTrash(groupId, articleId); 1276 } 1277 1278 public static com.liferay.portal.kernel.search.Hits search(long groupId, 1279 long creatorUserId, int status, int start, int end) 1280 throws com.liferay.portal.kernel.exception.PortalException, 1281 com.liferay.portal.kernel.exception.SystemException { 1282 return getService().search(groupId, creatorUserId, status, start, end); 1283 } 1284 1285 /** 1286 * Returns an ordered range of all the web content articles matching the 1287 * parameters, including a keywords parameter for matching with the 1288 * article's ID, title, description, and content, a DDM structure key 1289 * parameter, and a DDM template key parameter. 1290 * 1291 * <p> 1292 * Useful when paginating results. Returns a maximum of <code>end - 1293 * start</code> instances. <code>start</code> and <code>end</code> are not 1294 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1295 * refers to the first result in the set. Setting both <code>start</code> 1296 * and <code>end</code> to {@link 1297 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1298 * result set. 1299 * </p> 1300 * 1301 * @param companyId the primary key of the web content article's company 1302 * @param groupId the primary key of the group (optionally <code>0</code>) 1303 * @param folderIds the primary keys of the web content article folders 1304 (optionally {@link java.util.Collections#EMPTY_LIST}) 1305 * @param classNameId the primary key of the DDMStructure class if the web 1306 content article is related to a DDM structure, the primary key of 1307 the class name associated with the article, or {@link 1308 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1309 * @param keywords the keywords (space separated), which may occur in the 1310 web content article ID, title, description, or content 1311 (optionally <code>null</code>). If the keywords value is not 1312 <code>null</code>, the search uses the OR operator in connecting 1313 query criteria; otherwise it uses the AND operator. 1314 * @param version the web content article's version (optionally 1315 <code>null</code>) 1316 * @param type the web content article's type (optionally 1317 <code>null</code>) 1318 * @param ddmStructureKey the primary key of the web content article's DDM 1319 structure, if the article is related to a DDM structure, or 1320 <code>null</code> otherwise 1321 * @param ddmTemplateKey the primary key of the web content article's DDM 1322 template (optionally <code>null</code>). If the article is 1323 related to a DDM structure, the template's structure must match 1324 it. 1325 * @param displayDateGT the date after which a matching web content 1326 article's display date must be after (optionally 1327 <code>null</code>) 1328 * @param displayDateLT the date before which a matching web content 1329 article's display date must be before (optionally 1330 <code>null</code>) 1331 * @param status the web content article's workflow status. For more 1332 information see {@link WorkflowConstants} for constants starting 1333 with the "STATUS_" prefix. 1334 * @param reviewDate the web content article's scheduled review date 1335 (optionally <code>null</code>) 1336 * @param start the lower bound of the range of web content articles to 1337 return 1338 * @param end the upper bound of the range of web content articles to 1339 return (not inclusive) 1340 * @param obc the comparator to order the web content articles 1341 * @return the range of matching web content articles ordered by the 1342 comparator 1343 * @throws SystemException if a system exception occurred 1344 */ 1345 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 1346 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 1347 long classNameId, java.lang.String keywords, java.lang.Double version, 1348 java.lang.String type, java.lang.String ddmStructureKey, 1349 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1350 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1351 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1352 throws com.liferay.portal.kernel.exception.SystemException { 1353 return getService() 1354 .search(companyId, groupId, folderIds, classNameId, 1355 keywords, version, type, ddmStructureKey, ddmTemplateKey, 1356 displayDateGT, displayDateLT, status, reviewDate, start, end, obc); 1357 } 1358 1359 /** 1360 * Returns an ordered range of all the web content articles matching the 1361 * parameters, including keyword parameters for article ID, title, 1362 * description, and content, a DDM structure key parameter, a DDM template 1363 * key parameter, and an AND operator switch. 1364 * 1365 * <p> 1366 * Useful when paginating results. Returns a maximum of <code>end - 1367 * start</code> instances. <code>start</code> and <code>end</code> are not 1368 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1369 * refers to the first result in the set. Setting both <code>start</code> 1370 * and <code>end</code> to {@link 1371 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1372 * result set. 1373 * </p> 1374 * 1375 * @param companyId the primary key of the web content article's company 1376 * @param groupId the primary key of the group (optionally <code>0</code>) 1377 * @param folderIds the primary keys of the web content article folders 1378 (optionally {@link java.util.Collections#EMPTY_LIST}) 1379 * @param classNameId the primary key of the DDMStructure class if the web 1380 content article is related to a DDM structure, the primary key of 1381 the class name associated with the article, or {@link 1382 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1383 * @param articleId the article ID keywords (space separated, optionally 1384 <code>null</code>) 1385 * @param version the web content article's version (optionally 1386 <code>null</code>) 1387 * @param title the title keywords (space separated, optionally 1388 <code>null</code>) 1389 * @param description the description keywords (space separated, optionally 1390 <code>null</code>) 1391 * @param content the content keywords (space separated, optionally 1392 <code>null</code>) 1393 * @param type the web content article's type (optionally 1394 <code>null</code>) 1395 * @param ddmStructureKey the primary key of the web content article's DDM 1396 structure, if the article is related to a DDM structure, or 1397 <code>null</code> otherwise 1398 * @param ddmTemplateKey the primary key of the web content article's DDM 1399 template (optionally <code>null</code>). If the article is 1400 related to a DDM structure, the template's structure must match 1401 it. 1402 * @param displayDateGT the date after which a matching web content 1403 article's display date must be after (optionally 1404 <code>null</code>) 1405 * @param displayDateLT the date before which a matching web content 1406 article's display date must be before (optionally 1407 <code>null</code>) 1408 * @param status the web content article's workflow status. For more 1409 information see {@link WorkflowConstants} for constants starting 1410 with the "STATUS_" prefix. 1411 * @param reviewDate the web content article's scheduled review date 1412 (optionally <code>null</code>) 1413 * @param andOperator whether every field must match its value or keywords, 1414 or just one field must match. Company, group, folder IDs, class 1415 name ID, and status must all match their values. 1416 * @param start the lower bound of the range of web content articles to 1417 return 1418 * @param end the upper bound of the range of web content articles to 1419 return (not inclusive) 1420 * @param obc the comparator to order the web content articles 1421 * @return the range of matching web content articles ordered by the 1422 comparator 1423 * @throws SystemException if a system exception occurred 1424 */ 1425 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 1426 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 1427 long classNameId, java.lang.String articleId, java.lang.Double version, 1428 java.lang.String title, java.lang.String description, 1429 java.lang.String content, java.lang.String type, 1430 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1431 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1432 java.util.Date reviewDate, boolean andOperator, int start, int end, 1433 com.liferay.portal.kernel.util.OrderByComparator obc) 1434 throws com.liferay.portal.kernel.exception.SystemException { 1435 return getService() 1436 .search(companyId, groupId, folderIds, classNameId, 1437 articleId, version, title, description, content, type, 1438 ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, 1439 status, reviewDate, andOperator, start, end, obc); 1440 } 1441 1442 /** 1443 * Returns an ordered range of all the web content articles matching the 1444 * parameters, including keyword parameters for article ID, title, 1445 * description, and content, a DDM structure keys (plural) parameter, a DDM 1446 * template keys (plural) parameter, and an AND operator switch. 1447 * 1448 * <p> 1449 * Useful when paginating results. Returns a maximum of <code>end - 1450 * start</code> instances. <code>start</code> and <code>end</code> are not 1451 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1452 * refers to the first result in the set. Setting both <code>start</code> 1453 * and <code>end</code> to {@link 1454 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1455 * result set. 1456 * </p> 1457 * 1458 * @param companyId the primary key of the web content article's company 1459 * @param groupId the primary key of the group (optionally <code>0</code>) 1460 * @param folderIds the primary keys of the web content article folders 1461 (optionally {@link java.util.Collections#EMPTY_LIST}) 1462 * @param classNameId the primary key of the DDMStructure class if the web 1463 content article is related to a DDM structure, the primary key of 1464 the class name associated with the article, or {@link 1465 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1466 * @param articleId the article ID keywords (space separated, optionally 1467 <code>null</code>) 1468 * @param version the web content article's version (optionally 1469 <code>null</code>) 1470 * @param title the title keywords (space separated, optionally 1471 <code>null</code>) 1472 * @param description the description keywords (space separated, optionally 1473 <code>null</code>) 1474 * @param content the content keywords (space separated, optionally 1475 <code>null</code>) 1476 * @param type the web content article's type (optionally 1477 <code>null</code>) 1478 * @param ddmStructureKeys the primary keys of the web content article's 1479 DDM structures, if the article is related to a DDM structure, or 1480 <code>null</code> otherwise 1481 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1482 templates (originally <code>null</code>). If the articles are 1483 related to a DDM structure, the template's structure must match 1484 it. 1485 * @param displayDateGT the date after which a matching web content 1486 article's display date must be after (optionally 1487 <code>null</code>) 1488 * @param displayDateLT the date before which a matching web content 1489 article's display date must be before (optionally 1490 <code>null</code>) 1491 * @param status the web content article's workflow status. For more 1492 information see {@link WorkflowConstants} for constants starting 1493 with the "STATUS_" prefix. 1494 * @param reviewDate the web content article's scheduled review date 1495 (optionally <code>null</code>) 1496 * @param andOperator whether every field must match its value or keywords, 1497 or just one field must match. Company, group, folder IDs, class 1498 name ID, and status must all match their values. 1499 * @param start the lower bound of the range of web content articles to 1500 return 1501 * @param end the upper bound of the range of web content articles to 1502 return (not inclusive) 1503 * @param obc the comparator to order the web content articles 1504 * @return the range of matching web content articles ordered by the 1505 comparator 1506 * @throws SystemException if a system exception occurred 1507 */ 1508 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 1509 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 1510 long classNameId, java.lang.String articleId, java.lang.Double version, 1511 java.lang.String title, java.lang.String description, 1512 java.lang.String content, java.lang.String type, 1513 java.lang.String[] ddmStructureKeys, 1514 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1515 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1516 boolean andOperator, int start, int end, 1517 com.liferay.portal.kernel.util.OrderByComparator obc) 1518 throws com.liferay.portal.kernel.exception.SystemException { 1519 return getService() 1520 .search(companyId, groupId, folderIds, classNameId, 1521 articleId, version, title, description, content, type, 1522 ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT, 1523 status, reviewDate, andOperator, start, end, obc); 1524 } 1525 1526 /** 1527 * Returns the number of web content articles matching the parameters, 1528 * including a keywords parameter for matching with the article's ID, title, 1529 * description, and content, a DDM structure key parameter, and a DDM 1530 * template key parameter. 1531 * 1532 * @param companyId the primary key of the web content article's company 1533 * @param groupId the primary key of the group (optionally <code>0</code>) 1534 * @param folderIds the primary keys of the web content article folders 1535 (optionally {@link java.util.Collections#EMPTY_LIST}) 1536 * @param classNameId the primary key of the DDMStructure class if the web 1537 content article is related to a DDM structure, the primary key of 1538 the class name associated with the article, or {@link 1539 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1540 * @param keywords the keywords (space separated), which may occur in the 1541 web content article ID, title, description, or content 1542 (optionally <code>null</code>). If the keywords value is not 1543 <code>null</code>, the search uses the OR operator in connecting 1544 query criteria; otherwise it uses the AND operator. 1545 * @param version the web content article's version (optionally 1546 <code>null</code>) 1547 * @param type the web content article's type (optionally 1548 <code>null</code>) 1549 * @param ddmStructureKey the primary key of the web content article's DDM 1550 structure, if the article is related to a DDM structure, or 1551 <code>null</code> otherwise 1552 * @param ddmTemplateKey the primary key of the web content article's DDM 1553 template (optionally <code>null</code>). If the article is 1554 related to a DDM structure, the template's structure must match 1555 it. 1556 * @param displayDateGT the date after which a matching web content 1557 article's display date must be after (optionally 1558 <code>null</code>) 1559 * @param displayDateLT the date before which a matching web content 1560 article's display date must be before (optionally 1561 <code>null</code>) 1562 * @param status the web content article's workflow status. For more 1563 information see {@link WorkflowConstants} for constants starting 1564 with the "STATUS_" prefix. 1565 * @param reviewDate the web content article's scheduled review date 1566 (optionally <code>null</code>) 1567 * @return the number of matching web content articles 1568 * @throws SystemException if a system exception occurred 1569 */ 1570 public static int searchCount(long companyId, long groupId, 1571 java.util.List<java.lang.Long> folderIds, long classNameId, 1572 java.lang.String keywords, java.lang.Double version, 1573 java.lang.String type, java.lang.String ddmStructureKey, 1574 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1575 java.util.Date displayDateLT, int status, java.util.Date reviewDate) 1576 throws com.liferay.portal.kernel.exception.SystemException { 1577 return getService() 1578 .searchCount(companyId, groupId, folderIds, classNameId, 1579 keywords, version, type, ddmStructureKey, ddmTemplateKey, 1580 displayDateGT, displayDateLT, status, reviewDate); 1581 } 1582 1583 /** 1584 * Returns the number of web content articles matching the parameters, 1585 * including keyword parameters for article ID, title, description, and 1586 * content, a DDM structure key parameter, a DDM template key parameter, and 1587 * an AND operator switch. 1588 * 1589 * @param companyId the primary key of the web content article's company 1590 * @param groupId the primary key of the group (optionally <code>0</code>) 1591 * @param folderIds the primary keys of the web content article folders 1592 (optionally {@link java.util.Collections#EMPTY_LIST}) 1593 * @param classNameId the primary key of the DDMStructure class if the web 1594 content article is related to a DDM structure, the primary key of 1595 the class name associated with the article, or {@link 1596 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1597 * @param articleId the article ID keywords (space separated, optionally 1598 <code>null</code>) 1599 * @param version the web content article's version (optionally 1600 <code>null</code>) 1601 * @param title the title keywords (space separated, optionally 1602 <code>null</code>) 1603 * @param description the description keywords (space separated, optionally 1604 <code>null</code>) 1605 * @param content the content keywords (space separated, optionally 1606 <code>null</code>) 1607 * @param type the web content article's type (optionally 1608 <code>null</code>) 1609 * @param ddmStructureKey the primary key of the web content article's DDM 1610 structure, if the article is related to a DDM structure, or 1611 <code>null</code> otherwise 1612 * @param ddmTemplateKey the primary key of the web content article's DDM 1613 template (optionally <code>null</code>). If the article is 1614 related to a DDM structure, the template's structure must match 1615 it. 1616 * @param displayDateGT the date after which a matching web content 1617 article's display date must be after (optionally 1618 <code>null</code>) 1619 * @param displayDateLT the date before which a matching web content 1620 article's display date must be before (optionally 1621 <code>null</code>) 1622 * @param status the web content article's workflow status. For more 1623 information see {@link WorkflowConstants} for constants starting 1624 with the "STATUS_" prefix. 1625 * @param reviewDate the web content article's scheduled review date 1626 (optionally <code>null</code>) 1627 * @param andOperator whether every field must match its value or keywords, 1628 or just one field must match. Group, folder IDs, class name ID, 1629 and status must all match their values. 1630 * @return the number of matching web content articles 1631 * @throws SystemException if a system exception occurred 1632 */ 1633 public static int searchCount(long companyId, long groupId, 1634 java.util.List<java.lang.Long> folderIds, long classNameId, 1635 java.lang.String articleId, java.lang.Double version, 1636 java.lang.String title, java.lang.String description, 1637 java.lang.String content, java.lang.String type, 1638 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1639 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1640 java.util.Date reviewDate, boolean andOperator) 1641 throws com.liferay.portal.kernel.exception.SystemException { 1642 return getService() 1643 .searchCount(companyId, groupId, folderIds, classNameId, 1644 articleId, version, title, description, content, type, 1645 ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, 1646 status, reviewDate, andOperator); 1647 } 1648 1649 /** 1650 * Returns the number of web content articles matching the parameters, 1651 * including keyword parameters for article ID, title, description, and 1652 * content, a DDM structure keys (plural) parameter, a DDM template keys 1653 * (plural) parameter, and an AND operator switch. 1654 * 1655 * @param companyId the primary key of the web content article's company 1656 * @param groupId the primary key of the group (optionally <code>0</code>) 1657 * @param folderIds the primary keys of the web content article folders 1658 (optionally {@link java.util.Collections#EMPTY_LIST}) 1659 * @param classNameId the primary key of the DDMStructure class if the web 1660 content article is related to a DDM structure, the primary key of 1661 the class name associated with the article, or {@link 1662 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1663 * @param articleId the article ID keywords (space separated, optionally 1664 <code>null</code>) 1665 * @param version the web content article's version (optionally 1666 <code>null</code>) 1667 * @param title the title keywords (space separated, optionally 1668 <code>null</code>) 1669 * @param description the description keywords (space separated, optionally 1670 <code>null</code>) 1671 * @param content the content keywords (space separated, optionally 1672 <code>null</code>) 1673 * @param type the web content article's type (optionally 1674 <code>null</code>) 1675 * @param ddmStructureKeys the primary keys of the web content article's 1676 DDM structures, if the article is related to a DDM structure, or 1677 <code>null</code> otherwise 1678 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1679 templates (originally <code>null</code>). If the articles are 1680 related to a DDM structure, the template's structure must match 1681 it. 1682 * @param displayDateGT the date after which a matching web content 1683 article's display date must be after (optionally 1684 <code>null</code>) 1685 * @param displayDateLT the date before which a matching web content 1686 article's display date must be before (optionally 1687 <code>null</code>) 1688 * @param status the web content article's workflow status. For more 1689 information see {@link WorkflowConstants} for constants starting 1690 with the "STATUS_" prefix. 1691 * @param reviewDate the web content article's scheduled review date 1692 (optionally <code>null</code>) 1693 * @param andOperator whether every field must match its value or keywords, 1694 or just one field must match. Group, folder IDs, class name ID, 1695 and status must all match their values. 1696 * @return the number of matching web content articles 1697 * @throws SystemException if a system exception occurred 1698 */ 1699 public static int searchCount(long companyId, long groupId, 1700 java.util.List<java.lang.Long> folderIds, long classNameId, 1701 java.lang.String articleId, java.lang.Double version, 1702 java.lang.String title, java.lang.String description, 1703 java.lang.String content, java.lang.String type, 1704 java.lang.String[] ddmStructureKeys, 1705 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1706 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1707 boolean andOperator) 1708 throws com.liferay.portal.kernel.exception.SystemException { 1709 return getService() 1710 .searchCount(companyId, groupId, folderIds, classNameId, 1711 articleId, version, title, description, content, type, 1712 ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT, 1713 status, reviewDate, andOperator); 1714 } 1715 1716 /** 1717 * Subscribes the user to notifications for the web content article matching 1718 * the group, notifying him the instant versions of the article are created, 1719 * deleted, or modified. 1720 * 1721 * @param groupId the primary key of the group 1722 * @throws PortalException if the user did not have permission to subscribe 1723 to the web content article or if a matching user or group could 1724 not be found 1725 * @throws SystemException if a system exception occurred 1726 */ 1727 public static void subscribe(long groupId) 1728 throws com.liferay.portal.kernel.exception.PortalException, 1729 com.liferay.portal.kernel.exception.SystemException { 1730 getService().subscribe(groupId); 1731 } 1732 1733 /** 1734 * Unsubscribes the user from notifications for the web content article 1735 * matching the group. 1736 * 1737 * @param groupId the primary key of the group 1738 * @throws PortalException if the user did not have permission to subscribe 1739 to the web content article or if a matching user or subscription 1740 could not be found 1741 * @throws SystemException if a system exception occurred 1742 */ 1743 public static void unsubscribe(long groupId) 1744 throws com.liferay.portal.kernel.exception.PortalException, 1745 com.liferay.portal.kernel.exception.SystemException { 1746 getService().unsubscribe(groupId); 1747 } 1748 1749 /** 1750 * Updates the web content article matching the version, replacing its 1751 * folder, title, description, content, and layout UUID. 1752 * 1753 * @param userId the primary key of the user updating the web content 1754 article 1755 * @param groupId the primary key of the web content article's group 1756 * @param folderId the primary key of the web content article folder 1757 * @param articleId the primary key of the web content article 1758 * @param version the web content article's version 1759 * @param titleMap the web content article's locales and localized titles 1760 * @param descriptionMap the web content article's locales and localized 1761 descriptions 1762 * @param content the HTML content wrapped in XML. For more information, 1763 see the content example in the class description for {@link 1764 JournalArticleLocalServiceImpl}. 1765 * @param layoutUuid the unique string identifying the web content 1766 article's display page 1767 * @param serviceContext the service context to be applied. Can set the 1768 modification date, expando bridge attributes, asset category IDs, 1769 asset tag names, asset link entry IDs, workflow actions, the 1770 "defaultLanguageId" and "urlTitle" attributes, and can set 1771 whether to add the default command update for the web content 1772 article. With respect to social activities, by setting the 1773 service context's command to {@link 1774 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1775 is considered a web content update activity; otherwise it is 1776 considered a web content add activity. 1777 * @return the updated web content article 1778 * @throws PortalException if a user with the primary key or a matching web 1779 content article could not be found, or if a portal exception 1780 occurred 1781 * @throws SystemException if a system exception occurred 1782 */ 1783 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 1784 long userId, long groupId, long folderId, java.lang.String articleId, 1785 double version, 1786 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1787 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1788 java.lang.String content, java.lang.String layoutUuid, 1789 com.liferay.portal.service.ServiceContext serviceContext) 1790 throws com.liferay.portal.kernel.exception.PortalException, 1791 com.liferay.portal.kernel.exception.SystemException { 1792 return getService() 1793 .updateArticle(userId, groupId, folderId, articleId, 1794 version, titleMap, descriptionMap, content, layoutUuid, 1795 serviceContext); 1796 } 1797 1798 /** 1799 * Updates the web content article with additional parameters. 1800 * 1801 * @param groupId the primary key of the web content article's group 1802 * @param folderId the primary key of the web content article folder 1803 * @param articleId the primary key of the web content article 1804 * @param version the web content article's version 1805 * @param titleMap the web content article's locales and localized titles 1806 * @param descriptionMap the web content article's locales and localized 1807 descriptions 1808 * @param content the HTML content wrapped in XML. For more information, 1809 see the content example in the class description for {@link 1810 JournalArticleLocalServiceImpl}. 1811 * @param type the structure's type, if the web content article is related 1812 to a DDM structure. For more information, see {@link 1813 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 1814 * @param ddmStructureKey the primary key of the web content article's DDM 1815 structure, if the article is related to a DDM structure, or 1816 <code>null</code> otherwise 1817 * @param ddmTemplateKey the primary key of the web content article's DDM 1818 template (optionally <code>null</code>). If the article is 1819 related to a DDM structure, the template's structure must match 1820 it. 1821 * @param layoutUuid the unique string identifying the web content 1822 article's display page 1823 * @param displayDateMonth the month the web content article is set to 1824 display 1825 * @param displayDateDay the calendar day the web content article is set to 1826 display 1827 * @param displayDateYear the year the web content article is set to 1828 display 1829 * @param displayDateHour the hour the web content article is set to 1830 display 1831 * @param displayDateMinute the minute the web content article is set to 1832 display 1833 * @param expirationDateMonth the month the web content article is set to 1834 expire 1835 * @param expirationDateDay the calendar day the web content article is set 1836 to expire 1837 * @param expirationDateYear the year the web content article is set to 1838 expire 1839 * @param expirationDateHour the hour the web content article is set to 1840 expire 1841 * @param expirationDateMinute the minute the web content article is set to 1842 expire 1843 * @param neverExpire whether the web content article is not set to auto 1844 expire 1845 * @param reviewDateMonth the month the web content article is set for 1846 review 1847 * @param reviewDateDay the calendar day the web content article is set for 1848 review 1849 * @param reviewDateYear the year the web content article is set for review 1850 * @param reviewDateHour the hour the web content article is set for review 1851 * @param reviewDateMinute the minute the web content article is set for 1852 review 1853 * @param neverReview whether the web content article is not set for review 1854 * @param indexable whether the web content is searchable 1855 * @param smallImage whether to update web content article's a small image. 1856 A file must be passed in as <code>smallImageFile</code> value, 1857 otherwise the current small image is deleted. 1858 * @param smallImageURL the web content article's small image URL 1859 (optionally <code>null</code>) 1860 * @param smallFile the web content article's new small image file 1861 (optionally <code>null</code>). Must pass in 1862 <code>smallImage</code> value of <code>true</code> to replace the 1863 article's small image file. 1864 * @param images the web content's images (optionally <code>null</code>) 1865 * @param articleURL the web content article's accessible URL (optionally 1866 <code>null</code>) 1867 * @param serviceContext the service context to be applied. Can set the 1868 modification date, expando bridge attributes, asset category IDs, 1869 asset tag names, asset link entry IDs, workflow actions, the 1870 "defaultLanguageId" and "urlTitle" attributes, and can set 1871 whether to add the default command update for the web content 1872 article. With respect to social activities, by setting the 1873 service context's command to {@link 1874 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1875 is considered a web content update activity; otherwise it is 1876 considered a web content add activity. 1877 * @return the updated web content article 1878 * @throws PortalException if the user did not have permission to update the 1879 web content article, if a user with the primary key or a matching 1880 web content article could not be found, or if a portal exception 1881 occurred 1882 * @throws SystemException if a system exception occurred 1883 */ 1884 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 1885 long groupId, long folderId, java.lang.String articleId, 1886 double version, 1887 java.util.Map<java.util.Locale, java.lang.String> titleMap, 1888 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1889 java.lang.String content, java.lang.String type, 1890 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1891 java.lang.String layoutUuid, int displayDateMonth, int displayDateDay, 1892 int displayDateYear, int displayDateHour, int displayDateMinute, 1893 int expirationDateMonth, int expirationDateDay, int expirationDateYear, 1894 int expirationDateHour, int expirationDateMinute, boolean neverExpire, 1895 int reviewDateMonth, int reviewDateDay, int reviewDateYear, 1896 int reviewDateHour, int reviewDateMinute, boolean neverReview, 1897 boolean indexable, boolean smallImage, java.lang.String smallImageURL, 1898 java.io.File smallFile, java.util.Map<java.lang.String, byte[]> images, 1899 java.lang.String articleURL, 1900 com.liferay.portal.service.ServiceContext serviceContext) 1901 throws com.liferay.portal.kernel.exception.PortalException, 1902 com.liferay.portal.kernel.exception.SystemException { 1903 return getService() 1904 .updateArticle(groupId, folderId, articleId, version, 1905 titleMap, descriptionMap, content, type, ddmStructureKey, 1906 ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay, 1907 displayDateYear, displayDateHour, displayDateMinute, 1908 expirationDateMonth, expirationDateDay, expirationDateYear, 1909 expirationDateHour, expirationDateMinute, neverExpire, 1910 reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour, 1911 reviewDateMinute, neverReview, indexable, smallImage, 1912 smallImageURL, smallFile, images, articleURL, serviceContext); 1913 } 1914 1915 /** 1916 * Updates the web content article matching the version, replacing its 1917 * folder and content. 1918 * 1919 * @param groupId the primary key of the web content article's group 1920 * @param folderId the primary key of the web content article folder 1921 * @param articleId the primary key of the web content article 1922 * @param version the web content article's version 1923 * @param content the HTML content wrapped in XML. For more information, 1924 see the content example in the class description for {@link 1925 JournalArticleLocalServiceImpl}. 1926 * @param serviceContext the service context to be applied. Can set the 1927 modification date, expando bridge attributes, asset category IDs, 1928 asset tag names, asset link entry IDs, workflow actions, the 1929 "defaultLanguageId" and "urlTitle" attributes, and can set 1930 whether to add the default command update for the web content 1931 article. With respect to social activities, by setting the 1932 service context's command to {@link 1933 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1934 is considered a web content update activity; otherwise it is 1935 considered a web content add activity. 1936 * @return the updated web content article 1937 * @throws PortalException if the user did not have permission to update the 1938 web content article, if a user with the primary key or a matching 1939 web content article could not be found, or if a portal exception 1940 occurred 1941 * @throws SystemException if a system exception occurred 1942 */ 1943 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 1944 long groupId, long folderId, java.lang.String articleId, 1945 double version, java.lang.String content, 1946 com.liferay.portal.service.ServiceContext serviceContext) 1947 throws com.liferay.portal.kernel.exception.PortalException, 1948 com.liferay.portal.kernel.exception.SystemException { 1949 return getService() 1950 .updateArticle(groupId, folderId, articleId, version, 1951 content, serviceContext); 1952 } 1953 1954 /** 1955 * @deprecated As of 6.2.0, replaced by {@link 1956 #updateArticleTranslation(long, String, double, Locale, 1957 String, String, String, Map, ServiceContext)} 1958 */ 1959 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 1960 long groupId, java.lang.String articleId, double version, 1961 java.util.Locale locale, java.lang.String title, 1962 java.lang.String description, java.lang.String content, 1963 java.util.Map<java.lang.String, byte[]> images) 1964 throws com.liferay.portal.kernel.exception.PortalException, 1965 com.liferay.portal.kernel.exception.SystemException { 1966 return getService() 1967 .updateArticleTranslation(groupId, articleId, version, 1968 locale, title, description, content, images); 1969 } 1970 1971 /** 1972 * Updates the translation of the web content article. 1973 * 1974 * @param groupId the primary key of the web content article's group 1975 * @param articleId the primary key of the web content article 1976 * @param version the web content article's version 1977 * @param locale the locale of the web content article's display template 1978 * @param title the translated web content article title 1979 * @param description the translated web content article description 1980 * @param content the HTML content wrapped in XML. For more information, 1981 see the content example in the class description for {@link 1982 JournalArticleLocalServiceImpl}. 1983 * @param images the web content's images 1984 * @param serviceContext the service context to be applied. Can set the 1985 modification date and "urlTitle" attribute for the web content 1986 article. 1987 * @return the updated web content article 1988 * @throws PortalException if the user did not have permission to update the 1989 web content article, if a user with the primary key or a matching 1990 web content article could not be found, or if a portal exception 1991 occurred 1992 * @throws SystemException if a system exception occurred 1993 */ 1994 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 1995 long groupId, java.lang.String articleId, double version, 1996 java.util.Locale locale, java.lang.String title, 1997 java.lang.String description, java.lang.String content, 1998 java.util.Map<java.lang.String, byte[]> images, 1999 com.liferay.portal.service.ServiceContext serviceContext) 2000 throws com.liferay.portal.kernel.exception.PortalException, 2001 com.liferay.portal.kernel.exception.SystemException { 2002 return getService() 2003 .updateArticleTranslation(groupId, articleId, version, 2004 locale, title, description, content, images, serviceContext); 2005 } 2006 2007 /** 2008 * Updates the web content article matching the group, article ID, and 2009 * version, replacing its content. 2010 * 2011 * @param groupId the primary key of the web content article's group 2012 * @param articleId the primary key of the web content article 2013 * @param version the web content article's version 2014 * @param content the HTML content wrapped in XML. For more information, 2015 see the content example in the class description for {@link 2016 JournalArticleLocalServiceImpl}. 2017 * @return the updated web content article 2018 * @throws PortalException if the user did not have permission to update the 2019 web content article or if a matching web content article could 2020 not be found 2021 * @throws SystemException if a system exception occurred 2022 */ 2023 public static com.liferay.portlet.journal.model.JournalArticle updateContent( 2024 long groupId, java.lang.String articleId, double version, 2025 java.lang.String content) 2026 throws com.liferay.portal.kernel.exception.PortalException, 2027 com.liferay.portal.kernel.exception.SystemException { 2028 return getService().updateContent(groupId, articleId, version, content); 2029 } 2030 2031 /** 2032 * Updates the workflow status of the web content article matching the 2033 * group, article ID, and version. 2034 * 2035 * @param groupId the primary key of the web content article's group 2036 * @param articleId the primary key of the web content article 2037 * @param version the web content article's version 2038 * @param status the web content article's workflow status. For more 2039 information see {@link WorkflowConstants} for constants starting 2040 with the "STATUS_" prefix. 2041 * @param articleURL the web content article's accessible URL 2042 * @param serviceContext the service context to be applied. Can set the 2043 modification date, portlet preferences, and can set whether to 2044 add the default command update for the web content article. 2045 * @return the updated web content article 2046 * @throws PortalException if the user did not have permission to update the 2047 web content article, if a matching web content article could not 2048 be found, or if a portal exception occurred 2049 * @throws SystemException if a system exception occurred 2050 */ 2051 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 2052 long groupId, java.lang.String articleId, double version, int status, 2053 java.lang.String articleURL, 2054 com.liferay.portal.service.ServiceContext serviceContext) 2055 throws com.liferay.portal.kernel.exception.PortalException, 2056 com.liferay.portal.kernel.exception.SystemException { 2057 return getService() 2058 .updateStatus(groupId, articleId, version, status, 2059 articleURL, serviceContext); 2060 } 2061 2062 public static JournalArticleService getService() { 2063 if (_service == null) { 2064 _service = (JournalArticleService)PortalBeanLocatorUtil.locate(JournalArticleService.class.getName()); 2065 2066 ReferenceRegistry.registerReference(JournalArticleServiceUtil.class, 2067 "_service"); 2068 } 2069 2070 return _service; 2071 } 2072 2073 /** 2074 * @deprecated As of 6.2.0 2075 */ 2076 public void setService(JournalArticleService service) { 2077 } 2078 2079 private static JournalArticleService _service; 2080 }