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