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