001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.journal.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the local service utility for JournalArticle. This utility wraps 024 * {@link com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on the local server. Methods of this service will not have security checks 027 * based on the propagated JAAS credentials because this service can only be 028 * accessed from within the same VM. 029 * 030 * @author Brian Wing Shun Chan 031 * @see JournalArticleLocalService 032 * @see com.liferay.portlet.journal.service.base.JournalArticleLocalServiceBaseImpl 033 * @see com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class JournalArticleLocalServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.journal.service.impl.JournalArticleLocalServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Adds a web content article with additional parameters. 046 * 047 * <p> 048 * The web content articles hold HTML content wrapped in XML. The XML lets 049 * you specify the article's default locale and available locales. Here is a 050 * content example: 051 * </p> 052 * 053 * <p> 054 * <pre> 055 * <code> 056 * <?xml version='1.0' encoding='UTF-8'?> 057 * <root default-locale="en_US" available-locales="en_US"> 058 * <static-content language-id="en_US"> 059 * <![CDATA[<p><b><i>test<i> content<b></p>]]> 060 * </static-content> 061 * </root> 062 * </code> 063 * </pre> 064 * </p> 065 * 066 * @param userId the primary key of the web content article's creator/owner 067 * @param groupId the primary key of the web content article's group 068 * @param folderId the primary key of the web content article folder 069 * @param classNameId the primary key of the DDMStructure class if the web 070 content article is related to a DDM structure, the primary key of 071 the class name associated with the article, or {@link 072 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 073 * @param classPK the primary key of the DDM structure, if the primary key 074 of the DDMStructure class is given as the 075 <code>classNameId</code> parameter, the primary key of the class 076 associated with the web content article, or <code>0</code> 077 otherwise 078 * @param articleId the primary key of the web content article 079 * @param autoArticleId whether to auto generate the web content article ID 080 * @param version the web content article's version 081 * @param titleMap the web content article's locales and localized titles 082 * @param descriptionMap the web content article's locales and localized 083 descriptions 084 * @param content the HTML content wrapped in XML 085 * @param ddmStructureKey the primary key of the web content article's DDM 086 structure, if the article is related to a DDM structure, or 087 <code>null</code> otherwise 088 * @param ddmTemplateKey the primary key of the web content article's DDM 089 template 090 * @param layoutUuid the unique string identifying the web content 091 article's display page 092 * @param displayDateMonth the month the web content article is set to 093 display 094 * @param displayDateDay the calendar day the web content article is set to 095 display 096 * @param displayDateYear the year the web content article is set to 097 display 098 * @param displayDateHour the hour the web content article is set to 099 display 100 * @param displayDateMinute the minute the web content article is set to 101 display 102 * @param expirationDateMonth the month the web content article is set to 103 expire 104 * @param expirationDateDay the calendar day the web content article is set 105 to expire 106 * @param expirationDateYear the year the web content article is set to 107 expire 108 * @param expirationDateHour the hour the web content article is set to 109 expire 110 * @param expirationDateMinute the minute the web content article is set to 111 expire 112 * @param neverExpire whether the web content article is not set to auto 113 expire 114 * @param reviewDateMonth the month the web content article is set for 115 review 116 * @param reviewDateDay the calendar day the web content article is set for 117 review 118 * @param reviewDateYear the year the web content article is set for review 119 * @param reviewDateHour the hour the web content article is set for review 120 * @param reviewDateMinute the minute the web content article is set for 121 review 122 * @param neverReview whether the web content article is not set for review 123 * @param indexable whether the web content article is searchable 124 * @param smallImage whether the web content article has a small image 125 * @param smallImageURL the web content article's small image URL 126 * @param smallImageFile the web content article's small image file 127 * @param images the web content's images 128 * @param articleURL the web content article's accessible URL 129 * @param serviceContext the service context to be applied. Can set the 130 UUID, creation date, modification date, expando bridge 131 attributes, guest permissions, group permissions, asset category 132 IDs, asset tag names, asset link entry IDs, URL title, and 133 workflow actions for the web content article. Can also set 134 whether to add the default guest and group permissions. 135 * @return the web content article 136 * @throws PortalException if a portal exception occurred 137 */ 138 public static com.liferay.portlet.journal.model.JournalArticle addArticle( 139 long userId, long groupId, long folderId, long classNameId, 140 long classPK, java.lang.String articleId, boolean autoArticleId, 141 double version, 142 java.util.Map<java.util.Locale, java.lang.String> titleMap, 143 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 144 java.lang.String content, java.lang.String ddmStructureKey, 145 java.lang.String ddmTemplateKey, java.lang.String layoutUuid, 146 int displayDateMonth, int displayDateDay, int displayDateYear, 147 int displayDateHour, int displayDateMinute, int expirationDateMonth, 148 int expirationDateDay, int expirationDateYear, int expirationDateHour, 149 int expirationDateMinute, boolean neverExpire, int reviewDateMonth, 150 int reviewDateDay, int reviewDateYear, int reviewDateHour, 151 int reviewDateMinute, boolean neverReview, boolean indexable, 152 boolean smallImage, java.lang.String smallImageURL, 153 java.io.File smallImageFile, 154 java.util.Map<java.lang.String, byte[]> images, 155 java.lang.String articleURL, 156 com.liferay.portal.service.ServiceContext serviceContext) 157 throws com.liferay.portal.kernel.exception.PortalException { 158 return getService() 159 .addArticle(userId, groupId, folderId, classNameId, classPK, 160 articleId, autoArticleId, version, titleMap, descriptionMap, 161 content, ddmStructureKey, ddmTemplateKey, layoutUuid, 162 displayDateMonth, displayDateDay, displayDateYear, displayDateHour, 163 displayDateMinute, expirationDateMonth, expirationDateDay, 164 expirationDateYear, expirationDateHour, expirationDateMinute, 165 neverExpire, reviewDateMonth, reviewDateDay, reviewDateYear, 166 reviewDateHour, reviewDateMinute, neverReview, indexable, 167 smallImage, smallImageURL, smallImageFile, images, articleURL, 168 serviceContext); 169 } 170 171 /** 172 * Adds a web content article. 173 * 174 * @param userId the primary key of the web content article's creator/owner 175 * @param groupId the primary key of the web content article's group 176 * @param folderId the primary key of the web content article folder 177 * @param titleMap the web content article's locales and localized titles 178 * @param descriptionMap the web content article's locales and localized 179 descriptions 180 * @param content the HTML content wrapped in XML. For more information, 181 see the content example in the {@link #addArticle(long, long, 182 long, long, long, String, boolean, double, Map, Map, String, 183 String, String, String, int, int, int, int, int, int, int, int, 184 int, int, boolean, int, int, int, int, int, boolean, boolean, 185 boolean, String, File, Map, String, ServiceContext)} description. 186 * @param ddmStructureKey the primary key of the web content article's DDM 187 structure, if the article is related to a DDM structure, or 188 <code>null</code> otherwise 189 * @param ddmTemplateKey the primary key of the web content article's DDM 190 template 191 * @param serviceContext the service context to be applied. Can set the 192 UUID, creation date, modification date, expando bridge 193 attributes, guest permissions, group permissions, asset category 194 IDs, asset tag names, asset link entry IDs, URL title, and 195 workflow actions for the web content article. Can also set 196 whether to add the default guest and group permissions. 197 * @return the web content article 198 * @throws PortalException if a portal exception occurred 199 */ 200 public static com.liferay.portlet.journal.model.JournalArticle addArticle( 201 long userId, long groupId, long folderId, 202 java.util.Map<java.util.Locale, java.lang.String> titleMap, 203 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 204 java.lang.String content, java.lang.String ddmStructureKey, 205 java.lang.String ddmTemplateKey, 206 com.liferay.portal.service.ServiceContext serviceContext) 207 throws com.liferay.portal.kernel.exception.PortalException { 208 return getService() 209 .addArticle(userId, groupId, folderId, titleMap, 210 descriptionMap, content, ddmStructureKey, ddmTemplateKey, 211 serviceContext); 212 } 213 214 /** 215 * Adds the resources to the web content article. 216 * 217 * @param article the web content article 218 * @param addGroupPermissions whether to add group permissions 219 * @param addGuestPermissions whether to add guest permissions 220 * @throws PortalException if no portal actions could be found associated 221 with the web content article or if a portal exception occurred 222 */ 223 public static void addArticleResources( 224 com.liferay.portlet.journal.model.JournalArticle article, 225 boolean addGroupPermissions, boolean addGuestPermissions) 226 throws com.liferay.portal.kernel.exception.PortalException { 227 getService() 228 .addArticleResources(article, addGroupPermissions, 229 addGuestPermissions); 230 } 231 232 /** 233 * Adds the model resources with the permissions to the web content article. 234 * 235 * @param article the web content article to add resources to 236 * @param groupPermissions the group permissions to be added 237 * @param guestPermissions the guest permissions to be added 238 * @throws PortalException if a portal exception occurred 239 */ 240 public static void addArticleResources( 241 com.liferay.portlet.journal.model.JournalArticle article, 242 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 243 throws com.liferay.portal.kernel.exception.PortalException { 244 getService() 245 .addArticleResources(article, groupPermissions, guestPermissions); 246 } 247 248 /** 249 * Adds the resources to the most recently created web content article. 250 * 251 * @param groupId the primary key of the web content article's group 252 * @param articleId the primary key of the web content article 253 * @param addGroupPermissions whether to add group permissions 254 * @param addGuestPermissions whether to add guest permissions 255 * @throws PortalException if a portal exception occurred 256 */ 257 public static void addArticleResources(long groupId, 258 java.lang.String articleId, boolean addGroupPermissions, 259 boolean addGuestPermissions) 260 throws com.liferay.portal.kernel.exception.PortalException { 261 getService() 262 .addArticleResources(groupId, articleId, addGroupPermissions, 263 addGuestPermissions); 264 } 265 266 /** 267 * Adds the resources with the permissions to the most recently created web 268 * content article. 269 * 270 * @param groupId the primary key of the web content article's group 271 * @param articleId the primary key of the web content article 272 * @param groupPermissions the group permissions to be added 273 * @param guestPermissions the guest permissions to be added 274 * @throws PortalException if a portal exception occurred 275 */ 276 public static void addArticleResources(long groupId, 277 java.lang.String articleId, java.lang.String[] groupPermissions, 278 java.lang.String[] guestPermissions) 279 throws com.liferay.portal.kernel.exception.PortalException { 280 getService() 281 .addArticleResources(groupId, articleId, groupPermissions, 282 guestPermissions); 283 } 284 285 /** 286 * Adds the journal article to the database. Also notifies the appropriate model listeners. 287 * 288 * @param journalArticle the journal article 289 * @return the journal article that was added 290 */ 291 public static com.liferay.portlet.journal.model.JournalArticle addJournalArticle( 292 com.liferay.portlet.journal.model.JournalArticle journalArticle) { 293 return getService().addJournalArticle(journalArticle); 294 } 295 296 /** 297 * Returns the web content article with the group, article ID, and version. 298 * This method checks for the article's resource primary key and, if not 299 * found, creates a new one. 300 * 301 * @param groupId the primary key of the web content article's group 302 * @param articleId the primary key of the web content article 303 * @param version the web content article's version 304 * @return the matching web content article 305 * @throws PortalException if a matching web content article could not be 306 found 307 */ 308 public static com.liferay.portlet.journal.model.JournalArticle checkArticleResourcePrimKey( 309 long groupId, java.lang.String articleId, double version) 310 throws com.liferay.portal.kernel.exception.PortalException { 311 return getService() 312 .checkArticleResourcePrimKey(groupId, articleId, version); 313 } 314 315 /** 316 * Checks all web content articles by handling their expirations and sending 317 * review notifications based on their current workflow. 318 * 319 * @throws PortalException if a portal exception occurred 320 */ 321 public static void checkArticles() 322 throws com.liferay.portal.kernel.exception.PortalException { 323 getService().checkArticles(); 324 } 325 326 /** 327 * Checks the web content article matching the group, article ID, and 328 * version, replacing escaped newline and return characters with non-escaped 329 * newline and return characters. 330 * 331 * @param groupId the primary key of the web content article's group 332 * @param articleId the primary key of the web content article 333 * @param version the web content article's version 334 * @throws PortalException if a matching web content article could not be 335 found 336 */ 337 public static void checkNewLine(long groupId, java.lang.String articleId, 338 double version) 339 throws com.liferay.portal.kernel.exception.PortalException { 340 getService().checkNewLine(groupId, articleId, version); 341 } 342 343 /** 344 * Checks the web content article matching the group, article ID, and 345 * version for an associated structure. If no structure is associated, 346 * return; otherwise check that the article and structure match. 347 * 348 * @param groupId the primary key of the web content article's group 349 * @param articleId the primary key of the web content article 350 * @param version the web content article's version 351 * @throws PortalException if a matching web content article could not be 352 found, if the article's structure does not match it, or if a 353 portal exception occurred 354 */ 355 public static void checkStructure(long groupId, java.lang.String articleId, 356 double version) 357 throws com.liferay.portal.kernel.exception.PortalException { 358 getService().checkStructure(groupId, articleId, version); 359 } 360 361 /** 362 * Copies the web content article matching the group, article ID, and 363 * version. This method creates a new article, extracting all the values 364 * from the old one and updating its article ID. 365 * 366 * @param userId the primary key of the web content article's creator/owner 367 * @param groupId the primary key of the web content article's group 368 * @param oldArticleId the primary key of the old web content article 369 * @param newArticleId the primary key of the new web content article 370 * @param autoArticleId whether to auto-generate the web content article ID 371 * @param version the web content article's version 372 * @return the new web content article 373 * @throws PortalException if a matching web content article could not be 374 found or if a portal exception occurred 375 */ 376 public static com.liferay.portlet.journal.model.JournalArticle copyArticle( 377 long userId, long groupId, java.lang.String oldArticleId, 378 java.lang.String newArticleId, boolean autoArticleId, double version) 379 throws com.liferay.portal.kernel.exception.PortalException { 380 return getService() 381 .copyArticle(userId, groupId, oldArticleId, newArticleId, 382 autoArticleId, version); 383 } 384 385 /** 386 * Creates a new journal article with the primary key. Does not add the journal article to the database. 387 * 388 * @param id the primary key for the new journal article 389 * @return the new journal article 390 */ 391 public static com.liferay.portlet.journal.model.JournalArticle createJournalArticle( 392 long id) { 393 return getService().createJournalArticle(id); 394 } 395 396 /** 397 * Deletes the web content article and its resources. 398 * 399 * @param article the web content article 400 * @return the deleted web content article 401 * @throws PortalException if a portal exception occurred 402 */ 403 public static com.liferay.portlet.journal.model.JournalArticle deleteArticle( 404 com.liferay.portlet.journal.model.JournalArticle article) 405 throws com.liferay.portal.kernel.exception.PortalException { 406 return getService().deleteArticle(article); 407 } 408 409 /** 410 * Deletes the web content article and its resources, optionally sending 411 * email notifying denial of the article if it had not yet been approved. 412 * 413 * @param article the web content article 414 * @param articleURL the web content article's accessible URL to include in 415 email notifications (optionally <code>null</code>) 416 * @param serviceContext the service context to be applied (optionally 417 <code>null</code>). Can set the portlet preferences that include 418 email information to notify recipients of the unapproved web 419 content's denial. 420 * @return the deleted web content article 421 * @throws PortalException if a portal exception occurred 422 */ 423 public static com.liferay.portlet.journal.model.JournalArticle deleteArticle( 424 com.liferay.portlet.journal.model.JournalArticle article, 425 java.lang.String articleURL, 426 com.liferay.portal.service.ServiceContext serviceContext) 427 throws com.liferay.portal.kernel.exception.PortalException { 428 return getService().deleteArticle(article, articleURL, serviceContext); 429 } 430 431 /** 432 * Deletes all web content articles and their resources matching the group 433 * and article ID, optionally sending email notifying denial of article if 434 * it had not yet been approved. 435 * 436 * @param groupId the primary key of the web content article's group 437 * @param articleId the primary key of the web content article 438 * @param serviceContext the service context to be applied. Can set the 439 portlet preferences that include email information to notify 440 recipients of the unapproved web content article's denial. 441 * @throws PortalException if a portal exception occurred 442 */ 443 public static void deleteArticle(long groupId, java.lang.String articleId, 444 com.liferay.portal.service.ServiceContext serviceContext) 445 throws com.liferay.portal.kernel.exception.PortalException { 446 getService().deleteArticle(groupId, articleId, serviceContext); 447 } 448 449 /** 450 * Deletes the web content article and its resources matching the group, 451 * article ID, and version, optionally sending email notifying denial of the 452 * web content article if it had not yet been approved. 453 * 454 * @param groupId the primary key of the web content article's group 455 * @param articleId the primary key of the web content article 456 * @param version the web content article's version 457 * @param articleURL the web content article's accessible URL 458 * @param serviceContext the service context to be applied. Can set the 459 portlet preferences that include email information to notify 460 recipients of the unapproved web content article's denial. 461 * @return the deleted web content article 462 * @throws PortalException if a matching web content article could not be 463 found or if a portal exception occurred 464 */ 465 public static com.liferay.portlet.journal.model.JournalArticle deleteArticle( 466 long groupId, java.lang.String articleId, double version, 467 java.lang.String articleURL, 468 com.liferay.portal.service.ServiceContext serviceContext) 469 throws com.liferay.portal.kernel.exception.PortalException { 470 return getService() 471 .deleteArticle(groupId, articleId, version, articleURL, 472 serviceContext); 473 } 474 475 /** 476 * Deletes all the group's web content articles and resources. 477 * 478 * @param groupId the primary key of the web content article's group 479 * @throws PortalException if a portal exception occurred 480 */ 481 public static void deleteArticles(long groupId) 482 throws com.liferay.portal.kernel.exception.PortalException { 483 getService().deleteArticles(groupId); 484 } 485 486 /** 487 * Deletes all the group's web content articles and resources in the folder, 488 * including recycled articles. 489 * 490 * @param groupId the primary key of the web content article's group 491 * @param folderId the primary key of the web content article folder 492 * @throws PortalException if a portal exception occurred 493 */ 494 public static void deleteArticles(long groupId, long folderId) 495 throws com.liferay.portal.kernel.exception.PortalException { 496 getService().deleteArticles(groupId, folderId); 497 } 498 499 /** 500 * Deletes all the group's web content articles and resources in the folder, 501 * optionally including recycled articles. 502 * 503 * @param groupId the primary key of the web content article's group 504 * @param folderId the primary key of the web content article folder 505 * @param includeTrashedEntries whether to include recycled web content 506 articles 507 * @throws PortalException if a portal exception occurred 508 */ 509 public static void deleteArticles(long groupId, long folderId, 510 boolean includeTrashedEntries) 511 throws com.liferay.portal.kernel.exception.PortalException { 512 getService().deleteArticles(groupId, folderId, includeTrashedEntries); 513 } 514 515 /** 516 * Deletes the journal article with the primary key from the database. Also notifies the appropriate model listeners. 517 * 518 * @param id the primary key of the journal article 519 * @return the journal article that was removed 520 * @throws PortalException if a journal article with the primary key could not be found 521 */ 522 public static com.liferay.portlet.journal.model.JournalArticle deleteJournalArticle( 523 long id) throws com.liferay.portal.kernel.exception.PortalException { 524 return getService().deleteJournalArticle(id); 525 } 526 527 /** 528 * Deletes the journal article from the database. Also notifies the appropriate model listeners. 529 * 530 * @param journalArticle the journal article 531 * @return the journal article that was removed 532 */ 533 public static com.liferay.portlet.journal.model.JournalArticle deleteJournalArticle( 534 com.liferay.portlet.journal.model.JournalArticle journalArticle) { 535 return getService().deleteJournalArticle(journalArticle); 536 } 537 538 /** 539 * Deletes the layout's association with the web content articles for the 540 * group. 541 * 542 * @param groupId the primary key of the web content article's group 543 * @param layoutUuid the unique string identifying the web content article's 544 display page 545 */ 546 public static void deleteLayoutArticleReferences(long groupId, 547 java.lang.String layoutUuid) { 548 getService().deleteLayoutArticleReferences(groupId, layoutUuid); 549 } 550 551 /** 552 * @throws PortalException 553 */ 554 public static com.liferay.portal.model.PersistedModel deletePersistedModel( 555 com.liferay.portal.model.PersistedModel persistedModel) 556 throws com.liferay.portal.kernel.exception.PortalException { 557 return getService().deletePersistedModel(persistedModel); 558 } 559 560 public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() { 561 return getService().dynamicQuery(); 562 } 563 564 /** 565 * Performs a dynamic query on the database and returns the matching rows. 566 * 567 * @param dynamicQuery the dynamic query 568 * @return the matching rows 569 */ 570 public static <T> java.util.List<T> dynamicQuery( 571 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 572 return getService().dynamicQuery(dynamicQuery); 573 } 574 575 /** 576 * Performs a dynamic query on the database and returns a range of the matching rows. 577 * 578 * <p> 579 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 580 * </p> 581 * 582 * @param dynamicQuery the dynamic query 583 * @param start the lower bound of the range of model instances 584 * @param end the upper bound of the range of model instances (not inclusive) 585 * @return the range of matching rows 586 */ 587 public static <T> java.util.List<T> dynamicQuery( 588 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 589 int end) { 590 return getService().dynamicQuery(dynamicQuery, start, end); 591 } 592 593 /** 594 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 595 * 596 * <p> 597 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 598 * </p> 599 * 600 * @param dynamicQuery the dynamic query 601 * @param start the lower bound of the range of model instances 602 * @param end the upper bound of the range of model instances (not inclusive) 603 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 604 * @return the ordered range of matching rows 605 */ 606 public static <T> java.util.List<T> dynamicQuery( 607 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 608 int end, 609 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) { 610 return getService() 611 .dynamicQuery(dynamicQuery, start, end, orderByComparator); 612 } 613 614 /** 615 * Returns the number of rows matching the dynamic query. 616 * 617 * @param dynamicQuery the dynamic query 618 * @return the number of rows matching the dynamic query 619 */ 620 public static long dynamicQueryCount( 621 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) { 622 return getService().dynamicQueryCount(dynamicQuery); 623 } 624 625 /** 626 * Returns the number of rows matching the dynamic query. 627 * 628 * @param dynamicQuery the dynamic query 629 * @param projection the projection to apply to the query 630 * @return the number of rows matching the dynamic query 631 */ 632 public static long dynamicQueryCount( 633 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 634 com.liferay.portal.kernel.dao.orm.Projection projection) { 635 return getService().dynamicQueryCount(dynamicQuery, projection); 636 } 637 638 /** 639 * Expires the web content article matching the group and article ID, 640 * expiring all of its versions if the 641 * <code>journal.article.expire.all.versions</code> portal property is 642 * <code>true</code>, otherwise expiring only its latest approved version. 643 * 644 * @param userId the primary key of the user updating the web content 645 article 646 * @param groupId the primary key of the web content article's group 647 * @param articleId the primary key of the web content article 648 * @param articleURL the web content article's accessible URL 649 * @param serviceContext the service context to be applied. Can set the 650 modification date, status date, portlet preferences, and can set 651 whether to add the default command update for the web content 652 article. With respect to social activities, by setting the 653 service context's command to {@link 654 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 655 is considered a web content update activity; otherwise it is 656 considered a web content add activity. 657 * @throws PortalException if a matching web content article could not be 658 found or if a portal exception occurred 659 */ 660 public static void expireArticle(long userId, long groupId, 661 java.lang.String articleId, java.lang.String articleURL, 662 com.liferay.portal.service.ServiceContext serviceContext) 663 throws com.liferay.portal.kernel.exception.PortalException { 664 getService() 665 .expireArticle(userId, groupId, articleId, articleURL, 666 serviceContext); 667 } 668 669 /** 670 * Expires the web content article matching the group, article ID, and 671 * version. 672 * 673 * @param userId the primary key of the user updating the web content 674 article 675 * @param groupId the primary key of the web content article's group 676 * @param articleId the primary key of the web content article 677 * @param version the web content article's version 678 * @param articleURL the web content article's accessible URL 679 * @param serviceContext the service context to be applied. Can set the 680 modification date, status date, portlet preferences, and can set 681 whether to add the default command update for the web content 682 article. With respect to social activities, by setting the 683 service context's command to {@link 684 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 685 is considered a web content update activity; otherwise it is 686 considered a web content add activity. 687 * @return the web content article 688 * @throws PortalException if a matching web content article could not be 689 found or if a portal exception occurred 690 */ 691 public static com.liferay.portlet.journal.model.JournalArticle expireArticle( 692 long userId, long groupId, java.lang.String articleId, double version, 693 java.lang.String articleURL, 694 com.liferay.portal.service.ServiceContext serviceContext) 695 throws com.liferay.portal.kernel.exception.PortalException { 696 return getService() 697 .expireArticle(userId, groupId, articleId, version, 698 articleURL, serviceContext); 699 } 700 701 public static com.liferay.portlet.journal.model.JournalArticle fetchArticle( 702 long groupId, java.lang.String articleId) { 703 return getService().fetchArticle(groupId, articleId); 704 } 705 706 /** 707 * Returns the web content article matching the group, article ID, and 708 * version. 709 * 710 * @param groupId the primary key of the web content article's group 711 * @param articleId the primary key of the web content article 712 * @param version the web content article's version 713 * @return the web content article matching the group, article ID, and 714 version, or <code>null</code> if no web content article could be 715 found 716 */ 717 public static com.liferay.portlet.journal.model.JournalArticle fetchArticle( 718 long groupId, java.lang.String articleId, double version) { 719 return getService().fetchArticle(groupId, articleId, version); 720 } 721 722 public static com.liferay.portlet.journal.model.JournalArticle fetchArticleByUrlTitle( 723 long groupId, java.lang.String urlTitle) { 724 return getService().fetchArticleByUrlTitle(groupId, urlTitle); 725 } 726 727 public static com.liferay.portlet.journal.model.JournalArticle fetchDisplayArticle( 728 long groupId, java.lang.String articleId) { 729 return getService().fetchDisplayArticle(groupId, articleId); 730 } 731 732 public static com.liferay.portlet.journal.model.JournalArticle fetchJournalArticle( 733 long id) { 734 return getService().fetchJournalArticle(id); 735 } 736 737 /** 738 * Returns the journal article matching the UUID and group. 739 * 740 * @param uuid the journal article's UUID 741 * @param groupId the primary key of the group 742 * @return the matching journal article, or <code>null</code> if a matching journal article could not be found 743 */ 744 public static com.liferay.portlet.journal.model.JournalArticle fetchJournalArticleByUuidAndGroupId( 745 java.lang.String uuid, long groupId) { 746 return getService().fetchJournalArticleByUuidAndGroupId(uuid, groupId); 747 } 748 749 /** 750 * Returns the latest web content article matching the group, article ID, 751 * and workflow status. 752 * 753 * @param groupId the primary key of the web content article's group 754 * @param articleId the primary key of the web content article 755 * @param status the web content article's workflow status. For more 756 information see {@link WorkflowConstants} for constants starting 757 with the "STATUS_" prefix. 758 * @return the latest matching web content article, or <code>null</code> if 759 no matching web content article could be found 760 */ 761 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 762 long groupId, java.lang.String articleId, int status) { 763 return getService().fetchLatestArticle(groupId, articleId, status); 764 } 765 766 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 767 long resourcePrimKey) { 768 return getService().fetchLatestArticle(resourcePrimKey); 769 } 770 771 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 772 long resourcePrimKey, int status) { 773 return getService().fetchLatestArticle(resourcePrimKey, status); 774 } 775 776 /** 777 * Returns the latest web content article matching the resource primary key 778 * and workflow status, optionally preferring articles with approved 779 * workflow status. 780 * 781 * @param resourcePrimKey the primary key of the resource instance 782 * @param status the web content article's workflow status. For more 783 information see {@link WorkflowConstants} for constants starting 784 with the "STATUS_" prefix. 785 * @param preferApproved whether to prefer returning the latest matching 786 article that has workflow status {@link 787 WorkflowConstants#STATUS_APPROVED} over returning one that has a 788 different status 789 * @return the latest web content article matching the resource primary key 790 and workflow status, optionally preferring articles with an 791 approved workflow status, or <code>null</code> if no matching web 792 content article could be found 793 */ 794 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 795 long resourcePrimKey, int status, boolean preferApproved) { 796 return getService() 797 .fetchLatestArticle(resourcePrimKey, status, preferApproved); 798 } 799 800 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 801 long resourcePrimKey, int[] statuses) { 802 return getService().fetchLatestArticle(resourcePrimKey, statuses); 803 } 804 805 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticleByUrlTitle( 806 long groupId, java.lang.String urlTitle, int status) { 807 return getService() 808 .fetchLatestArticleByUrlTitle(groupId, urlTitle, status); 809 } 810 811 /** 812 * Returns the latest indexable web content article matching the resource 813 * primary key. 814 * 815 * @param resourcePrimKey the primary key of the resource instance 816 * @return the latest indexable web content article matching the resource 817 primary key, or <code>null</code> if no matching web content 818 article could be found 819 */ 820 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestIndexableArticle( 821 long resourcePrimKey) { 822 return getService().fetchLatestIndexableArticle(resourcePrimKey); 823 } 824 825 public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() { 826 return getService().getActionableDynamicQuery(); 827 } 828 829 /** 830 * Returns the latest approved web content article, or the latest unapproved 831 * article if none are approved. Both approved and unapproved articles must 832 * match the group and article ID. 833 * 834 * @param groupId the primary key of the web content article's group 835 * @param articleId the primary key of the web content article 836 * @return the matching web content article 837 * @throws PortalException if a matching web content article could not be 838 found 839 */ 840 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 841 long groupId, java.lang.String articleId) 842 throws com.liferay.portal.kernel.exception.PortalException { 843 return getService().getArticle(groupId, articleId); 844 } 845 846 /** 847 * Returns the web content article matching the group, article ID, and 848 * version. 849 * 850 * @param groupId the primary key of the web content article's group 851 * @param articleId the primary key of the web content article 852 * @param version the web content article's version 853 * @return the matching web content article 854 * @throws PortalException if a matching web content article could not be 855 found 856 */ 857 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 858 long groupId, java.lang.String articleId, double version) 859 throws com.liferay.portal.kernel.exception.PortalException { 860 return getService().getArticle(groupId, articleId, version); 861 } 862 863 /** 864 * Returns the web content article matching the group, class name, and class 865 * PK. 866 * 867 * @param groupId the primary key of the web content article's group 868 * @param className the DDMStructure class name if the web content article 869 is related to a DDM structure, the primary key of the class name 870 associated with the article, or {@link 871 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 872 * @param classPK the primary key of the DDM structure, if the the 873 DDMStructure class name is given as the <code>className</code> 874 parameter, the primary key of the class associated with the web 875 content article, or <code>0</code> otherwise 876 * @return the matching web content article 877 * @throws PortalException if a matching web content article could not be 878 found 879 */ 880 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 881 long groupId, java.lang.String className, long classPK) 882 throws com.liferay.portal.kernel.exception.PortalException { 883 return getService().getArticle(groupId, className, classPK); 884 } 885 886 /** 887 * Returns the web content article with the ID. 888 * 889 * @param id the primary key of the web content article 890 * @return the web content article with the ID 891 * @throws PortalException if a matching web content article could not be 892 found 893 */ 894 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 895 long id) throws com.liferay.portal.kernel.exception.PortalException { 896 return getService().getArticle(id); 897 } 898 899 /** 900 * Returns the latest web content article that is approved, or the latest 901 * unapproved article if none are approved. Both approved and unapproved 902 * articles must match the group and URL title. 903 * 904 * @param groupId the primary key of the web content article's group 905 * @param urlTitle the web content article's accessible URL title 906 * @return the matching web content article 907 * @throws PortalException if a portal exception occurred 908 */ 909 public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle( 910 long groupId, java.lang.String urlTitle) 911 throws com.liferay.portal.kernel.exception.PortalException { 912 return getService().getArticleByUrlTitle(groupId, urlTitle); 913 } 914 915 /** 916 * Returns the web content from the web content article associated with the 917 * portlet request model and the DDM template. 918 * 919 * @param article the web content article 920 * @param ddmTemplateKey the primary key of the web content article's DDM 921 template 922 * @param viewMode the mode in which the web content is being viewed 923 * @param languageId the primary key of the language translation to get 924 * @param portletRequestModel the portlet request model 925 * @param themeDisplay the theme display 926 * @return the web content from the web content article associated with the 927 portlet request model and the DDM template 928 * @throws PortalException if a matching DDM template could not be found, or 929 if a portal exception occurred 930 */ 931 public static java.lang.String getArticleContent( 932 com.liferay.portlet.journal.model.JournalArticle article, 933 java.lang.String ddmTemplateKey, java.lang.String viewMode, 934 java.lang.String languageId, 935 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 936 com.liferay.portal.theme.ThemeDisplay themeDisplay) 937 throws com.liferay.portal.kernel.exception.PortalException { 938 return getService() 939 .getArticleContent(article, ddmTemplateKey, viewMode, 940 languageId, portletRequestModel, themeDisplay); 941 } 942 943 /** 944 * Returns the web content from the web content article associated with the 945 * DDM template. 946 * 947 * @param article the web content article 948 * @param ddmTemplateKey the primary key of the web content article's 949 DDM template 950 * @param viewMode the mode in which the web content is being viewed 951 * @param languageId the primary key of the language translation to get 952 * @param themeDisplay the theme display 953 * @return the web content from the matching web content article 954 * @throws PortalException if a matching DDM template could not be 955 found, or if a portal exception occurred 956 * @deprecated As of 7.0.0, replaced by {@link 957 #getArticleContent(JournalArticle, String, String, String, 958 PortletRequestModel,ThemeDisplay)} 959 */ 960 @Deprecated 961 public static java.lang.String getArticleContent( 962 com.liferay.portlet.journal.model.JournalArticle article, 963 java.lang.String ddmTemplateKey, java.lang.String viewMode, 964 java.lang.String languageId, 965 com.liferay.portal.theme.ThemeDisplay themeDisplay) 966 throws com.liferay.portal.kernel.exception.PortalException { 967 return getService() 968 .getArticleContent(article, ddmTemplateKey, viewMode, 969 languageId, themeDisplay); 970 } 971 972 /** 973 * Returns the web content from the web content article matching the group, 974 * article ID, and version, and associated with the portlet request model 975 * and the DDM template. 976 * 977 * @param groupId the primary key of the web content article's group 978 * @param articleId the primary key of the web content article 979 * @param version the web content article's version 980 * @param viewMode the mode in which the web content is being viewed 981 * @param ddmTemplateKey the primary key of the web content article's DDM 982 template 983 * @param languageId the primary key of the language translation to get 984 * @param portletRequestModel the portlet request model 985 * @param themeDisplay the theme display 986 * @return the web content from the matching web content article 987 * @throws PortalException if a matching web content article or DDM template 988 could not be found, or if a portal exception occurred 989 */ 990 public static java.lang.String getArticleContent(long groupId, 991 java.lang.String articleId, double version, java.lang.String viewMode, 992 java.lang.String ddmTemplateKey, java.lang.String languageId, 993 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 994 com.liferay.portal.theme.ThemeDisplay themeDisplay) 995 throws com.liferay.portal.kernel.exception.PortalException { 996 return getService() 997 .getArticleContent(groupId, articleId, version, viewMode, 998 ddmTemplateKey, languageId, portletRequestModel, themeDisplay); 999 } 1000 1001 /** 1002 * Returns the web content from the web content article matching the group, 1003 * article ID, and version, and associated with the DDM template. 1004 * 1005 * @param groupId the primary key of the web content article's group 1006 * @param articleId the primary key of the web content article 1007 * @param version the web content article's version 1008 * @param viewMode the mode in which the web content is being viewed 1009 * @param ddmTemplateKey the primary key of the web content article's 1010 DDM template (optionally <code>null</code>). If the article 1011 is related to a DDM structure, the template's structure must 1012 match it. 1013 * @param languageId the primary key of the language translation to get 1014 * @param themeDisplay the theme display 1015 * @return the web content from the matching web content article 1016 * @throws PortalException if a matching web content article or DDM 1017 template could not be found, or if a portal exception 1018 occurred 1019 * @deprecated As of 7.0.0, replaced by {@link #getArticleContent(long, 1020 String, double, String, String, String, PortletRequestModel, 1021 ThemeDisplay)} 1022 */ 1023 @Deprecated 1024 public static java.lang.String getArticleContent(long groupId, 1025 java.lang.String articleId, double version, java.lang.String viewMode, 1026 java.lang.String ddmTemplateKey, java.lang.String languageId, 1027 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1028 throws com.liferay.portal.kernel.exception.PortalException { 1029 return getService() 1030 .getArticleContent(groupId, articleId, version, viewMode, 1031 ddmTemplateKey, languageId, themeDisplay); 1032 } 1033 1034 /** 1035 * Returns the web content from the web content article matching the group, 1036 * article ID, and version. 1037 * 1038 * @param groupId the primary key of the web content article's group 1039 * @param articleId the primary key of the web content article 1040 * @param version the web content article's version 1041 * @param viewMode the mode in which the web content is being viewed 1042 * @param languageId the primary key of the language translation to get 1043 * @param themeDisplay the theme display 1044 * @return the web content from the matching web content article 1045 * @throws PortalException if a matching web content article or DDM 1046 template could not be found, or if a portal exception 1047 occurred 1048 * @deprecated As of 7.0.0, replaced by {@link #getArticleContent(long, 1049 String, double, String, String, String, PortletRequestModel, 1050 ThemeDisplay)} 1051 */ 1052 @Deprecated 1053 public static java.lang.String getArticleContent(long groupId, 1054 java.lang.String articleId, double version, java.lang.String viewMode, 1055 java.lang.String languageId, 1056 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1057 throws com.liferay.portal.kernel.exception.PortalException { 1058 return getService() 1059 .getArticleContent(groupId, articleId, version, viewMode, 1060 languageId, themeDisplay); 1061 } 1062 1063 /** 1064 * Returns the latest web content from the web content article matching the 1065 * group and article ID, and associated with the portlet request model and 1066 * the DDM template. 1067 * 1068 * @param groupId the primary key of the web content article's group 1069 * @param articleId the primary key of the web content article 1070 * @param viewMode the mode in which the web content is being viewed 1071 * @param ddmTemplateKey the primary key of the web content article's DDM 1072 template 1073 * @param languageId the primary key of the language translation to get 1074 * @param portletRequestModel the portlet request model 1075 * @param themeDisplay the theme display 1076 * @return the latest web content from the matching web content article 1077 * @throws PortalException if a matching web content article or DDM template 1078 could not be found, or if a portal exception occurred 1079 */ 1080 public static java.lang.String getArticleContent(long groupId, 1081 java.lang.String articleId, java.lang.String viewMode, 1082 java.lang.String ddmTemplateKey, java.lang.String languageId, 1083 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 1084 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1085 throws com.liferay.portal.kernel.exception.PortalException { 1086 return getService() 1087 .getArticleContent(groupId, articleId, viewMode, 1088 ddmTemplateKey, languageId, portletRequestModel, themeDisplay); 1089 } 1090 1091 /** 1092 * Returns the latest web content from the web content article matching the 1093 * group and article ID, and associated with the DDM template. 1094 * 1095 * @param groupId the primary key of the web content article's group 1096 * @param articleId the primary key of the web content article 1097 * @param viewMode the mode in which the web content is being viewed 1098 * @param ddmTemplateKey the primary key of the web content article's 1099 DDM template 1100 * @param languageId the primary key of the language translation to get 1101 * @param themeDisplay the theme display 1102 * @return the latest web content from the matching web content article 1103 * @throws PortalException if a matching web content article or DDM 1104 template could not be found, or if a portal exception 1105 occurred 1106 * @deprecated As of 7.0.0, replaced by {@link #getArticleContent(long, 1107 String, String, String, String, PortletRequestModel, 1108 ThemeDisplay)} 1109 */ 1110 @Deprecated 1111 public static java.lang.String getArticleContent(long groupId, 1112 java.lang.String articleId, java.lang.String viewMode, 1113 java.lang.String ddmTemplateKey, java.lang.String languageId, 1114 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1115 throws com.liferay.portal.kernel.exception.PortalException { 1116 return getService() 1117 .getArticleContent(groupId, articleId, viewMode, 1118 ddmTemplateKey, languageId, themeDisplay); 1119 } 1120 1121 /** 1122 * Returns the latest web content from the web content article matching the 1123 * group and article ID. 1124 * 1125 * @param groupId the primary key of the web content article's group 1126 * @param articleId the primary key of the web content article 1127 * @param viewMode the mode in which the web content is being viewed 1128 * @param languageId the primary key of the language translation to get 1129 * @param themeDisplay the theme display 1130 * @return the latest web content from the matching web content article 1131 * @throws PortalException if a matching web content article or DDM 1132 template could not be found, or if a portal exception 1133 occurred 1134 * @deprecated As of 7.0.0, replaced by {@link #getArticleContent(long, 1135 String, String, String, String, PortletRequestModel, 1136 ThemeDisplay)} 1137 */ 1138 @Deprecated 1139 public static java.lang.String getArticleContent(long groupId, 1140 java.lang.String articleId, java.lang.String viewMode, 1141 java.lang.String languageId, 1142 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1143 throws com.liferay.portal.kernel.exception.PortalException { 1144 return getService() 1145 .getArticleContent(groupId, articleId, viewMode, languageId, 1146 themeDisplay); 1147 } 1148 1149 /** 1150 * Returns a web content article display for the specified page of the 1151 * latest version of the web content article, based on the DDM template. Web 1152 * content transformation tokens are added using the portlet request model 1153 * and theme display. 1154 * 1155 * @param article the primary key of the web content article 1156 * @param ddmTemplateKey the primary key of the web content article's DDM 1157 template 1158 * @param viewMode the mode in which the web content is being viewed 1159 * @param languageId the primary key of the language translation to get 1160 * @param page the web content article page to display 1161 * @param portletRequestModel the portlet request model 1162 * @param themeDisplay the theme display 1163 * @return the web content article display, or <code>null</code> if the 1164 article has expired or if article's display date/time is after 1165 the current date/time 1166 * @throws PortalException if a portal exception occurred 1167 */ 1168 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1169 com.liferay.portlet.journal.model.JournalArticle article, 1170 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1171 java.lang.String languageId, int page, 1172 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 1173 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1174 throws com.liferay.portal.kernel.exception.PortalException { 1175 return getService() 1176 .getArticleDisplay(article, ddmTemplateKey, viewMode, 1177 languageId, page, portletRequestModel, themeDisplay); 1178 } 1179 1180 /** 1181 * Returns a web content article display for the specified page of the 1182 * latest version of the web content article matching the group, article ID, 1183 * and DDM template. Web content transformation tokens are added using the 1184 * portlet request model and theme display. 1185 * 1186 * @param groupId the primary key of the web content article's group 1187 * @param articleId the primary key of the web content article 1188 * @param ddmTemplateKey the primary key of the web content article's DDM 1189 template 1190 * @param viewMode the mode in which the web content is being viewed 1191 * @param languageId the primary key of the language translation to get 1192 * @param page the web content article page to display 1193 * @param portletRequestModel the portlet request model 1194 * @param themeDisplay the theme display 1195 * @return the web content article display, or <code>null</code> if the 1196 article has expired or if article's display date/time is after 1197 the current date/time 1198 * @throws PortalException if a portal exception occurred 1199 */ 1200 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1201 long groupId, java.lang.String articleId, 1202 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1203 java.lang.String languageId, int page, 1204 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 1205 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1206 throws com.liferay.portal.kernel.exception.PortalException { 1207 return getService() 1208 .getArticleDisplay(groupId, articleId, ddmTemplateKey, 1209 viewMode, languageId, page, portletRequestModel, themeDisplay); 1210 } 1211 1212 /** 1213 * Returns a web content article display for the first page of the latest 1214 * version of the web content article matching the group, article ID, and 1215 * DDM template. Web content transformation tokens are added from the theme 1216 * display (if not <code>null</code>). 1217 * 1218 * @param groupId the primary key of the web content article's group 1219 * @param articleId the primary key of the web content article 1220 * @param ddmTemplateKey the primary key of the web content article's DDM 1221 template 1222 * @param viewMode the mode in which the web content is being viewed 1223 * @param languageId the primary key of the language translation to get 1224 * @param themeDisplay the theme display 1225 * @return the web content article display, or <code>null</code> if the 1226 article has expired or if article's display date/time is after 1227 the current date/time 1228 * @throws PortalException if a matching web content article or DDM template 1229 could not be found, or if a portal exception occurred 1230 */ 1231 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1232 long groupId, java.lang.String articleId, 1233 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1234 java.lang.String languageId, 1235 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1236 throws com.liferay.portal.kernel.exception.PortalException { 1237 return getService() 1238 .getArticleDisplay(groupId, articleId, ddmTemplateKey, 1239 viewMode, languageId, themeDisplay); 1240 } 1241 1242 /** 1243 * Returns a web content article display for the specified page of the 1244 * specified version of the web content article matching the group, article 1245 * ID, and DDM template. Web content transformation tokens are added using 1246 * the portlet request model and theme display. 1247 * 1248 * @param groupId the primary key of the web content article's group 1249 * @param articleId the primary key of the web content article 1250 * @param version the web content article's version 1251 * @param ddmTemplateKey the primary key of the web content article's DDM 1252 template 1253 * @param viewMode the mode in which the web content is being viewed 1254 * @param languageId the primary key of the language translation to get 1255 * @param page the web content article page to display 1256 * @param portletRequestModel the portlet request model 1257 * @param themeDisplay the theme display 1258 * @return the web content article display, or <code>null</code> if the 1259 article has expired or if article's display date/time is after 1260 the current date/time 1261 * @throws PortalException if a portal exception occurred 1262 */ 1263 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1264 long groupId, java.lang.String articleId, double version, 1265 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1266 java.lang.String languageId, int page, 1267 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 1268 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1269 throws com.liferay.portal.kernel.exception.PortalException { 1270 return getService() 1271 .getArticleDisplay(groupId, articleId, version, 1272 ddmTemplateKey, viewMode, languageId, page, portletRequestModel, 1273 themeDisplay); 1274 } 1275 1276 /** 1277 * Returns a web content article display for the first page of the specified 1278 * version of the web content article matching the group, article ID, and 1279 * DDM template. Web content transformation tokens are added from the theme 1280 * display (if not <code>null</code>). 1281 * 1282 * @param groupId the primary key of the web content article's group 1283 * @param articleId the primary key of the web content article 1284 * @param version the web content article's version 1285 * @param ddmTemplateKey the primary key of the web content article's DDM 1286 template 1287 * @param viewMode the mode in which the web content is being viewed 1288 * @param languageId the primary key of the language translation to get 1289 * @param themeDisplay the theme display 1290 * @return the web content article display, or <code>null</code> if the 1291 article has expired or if article's display date/time is after 1292 the current date/time 1293 * @throws PortalException if a matching web content article or DDM template 1294 could not be found, or if a portal exception occurred 1295 */ 1296 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1297 long groupId, java.lang.String articleId, double version, 1298 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1299 java.lang.String languageId, 1300 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1301 throws com.liferay.portal.kernel.exception.PortalException { 1302 return getService() 1303 .getArticleDisplay(groupId, articleId, version, 1304 ddmTemplateKey, viewMode, languageId, themeDisplay); 1305 } 1306 1307 /** 1308 * Returns a web content article display for the specified page of the 1309 * latest version of the web content article matching the group and article 1310 * ID. Web content transformation tokens are added from the theme display 1311 * (if not <code>null</code>). 1312 * 1313 * @param groupId the primary key of the web content article's group 1314 * @param articleId the primary key of the web content article 1315 * @param viewMode the mode in which the web content is being viewed 1316 * @param languageId the primary key of the language translation to get 1317 * @param page the web content article page to display 1318 * @param portletRequestModel the portlet request model 1319 * @param themeDisplay the theme display 1320 * @return the web content article display, or <code>null</code> if the 1321 article has expired or if article's display date/time is after 1322 the current date/time 1323 * @throws PortalException if a portal exception occurred 1324 */ 1325 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1326 long groupId, java.lang.String articleId, java.lang.String viewMode, 1327 java.lang.String languageId, int page, 1328 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 1329 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1330 throws com.liferay.portal.kernel.exception.PortalException { 1331 return getService() 1332 .getArticleDisplay(groupId, articleId, viewMode, languageId, 1333 page, portletRequestModel, themeDisplay); 1334 } 1335 1336 /** 1337 * Returns a web content article display for the first page of the latest 1338 * version of the web content article matching the group and article ID. Web 1339 * content transformation tokens are added from the theme display (if not 1340 * <code>null</code>). 1341 * 1342 * @param groupId the primary key of the web content article's group 1343 * @param articleId the primary key of the web content article 1344 * @param viewMode the mode in which the web content is being viewed 1345 * @param languageId the primary key of the language translation to get 1346 * @param themeDisplay the theme display 1347 * @return the web content article display, or <code>null</code> if the 1348 article has expired or if article's display date/time is after 1349 the current date/time 1350 * @throws PortalException if a matching web content article or DDM template 1351 could not be found, or if a portal exception occurred 1352 */ 1353 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1354 long groupId, java.lang.String articleId, java.lang.String viewMode, 1355 java.lang.String languageId, 1356 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1357 throws com.liferay.portal.kernel.exception.PortalException { 1358 return getService() 1359 .getArticleDisplay(groupId, articleId, viewMode, languageId, 1360 themeDisplay); 1361 } 1362 1363 /** 1364 * Returns all the web content articles present in the system. 1365 * 1366 * @return the web content articles present in the system 1367 */ 1368 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles() { 1369 return getService().getArticles(); 1370 } 1371 1372 /** 1373 * Returns all the web content articles belonging to the group. 1374 * 1375 * @param groupId the primary key of the web content article's group 1376 * @return the web content articles belonging to the group 1377 */ 1378 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1379 long groupId) { 1380 return getService().getArticles(groupId); 1381 } 1382 1383 /** 1384 * Returns all the web content articles matching the group and article ID. 1385 * 1386 * @param groupId the primary key of the web content article's group 1387 * @param articleId the primary key of the web content article 1388 * @return the matching web content articles 1389 */ 1390 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1391 long groupId, java.lang.String articleId) { 1392 return getService().getArticles(groupId, articleId); 1393 } 1394 1395 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1396 long groupId, java.lang.String articleId, int start, int end, 1397 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> orderByComparator) { 1398 return getService() 1399 .getArticles(groupId, articleId, start, end, 1400 orderByComparator); 1401 } 1402 1403 /** 1404 * Returns all the web content articles matching the group and folder. 1405 * 1406 * @param groupId the primary key of the web content article's group 1407 * @param folderId the primary key of the web content article folder 1408 * @return the matching web content articles 1409 */ 1410 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1411 long groupId, long folderId) { 1412 return getService().getArticles(groupId, folderId); 1413 } 1414 1415 /** 1416 * Returns a range of all the web content articles matching the group and 1417 * folder. 1418 * 1419 * <p> 1420 * Useful when paginating results. Returns a maximum of <code>end - 1421 * start</code> instances. <code>start</code> and <code>end</code> are not 1422 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1423 * refers to the first result in the set. Setting both <code>start</code> 1424 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1425 * result set. 1426 * </p> 1427 * 1428 * @param groupId the primary key of the web content article's group 1429 * @param folderId the primary key of the web content article's folder 1430 * @param start the lower bound of the range of web content articles to 1431 return 1432 * @param end the upper bound of the range of web content articles to 1433 return (not inclusive) 1434 * @return the range of matching web content articles 1435 */ 1436 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1437 long groupId, long folderId, int start, int end) { 1438 return getService().getArticles(groupId, folderId, start, end); 1439 } 1440 1441 /** 1442 * Returns an ordered range of all the web content articles matching the 1443 * group and folder. 1444 * 1445 * <p> 1446 * Useful when paginating results. Returns a maximum of <code>end - 1447 * start</code> instances. <code>start</code> and <code>end</code> are not 1448 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1449 * refers to the first result in the set. Setting both <code>start</code> 1450 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1451 * result set. 1452 * </p> 1453 * 1454 * @param groupId the primary key of the web content article's group 1455 * @param folderId the primary key of the web content article's folder 1456 * @param start the lower bound of the range of web content articles to 1457 return 1458 * @param end the upper bound of the range of web content articles to 1459 return (not inclusive) 1460 * @param orderByComparator the comparator to order the web content 1461 articles 1462 * @return the range of matching web content articles ordered by the 1463 comparator 1464 */ 1465 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1466 long groupId, long folderId, int start, int end, 1467 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> orderByComparator) { 1468 return getService() 1469 .getArticles(groupId, folderId, start, end, orderByComparator); 1470 } 1471 1472 /** 1473 * Returns a range of all the web content articles matching the group, 1474 * folder, and status. 1475 * 1476 * <p> 1477 * Useful when paginating results. Returns a maximum of <code>end - 1478 * start</code> instances. <code>start</code> and <code>end</code> are not 1479 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1480 * refers to the first result in the set. Setting both <code>start</code> 1481 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1482 * result set. 1483 * </p> 1484 * 1485 * @param groupId the primary key of the web content article's group 1486 * @param folderId the primary key of the web content article's folder 1487 * @param status the web content article's workflow status. For more 1488 information see {@link WorkflowConstants} for constants starting 1489 with the "STATUS_" prefix. 1490 * @param start the lower bound of the range of web content articles to 1491 return 1492 * @param end the upper bound of the range of web content articles to 1493 return (not inclusive) 1494 * @return the range of matching web content articles 1495 */ 1496 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1497 long groupId, long folderId, int status, int start, int end) { 1498 return getService().getArticles(groupId, folderId, status, start, end); 1499 } 1500 1501 /** 1502 * Returns a range of all the web content articles belonging to the group. 1503 * 1504 * <p> 1505 * Useful when paginating results. Returns a maximum of <code>end - 1506 * start</code> instances. <code>start</code> and <code>end</code> are not 1507 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1508 * refers to the first result in the set. Setting both <code>start</code> 1509 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1510 * result set. 1511 * </p> 1512 * 1513 * @param groupId the primary key of the web content article's group 1514 * @param start the lower bound of the range of web content articles to 1515 return 1516 * @param end the upper bound of the range of web content articles to 1517 return (not inclusive) 1518 * @return the range of matching web content articles 1519 */ 1520 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1521 long groupId, int start, int end) { 1522 return getService().getArticles(groupId, start, end); 1523 } 1524 1525 /** 1526 * Returns an ordered range of all the web content articles belonging to the 1527 * group. 1528 * 1529 * <p> 1530 * Useful when paginating results. Returns a maximum of <code>end - 1531 * start</code> instances. <code>start</code> and <code>end</code> are not 1532 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1533 * refers to the first result in the set. Setting both <code>start</code> 1534 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1535 * result set. 1536 * </p> 1537 * 1538 * @param groupId the primary key of the web content article's group 1539 * @param start the lower bound of the range of web content articles to 1540 return 1541 * @param end the upper bound of the range of web content articles to 1542 return (not inclusive) 1543 * @param obc the comparator to order the web content articles 1544 * @return the range of matching web content articles ordered by the 1545 comparator 1546 */ 1547 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1548 long groupId, int start, int end, 1549 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 1550 return getService().getArticles(groupId, start, end, obc); 1551 } 1552 1553 /** 1554 * Returns all the web content articles matching the resource primary key. 1555 * 1556 * @param resourcePrimKey the primary key of the resource instance 1557 * @return the web content articles matching the resource primary key 1558 */ 1559 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByResourcePrimKey( 1560 long resourcePrimKey) { 1561 return getService().getArticlesByResourcePrimKey(resourcePrimKey); 1562 } 1563 1564 /** 1565 * Returns all the web content articles matching the small image ID. 1566 * 1567 * @param smallImageId the primary key of the web content article's small 1568 image 1569 * @return the web content articles matching the small image ID 1570 */ 1571 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesBySmallImageId( 1572 long smallImageId) { 1573 return getService().getArticlesBySmallImageId(smallImageId); 1574 } 1575 1576 /** 1577 * Returns the number of web content articles belonging to the group. 1578 * 1579 * @param groupId the primary key of the web content article's group 1580 * @return the number of web content articles belonging to the group 1581 */ 1582 public static int getArticlesCount(long groupId) { 1583 return getService().getArticlesCount(groupId); 1584 } 1585 1586 public static int getArticlesCount(long groupId, java.lang.String articleId) { 1587 return getService().getArticlesCount(groupId, articleId); 1588 } 1589 1590 /** 1591 * Returns the number of web content articles matching the group and folder. 1592 * 1593 * @param groupId the primary key of the web content article's group 1594 * @param folderId the primary key of the web content article's folder 1595 * @return the number of matching web content articles 1596 */ 1597 public static int getArticlesCount(long groupId, long folderId) { 1598 return getService().getArticlesCount(groupId, folderId); 1599 } 1600 1601 /** 1602 * Returns the number of web content articles matching the group, folder, 1603 * and status. 1604 * 1605 * @param groupId the primary key of the web content article's group 1606 * @param folderId the primary key of the web content article's folder 1607 * @param status the web content article's workflow status. For more 1608 information see {@link WorkflowConstants} for constants starting 1609 with the "STATUS_" prefix. 1610 * @return the number of matching web content articles 1611 */ 1612 public static int getArticlesCount(long groupId, long folderId, int status) { 1613 return getService().getArticlesCount(groupId, folderId, status); 1614 } 1615 1616 /** 1617 * Returns the Spring bean ID for this bean. 1618 * 1619 * @return the Spring bean ID for this bean 1620 */ 1621 public static java.lang.String getBeanIdentifier() { 1622 return getService().getBeanIdentifier(); 1623 } 1624 1625 /** 1626 * Returns an ordered range of all the web content articles matching the 1627 * company and workflow status. 1628 * 1629 * <p> 1630 * Useful when paginating results. Returns a maximum of <code>end - 1631 * start</code> instances. <code>start</code> and <code>end</code> are not 1632 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1633 * refers to the first result in the set. Setting both <code>start</code> 1634 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1635 * result set. 1636 * </p> 1637 * 1638 * @param companyId the primary key of the web content article's company 1639 * @param status the web content article's workflow status. For more 1640 information see {@link WorkflowConstants} for constants starting 1641 with the "STATUS_" prefix. 1642 * @param start the lower bound of the range of web content articles to 1643 return 1644 * @param end the upper bound of the range of web content articles to 1645 return (not inclusive) 1646 * @return the range of matching web content articles ordered by article ID 1647 */ 1648 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles( 1649 long companyId, int status, int start, int end) { 1650 return getService().getCompanyArticles(companyId, status, start, end); 1651 } 1652 1653 /** 1654 * Returns an ordered range of all the web content articles matching the 1655 * company, version, and workflow status. 1656 * 1657 * <p> 1658 * Useful when paginating results. Returns a maximum of <code>end - 1659 * start</code> instances. <code>start</code> and <code>end</code> are not 1660 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1661 * refers to the first result in the set. Setting both <code>start</code> 1662 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1663 * result set. 1664 * </p> 1665 * 1666 * @param companyId the primary key of the web content article's company 1667 * @param version the web content article's version 1668 * @param status the web content article's workflow status. For more 1669 information see {@link WorkflowConstants} for constants starting 1670 with the "STATUS_" prefix. 1671 * @param start the lower bound of the range of web content articles to 1672 return 1673 * @param end the upper bound of the range of web content articles to 1674 return (not inclusive) 1675 * @return the range of matching web content articles ordered by article ID 1676 */ 1677 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles( 1678 long companyId, double version, int status, int start, int end) { 1679 return getService() 1680 .getCompanyArticles(companyId, version, status, start, end); 1681 } 1682 1683 /** 1684 * Returns the number of web content articles matching the company and 1685 * workflow status. 1686 * 1687 * @param companyId the primary key of the web content article's company 1688 * @param status the web content article's workflow status. For more 1689 information see {@link WorkflowConstants} for constants starting 1690 with the "STATUS_" prefix. 1691 * @return the number of matching web content articles 1692 */ 1693 public static int getCompanyArticlesCount(long companyId, int status) { 1694 return getService().getCompanyArticlesCount(companyId, status); 1695 } 1696 1697 /** 1698 * Returns the number of web content articles matching the company, version, 1699 * and workflow status. 1700 * 1701 * <p> 1702 * Useful when paginating results. Returns a maximum of <code>end - 1703 * start</code> instances. <code>start</code> and <code>end</code> are not 1704 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1705 * refers to the first result in the set. Setting both <code>start</code> 1706 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1707 * result set. 1708 * </p> 1709 * 1710 * @param companyId the primary key of the web content article's company 1711 * @param version the web content article's version 1712 * @param status the web content article's workflow status. For more 1713 information see {@link WorkflowConstants} for constants starting 1714 with the "STATUS_" prefix. 1715 * @param start the lower bound of the range of web content articles to 1716 return 1717 * @param end the upper bound of the range of web content articles to 1718 return (not inclusive) 1719 * @return the number of matching web content articles 1720 */ 1721 public static int getCompanyArticlesCount(long companyId, double version, 1722 int status, int start, int end) { 1723 return getService() 1724 .getCompanyArticlesCount(companyId, version, status, start, 1725 end); 1726 } 1727 1728 /** 1729 * Returns the matching web content article currently displayed or next to 1730 * be displayed if no article is currently displayed. 1731 * 1732 * @param groupId the primary key of the web content article's group 1733 * @param articleId the primary key of the web content article 1734 * @return the matching web content article currently displayed, or the next 1735 one to be displayed if no version of the article is currently 1736 displayed 1737 * @throws PortalException if no approved matching web content articles 1738 could be found 1739 */ 1740 public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticle( 1741 long groupId, java.lang.String articleId) 1742 throws com.liferay.portal.kernel.exception.PortalException { 1743 return getService().getDisplayArticle(groupId, articleId); 1744 } 1745 1746 /** 1747 * Returns the web content article matching the URL title that is currently 1748 * displayed or next to be displayed if no article is currently displayed. 1749 * 1750 * @param groupId the primary key of the web content article's group 1751 * @param urlTitle the web content article's accessible URL title 1752 * @return the web content article matching the URL title that is currently 1753 displayed, or next one to be displayed if no version of the 1754 article is currently displayed 1755 * @throws PortalException if no approved matching web content articles 1756 could be found 1757 */ 1758 public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle( 1759 long groupId, java.lang.String urlTitle) 1760 throws com.liferay.portal.kernel.exception.PortalException { 1761 return getService().getDisplayArticleByUrlTitle(groupId, urlTitle); 1762 } 1763 1764 public static com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 1765 com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext) { 1766 return getService().getExportActionableDynamicQuery(portletDataContext); 1767 } 1768 1769 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getIndexableArticlesByDDMStructureKey( 1770 java.lang.String[] ddmStructureKeys) { 1771 return getService() 1772 .getIndexableArticlesByDDMStructureKey(ddmStructureKeys); 1773 } 1774 1775 /** 1776 * Returns the indexable web content articles matching the resource primary 1777 * key. 1778 * 1779 * @param resourcePrimKey the primary key of the resource instance 1780 * @return the indexable web content articles matching the resource primary 1781 key 1782 */ 1783 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getIndexableArticlesByResourcePrimKey( 1784 long resourcePrimKey) { 1785 return getService() 1786 .getIndexableArticlesByResourcePrimKey(resourcePrimKey); 1787 } 1788 1789 /** 1790 * Returns the journal article with the primary key. 1791 * 1792 * @param id the primary key of the journal article 1793 * @return the journal article 1794 * @throws PortalException if a journal article with the primary key could not be found 1795 */ 1796 public static com.liferay.portlet.journal.model.JournalArticle getJournalArticle( 1797 long id) throws com.liferay.portal.kernel.exception.PortalException { 1798 return getService().getJournalArticle(id); 1799 } 1800 1801 /** 1802 * Returns the journal article matching the UUID and group. 1803 * 1804 * @param uuid the journal article's UUID 1805 * @param groupId the primary key of the group 1806 * @return the matching journal article 1807 * @throws PortalException if a matching journal article could not be found 1808 */ 1809 public static com.liferay.portlet.journal.model.JournalArticle getJournalArticleByUuidAndGroupId( 1810 java.lang.String uuid, long groupId) 1811 throws com.liferay.portal.kernel.exception.PortalException { 1812 return getService().getJournalArticleByUuidAndGroupId(uuid, groupId); 1813 } 1814 1815 /** 1816 * Returns a range of all the journal articles. 1817 * 1818 * <p> 1819 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.journal.model.impl.JournalArticleModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 1820 * </p> 1821 * 1822 * @param start the lower bound of the range of journal articles 1823 * @param end the upper bound of the range of journal articles (not inclusive) 1824 * @return the range of journal articles 1825 */ 1826 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getJournalArticles( 1827 int start, int end) { 1828 return getService().getJournalArticles(start, end); 1829 } 1830 1831 /** 1832 * Returns all the journal articles matching the UUID and company. 1833 * 1834 * @param uuid the UUID of the journal articles 1835 * @param companyId the primary key of the company 1836 * @return the matching journal articles, or an empty list if no matches were found 1837 */ 1838 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getJournalArticlesByUuidAndCompanyId( 1839 java.lang.String uuid, long companyId) { 1840 return getService().getJournalArticlesByUuidAndCompanyId(uuid, companyId); 1841 } 1842 1843 /** 1844 * Returns a range of journal articles matching the UUID and company. 1845 * 1846 * @param uuid the UUID of the journal articles 1847 * @param companyId the primary key of the company 1848 * @param start the lower bound of the range of journal articles 1849 * @param end the upper bound of the range of journal articles (not inclusive) 1850 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 1851 * @return the range of matching journal articles, or an empty list if no matches were found 1852 */ 1853 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getJournalArticlesByUuidAndCompanyId( 1854 java.lang.String uuid, long companyId, int start, int end, 1855 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> orderByComparator) { 1856 return getService() 1857 .getJournalArticlesByUuidAndCompanyId(uuid, companyId, 1858 start, end, orderByComparator); 1859 } 1860 1861 /** 1862 * Returns the number of journal articles. 1863 * 1864 * @return the number of journal articles 1865 */ 1866 public static int getJournalArticlesCount() { 1867 return getService().getJournalArticlesCount(); 1868 } 1869 1870 /** 1871 * Returns the latest web content article with the group and article ID. 1872 * 1873 * @param groupId the primary key of the web content article's group 1874 * @param articleId the primary key of the web content article 1875 * @return the latest matching web content article 1876 * @throws PortalException if a matching web content article could not be 1877 found 1878 */ 1879 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1880 long groupId, java.lang.String articleId) 1881 throws com.liferay.portal.kernel.exception.PortalException { 1882 return getService().getLatestArticle(groupId, articleId); 1883 } 1884 1885 /** 1886 * Returns the latest web content article matching the group, article ID, 1887 * and workflow status. 1888 * 1889 * @param groupId the primary key of the web content article's group 1890 * @param articleId the primary key of the web content article 1891 * @param status the web content article's workflow status. For more 1892 information see {@link WorkflowConstants} for constants starting 1893 with the "STATUS_" prefix. 1894 * @return the latest matching web content article 1895 * @throws PortalException if a matching web content article could not be 1896 found 1897 */ 1898 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1899 long groupId, java.lang.String articleId, int status) 1900 throws com.liferay.portal.kernel.exception.PortalException { 1901 return getService().getLatestArticle(groupId, articleId, status); 1902 } 1903 1904 /** 1905 * Returns the latest web content article matching the group, class name ID, 1906 * and class PK. 1907 * 1908 * @param groupId the primary key of the web content article's group 1909 * @param className the DDMStructure class name if the web content article 1910 is related to a DDM structure, the class name associated with the 1911 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1912 otherwise 1913 * @param classPK the primary key of the DDM structure, if the DDMStructure 1914 class name is given as the <code>className</code> parameter, the 1915 primary key of the class associated with the web content article, 1916 or <code>0</code> otherwise 1917 * @return the latest matching web content article 1918 * @throws PortalException if a matching web content article could not be 1919 found 1920 */ 1921 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1922 long groupId, java.lang.String className, long classPK) 1923 throws com.liferay.portal.kernel.exception.PortalException { 1924 return getService().getLatestArticle(groupId, className, classPK); 1925 } 1926 1927 /** 1928 * Returns the latest web content article matching the resource primary key, 1929 * preferring articles with approved workflow status. 1930 * 1931 * @param resourcePrimKey the primary key of the resource instance 1932 * @return the latest web content article matching the resource primary key, 1933 preferring articles with approved workflow status 1934 * @throws PortalException if a matching web content article could not be 1935 found 1936 */ 1937 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1938 long resourcePrimKey) 1939 throws com.liferay.portal.kernel.exception.PortalException { 1940 return getService().getLatestArticle(resourcePrimKey); 1941 } 1942 1943 /** 1944 * Returns the latest web content article matching the resource primary key 1945 * and workflow status, preferring articles with approved workflow status. 1946 * 1947 * @param resourcePrimKey the primary key of the resource instance 1948 * @param status the web content article's workflow status. For more 1949 information see {@link WorkflowConstants} for constants starting 1950 with the "STATUS_" prefix. 1951 * @return the latest web content article matching the resource primary key 1952 and workflow status, preferring articles with approved workflow 1953 status 1954 * @throws PortalException if a matching web content article could not be 1955 found 1956 */ 1957 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1958 long resourcePrimKey, int status) 1959 throws com.liferay.portal.kernel.exception.PortalException { 1960 return getService().getLatestArticle(resourcePrimKey, status); 1961 } 1962 1963 /** 1964 * Returns the latest web content article matching the resource primary key 1965 * and workflow status, optionally preferring articles with approved 1966 * workflow status. 1967 * 1968 * @param resourcePrimKey the primary key of the resource instance 1969 * @param status the web content article's workflow status. For more 1970 information see {@link WorkflowConstants} for constants starting 1971 with the "STATUS_" prefix. 1972 * @param preferApproved whether to prefer returning the latest matching 1973 article that has workflow status {@link 1974 WorkflowConstants#STATUS_APPROVED} over returning one that has a 1975 different status 1976 * @return the latest web content article matching the resource primary key 1977 and workflow status, optionally preferring articles with approved 1978 workflow status 1979 * @throws PortalException if a matching web content article could not be 1980 found 1981 */ 1982 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1983 long resourcePrimKey, int status, boolean preferApproved) 1984 throws com.liferay.portal.kernel.exception.PortalException { 1985 return getService() 1986 .getLatestArticle(resourcePrimKey, status, preferApproved); 1987 } 1988 1989 /** 1990 * Returns the latest web content article matching the group, URL title, and 1991 * workflow status. 1992 * 1993 * @param groupId the primary key of the web content article's group 1994 * @param urlTitle the web content article's accessible URL title 1995 * @param status the web content article's workflow status. For more 1996 information see {@link WorkflowConstants} for constants starting 1997 with the "STATUS_" prefix. 1998 * @return the latest matching web content article 1999 * @throws PortalException if a matching web content article could not be 2000 found 2001 */ 2002 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticleByUrlTitle( 2003 long groupId, java.lang.String urlTitle, int status) 2004 throws com.liferay.portal.kernel.exception.PortalException { 2005 return getService().getLatestArticleByUrlTitle(groupId, urlTitle, status); 2006 } 2007 2008 /** 2009 * Returns the latest version number of the web content with the group and 2010 * article ID. 2011 * 2012 * @param groupId the primary key of the web content article's group 2013 * @param articleId the primary key of the web content article 2014 * @return the latest version number of the matching web content 2015 * @throws PortalException if a matching web content article could not be 2016 found 2017 */ 2018 public static double getLatestVersion(long groupId, 2019 java.lang.String articleId) 2020 throws com.liferay.portal.kernel.exception.PortalException { 2021 return getService().getLatestVersion(groupId, articleId); 2022 } 2023 2024 /** 2025 * Returns the latest version number of the web content with the group, 2026 * article ID, and workflow status. 2027 * 2028 * @param groupId the primary key of the web content article's group 2029 * @param articleId the primary key of the web content article 2030 * @param status the web content article's workflow status. For more 2031 information see {@link WorkflowConstants} for constants starting 2032 with the "STATUS_" prefix. 2033 * @return the latest version number of the matching web content 2034 * @throws PortalException if a matching web content article could not be 2035 found 2036 */ 2037 public static double getLatestVersion(long groupId, 2038 java.lang.String articleId, int status) 2039 throws com.liferay.portal.kernel.exception.PortalException { 2040 return getService().getLatestVersion(groupId, articleId, status); 2041 } 2042 2043 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getNoAssetArticles() { 2044 return getService().getNoAssetArticles(); 2045 } 2046 2047 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getNoPermissionArticles() { 2048 return getService().getNoPermissionArticles(); 2049 } 2050 2051 /** 2052 * Returns the number of web content articles that are not recycled. 2053 * 2054 * @param groupId the primary key of the web content article's group 2055 * @param folderId the primary key of the web content article folder 2056 * @return the number of web content articles that are not recycled 2057 */ 2058 public static int getNotInTrashArticlesCount(long groupId, long folderId) { 2059 return getService().getNotInTrashArticlesCount(groupId, folderId); 2060 } 2061 2062 /** 2063 * Returns the oldest web content article with the group and article ID. 2064 * 2065 * @param groupId the primary key of the web content article's group 2066 * @param articleId the primary key of the web content article 2067 * @return the oldest matching web content article 2068 * @throws PortalException if a matching web content article could not be 2069 found 2070 */ 2071 public static com.liferay.portlet.journal.model.JournalArticle getOldestArticle( 2072 long groupId, java.lang.String articleId) 2073 throws com.liferay.portal.kernel.exception.PortalException { 2074 return getService().getOldestArticle(groupId, articleId); 2075 } 2076 2077 /** 2078 * Returns the oldest web content article matching the group, article ID, 2079 * and workflow status. 2080 * 2081 * @param groupId the primary key of the web content article's group 2082 * @param articleId the primary key of the web content article 2083 * @param status the web content article's workflow status. For more 2084 information see {@link WorkflowConstants} for constants starting 2085 with the "STATUS_" prefix. 2086 * @return the oldest matching web content article 2087 * @throws PortalException if a matching web content article could not be 2088 found 2089 */ 2090 public static com.liferay.portlet.journal.model.JournalArticle getOldestArticle( 2091 long groupId, java.lang.String articleId, int status) 2092 throws com.liferay.portal.kernel.exception.PortalException { 2093 return getService().getOldestArticle(groupId, articleId, status); 2094 } 2095 2096 public static com.liferay.portal.model.PersistedModel getPersistedModel( 2097 java.io.Serializable primaryKeyObj) 2098 throws com.liferay.portal.kernel.exception.PortalException { 2099 return getService().getPersistedModel(primaryKeyObj); 2100 } 2101 2102 /** 2103 * Returns the previously approved version of the web content article. For 2104 * more information on the approved workflow status, see {@link 2105 * WorkflowConstants#STATUS_APPROVED}. 2106 * 2107 * @param article the web content article 2108 * @return the previously approved version of the web content article, or 2109 the current web content article if there are no previously 2110 approved web content articles 2111 */ 2112 public static com.liferay.portlet.journal.model.JournalArticle getPreviousApprovedArticle( 2113 com.liferay.portlet.journal.model.JournalArticle article) { 2114 return getService().getPreviousApprovedArticle(article); 2115 } 2116 2117 /** 2118 * Returns the web content articles matching the DDM structure keys. 2119 * 2120 * @param ddmStructureKeys the primary keys of the web content article's 2121 DDM structures 2122 * @return the web content articles matching the DDM structure keys 2123 */ 2124 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2125 java.lang.String[] ddmStructureKeys) { 2126 return getService().getStructureArticles(ddmStructureKeys); 2127 } 2128 2129 /** 2130 * Returns the web content articles matching the group and DDM structure 2131 * key. 2132 * 2133 * @param groupId the primary key of the web content article's group 2134 * @param ddmStructureKey the primary key of the web content article's DDM 2135 structure 2136 * @return the matching web content articles 2137 */ 2138 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2139 long groupId, java.lang.String ddmStructureKey) { 2140 return getService().getStructureArticles(groupId, ddmStructureKey); 2141 } 2142 2143 /** 2144 * Returns an ordered range of all the web content articles matching the 2145 * group and DDM structure key. 2146 * 2147 * <p> 2148 * Useful when paginating results. Returns a maximum of <code>end - 2149 * start</code> instances. <code>start</code> and <code>end</code> are not 2150 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2151 * refers to the first result in the set. Setting both <code>start</code> 2152 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2153 * result set. 2154 * </p> 2155 * 2156 * @param groupId the primary key of the web content article's group 2157 * @param ddmStructureKey the primary key of the web content article's DDM 2158 structure 2159 * @param start the lower bound of the range of web content articles to 2160 return 2161 * @param end the upper bound of the range of web content articles to 2162 return (not inclusive) 2163 * @param obc the comparator to order the web content articles 2164 * @return the range of matching web content articles ordered by the 2165 comparator 2166 */ 2167 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2168 long groupId, java.lang.String ddmStructureKey, int start, int end, 2169 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 2170 return getService() 2171 .getStructureArticles(groupId, ddmStructureKey, start, end, 2172 obc); 2173 } 2174 2175 /** 2176 * Returns the number of web content articles matching the group and DDM 2177 * structure key. 2178 * 2179 * @param groupId the primary key of the web content article's group 2180 * @param ddmStructureKey the primary key of the web content article's DDM 2181 structure 2182 * @return the number of matching web content articles 2183 */ 2184 public static int getStructureArticlesCount(long groupId, 2185 java.lang.String ddmStructureKey) { 2186 return getService().getStructureArticlesCount(groupId, ddmStructureKey); 2187 } 2188 2189 /** 2190 * Returns the web content articles matching the group and DDM template key. 2191 * 2192 * @param groupId the primary key of the web content article's group 2193 * @param ddmTemplateKey the primary key of the web content article's DDM 2194 template 2195 * @return the matching web content articles 2196 */ 2197 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles( 2198 long groupId, java.lang.String ddmTemplateKey) { 2199 return getService().getTemplateArticles(groupId, ddmTemplateKey); 2200 } 2201 2202 /** 2203 * Returns an ordered range of all the web content articles matching the 2204 * group and DDM template key. 2205 * 2206 * <p> 2207 * Useful when paginating results. Returns a maximum of <code>end - 2208 * start</code> instances. <code>start</code> and <code>end</code> are not 2209 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2210 * refers to the first result in the set. Setting both <code>start</code> 2211 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2212 * result set. 2213 * </p> 2214 * 2215 * @param groupId the primary key of the web content article's group 2216 * @param ddmTemplateKey the primary key of the web content article's DDM 2217 template 2218 * @param start the lower bound of the range of web content articles to 2219 return 2220 * @param end the upper bound of the range of web content articles to 2221 return (not inclusive) 2222 * @param obc the comparator to order the web content articles 2223 * @return the range of matching web content articles ordered by the 2224 comparator 2225 */ 2226 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles( 2227 long groupId, java.lang.String ddmTemplateKey, int start, int end, 2228 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 2229 return getService() 2230 .getTemplateArticles(groupId, ddmTemplateKey, start, end, obc); 2231 } 2232 2233 /** 2234 * Returns the number of web content articles matching the group and DDM 2235 * template key. 2236 * 2237 * @param groupId the primary key of the web content article's group 2238 * @param ddmTemplateKey the primary key of the web content article's DDM 2239 template 2240 * @return the number of matching web content articles 2241 */ 2242 public static int getTemplateArticlesCount(long groupId, 2243 java.lang.String ddmTemplateKey) { 2244 return getService().getTemplateArticlesCount(groupId, ddmTemplateKey); 2245 } 2246 2247 /** 2248 * Returns the web content article's unique URL title. 2249 * 2250 * @param groupId the primary key of the web content article's group 2251 * @param articleId the primary key of the web content article 2252 * @param urlTitle the web content article's accessible URL title 2253 * @return the web content article's unique URL title 2254 * @throws PortalException if a portal exception occurred 2255 */ 2256 public static java.lang.String getUniqueUrlTitle(long groupId, 2257 java.lang.String articleId, java.lang.String urlTitle) 2258 throws com.liferay.portal.kernel.exception.PortalException { 2259 return getService().getUniqueUrlTitle(groupId, articleId, urlTitle); 2260 } 2261 2262 /** 2263 * Returns <code>true</code> if the specified web content article exists. 2264 * 2265 * @param groupId the primary key of the group 2266 * @param articleId the primary key of the web content article 2267 * @return <code>true</code> if the specified web content article exists; 2268 <code>false</code> otherwise 2269 */ 2270 public static boolean hasArticle(long groupId, java.lang.String articleId) { 2271 return getService().hasArticle(groupId, articleId); 2272 } 2273 2274 /** 2275 * Returns <code>true</code> if the web content article, specified by group 2276 * and article ID, is the latest version. 2277 * 2278 * @param groupId the primary key of the web content article's group 2279 * @param articleId the primary key of the web content article 2280 * @param version the web content article's version 2281 * @return <code>true</code> if the specified web content article is the 2282 latest version; <code>false</code> otherwise 2283 * @throws PortalException if a matching web content article could not be 2284 found 2285 */ 2286 public static boolean isLatestVersion(long groupId, 2287 java.lang.String articleId, double version) 2288 throws com.liferay.portal.kernel.exception.PortalException { 2289 return getService().isLatestVersion(groupId, articleId, version); 2290 } 2291 2292 /** 2293 * Returns <code>true</code> if the web content article, specified by group, 2294 * article ID, and workflow status, is the latest version. 2295 * 2296 * @param groupId the primary key of the web content article's group 2297 * @param articleId the primary key of the web content article 2298 * @param version the web content article's version 2299 * @param status the web content article's workflow status. For more 2300 information see {@link WorkflowConstants} for constants starting 2301 with the "STATUS_" prefix. 2302 * @return <code>true</code> if the specified web content article is the 2303 latest version; <code>false</code> otherwise 2304 * @throws PortalException if a matching web content article could not be 2305 found 2306 */ 2307 public static boolean isLatestVersion(long groupId, 2308 java.lang.String articleId, double version, int status) 2309 throws com.liferay.portal.kernel.exception.PortalException { 2310 return getService().isLatestVersion(groupId, articleId, version, status); 2311 } 2312 2313 public static boolean isRenderable( 2314 com.liferay.portlet.journal.model.JournalArticle article, 2315 com.liferay.portal.kernel.portlet.PortletRequestModel portletRequestModel, 2316 com.liferay.portal.theme.ThemeDisplay themeDisplay) { 2317 return getService() 2318 .isRenderable(article, portletRequestModel, themeDisplay); 2319 } 2320 2321 /** 2322 * Moves the web content article matching the group and article ID to a new 2323 * folder. 2324 * 2325 * @param groupId the primary key of the web content article's group 2326 * @param articleId the primary key of the web content article 2327 * @param newFolderId the primary key of the web content article's new 2328 folder 2329 * @return the updated web content article, which was moved to a new 2330 folder 2331 * @throws PortalException if a matching web content article could not 2332 be found 2333 * @deprecated As of 7.0.0, replaced by {@link #moveArticle(long, String, 2334 long, ServiceContext)} 2335 */ 2336 @Deprecated 2337 public static com.liferay.portlet.journal.model.JournalArticle moveArticle( 2338 long groupId, java.lang.String articleId, long newFolderId) 2339 throws com.liferay.portal.kernel.exception.PortalException { 2340 return getService().moveArticle(groupId, articleId, newFolderId); 2341 } 2342 2343 /** 2344 * Moves the web content article matching the group and article ID to a new 2345 * folder. 2346 * 2347 * @param groupId the primary key of the web content article's group 2348 * @param articleId the primary key of the web content article 2349 * @param newFolderId the primary key of the web content article's new 2350 folder 2351 * @param serviceContext the service context to be applied. Can set the 2352 user ID, language ID, portlet preferences, portlet request, 2353 portlet response, theme display, and can set whether to add the 2354 default command update for the web content article. With respect 2355 to social activities, by setting the service context's command to 2356 {@link com.liferay.portal.kernel.util.Constants#UPDATE}, the 2357 invocation is considered a web content update activity; otherwise 2358 it is considered a web content add activity. 2359 * @return the updated web content article, which was moved to a new folder 2360 * @throws PortalException if a matching web content article could not be 2361 found 2362 */ 2363 public static com.liferay.portlet.journal.model.JournalArticle moveArticle( 2364 long groupId, java.lang.String articleId, long newFolderId, 2365 com.liferay.portal.service.ServiceContext serviceContext) 2366 throws com.liferay.portal.kernel.exception.PortalException { 2367 return getService() 2368 .moveArticle(groupId, articleId, newFolderId, serviceContext); 2369 } 2370 2371 /** 2372 * Moves the web content article from the Recycle Bin to a new folder. 2373 * 2374 * @param userId the primary key of the user updating the web content 2375 article 2376 * @param groupId the primary key of the web content article's group 2377 * @param article the web content article 2378 * @param newFolderId the primary key of the web content article's new 2379 folder 2380 * @param serviceContext the service context to be applied. Can set the 2381 modification date, portlet preferences, and can set whether to 2382 add the default command update for the web content article. With 2383 respect to social activities, by setting the service context's 2384 command to {@link 2385 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2386 is considered a web content update activity; otherwise it is 2387 considered a web content add activity. 2388 * @return the updated web content article, which was moved from the Recycle 2389 Bin to a new folder 2390 * @throws PortalException if a trashed web content article with the primary 2391 key could not be found or if a portal exception occurred 2392 */ 2393 public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash( 2394 long userId, long groupId, 2395 com.liferay.portlet.journal.model.JournalArticle article, 2396 long newFolderId, 2397 com.liferay.portal.service.ServiceContext serviceContext) 2398 throws com.liferay.portal.kernel.exception.PortalException { 2399 return getService() 2400 .moveArticleFromTrash(userId, groupId, article, newFolderId, 2401 serviceContext); 2402 } 2403 2404 /** 2405 * Moves the latest version of the web content article matching the group 2406 * and article ID to the recycle bin. 2407 * 2408 * @param userId the primary key of the user updating the web content 2409 article 2410 * @param article the web content article 2411 * @return the updated web content article, which was moved to the Recycle 2412 Bin 2413 * @throws PortalException if the user did not have permission to move the 2414 article to the Recycle Bin or if a portal exception occurred 2415 */ 2416 public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash( 2417 long userId, com.liferay.portlet.journal.model.JournalArticle article) 2418 throws com.liferay.portal.kernel.exception.PortalException { 2419 return getService().moveArticleToTrash(userId, article); 2420 } 2421 2422 /** 2423 * Moves the latest version of the web content article matching the group 2424 * and article ID to the recycle bin. 2425 * 2426 * @param userId the primary key of the user updating the web content 2427 article 2428 * @param groupId the primary key of the web content article's group 2429 * @param articleId the primary key of the web content article 2430 * @return the moved web content article or <code>null</code> if no matching 2431 article was found 2432 * @throws PortalException if the user did not have permission to move the 2433 article to the Recycle Bin or if a portal exception occurred 2434 */ 2435 public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash( 2436 long userId, long groupId, java.lang.String articleId) 2437 throws com.liferay.portal.kernel.exception.PortalException { 2438 return getService().moveArticleToTrash(userId, groupId, articleId); 2439 } 2440 2441 /** 2442 * Rebuilds the web content article's tree path using tree traversal. 2443 * 2444 * <p> 2445 * For example, here is a conceptualization of a web content article tree 2446 * path: 2447 * </p> 2448 * 2449 * <p> 2450 * <pre> 2451 * <code> 2452 * /(Folder's folderId)/(Subfolder's folderId)/(article's articleId) 2453 * </code> 2454 * </pre> 2455 * </p> 2456 * 2457 * @param companyId the primary key of the web content article's company 2458 * @throws PortalException if a portal exception occurred 2459 */ 2460 public static void rebuildTree(long companyId) 2461 throws com.liferay.portal.kernel.exception.PortalException { 2462 getService().rebuildTree(companyId); 2463 } 2464 2465 /** 2466 * Removes the web content of the web content article matching the group, 2467 * article ID, and version, and language. 2468 * 2469 * @param groupId the primary key of the web content article's group 2470 * @param articleId the primary key of the web content article 2471 * @param version the web content article's version 2472 * @param languageId the primary key of the language locale to remove 2473 * @return the updated web content article with the locale removed 2474 * @throws PortalException if a matching web content article could not be 2475 found 2476 */ 2477 public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale( 2478 long groupId, java.lang.String articleId, double version, 2479 java.lang.String languageId) 2480 throws com.liferay.portal.kernel.exception.PortalException { 2481 return getService() 2482 .removeArticleLocale(groupId, articleId, version, languageId); 2483 } 2484 2485 /** 2486 * Restores the web content article from the Recycle Bin. 2487 * 2488 * @param userId the primary key of the user restoring the web content 2489 article 2490 * @param article the web content article 2491 * @return the restored web content article from the Recycle Bin 2492 * @throws PortalException if the web content article with the primary key 2493 could not be found in the Recycle Bin, if the user did not have 2494 permission to restore the article, or if a portal exception 2495 occurred 2496 */ 2497 public static com.liferay.portlet.journal.model.JournalArticle restoreArticleFromTrash( 2498 long userId, com.liferay.portlet.journal.model.JournalArticle article) 2499 throws com.liferay.portal.kernel.exception.PortalException { 2500 return getService().restoreArticleFromTrash(userId, article); 2501 } 2502 2503 /** 2504 * Returns an ordered range of all the web content articles matching the 2505 * parameters using the indexer, including a keywords parameter for matching 2506 * an article's ID, title, description, or content, a DDM structure key 2507 * parameter, a DDM template key parameter, an AND operator switch, and 2508 * parameters for type, status, a finder hash map. It is preferable to use 2509 * this method instead of the non-indexed version whenever possible for 2510 * performance reasons. 2511 * 2512 * <p> 2513 * Useful when paginating results. Returns a maximum of <code>end - 2514 * start</code> instances. <code>start</code> and <code>end</code> are not 2515 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2516 * refers to the first result in the set. Setting both <code>start</code> 2517 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2518 * result set. 2519 * </p> 2520 * 2521 * @param companyId the primary key of the web content article's company 2522 * @param groupId the primary key of the group (optionally <code>0</code>) 2523 * @param folderIds the primary keys of the web content article folders 2524 (optionally {@link java.util.Collections#EMPTY_LIST}) 2525 * @param classNameId the primary key of the DDMStructure class if the web 2526 content article is related to a DDM structure, the primary key of 2527 the class name associated with the article, or {@link 2528 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2529 * @param articleId the article ID keywords (space separated, optionally 2530 <code>null</code>) 2531 * @param title the title keywords (space separated, optionally 2532 <code>null</code>) 2533 * @param description the description keywords (space separated, optionally 2534 <code>null</code>) 2535 * @param content the content keywords (space separated, optionally 2536 <code>null</code>) 2537 * @param status the web content article's workflow status. For more 2538 information see {@link WorkflowConstants} for constants starting 2539 with the "STATUS_" prefix. 2540 * @param ddmStructureKey the primary key of the web content article's DDM 2541 structure, if the article is related to a DDM structure, or 2542 <code>null</code> otherwise 2543 * @param ddmTemplateKey the primary key of the web content article's DDM 2544 template 2545 * @param params the finder parameters (optionally <code>null</code>). The 2546 <code>includeDiscussions</code> parameter can be set to 2547 <code>true</code> to search for the keywords in the web content 2548 article discussions. 2549 * @param andSearch whether every field must match its value or keywords, 2550 or just one field must match 2551 * @param start the lower bound of the range of web content articles to 2552 return 2553 * @param end the upper bound of the range of web content articles to 2554 return (not inclusive) 2555 * @param sort the field, type, and direction by which to sort (optionally 2556 <code>null</code>) 2557 * @return the matching web content articles ordered by <code>sort</code> 2558 */ 2559 public static com.liferay.portal.kernel.search.Hits search(long companyId, 2560 long groupId, java.util.List<java.lang.Long> folderIds, 2561 long classNameId, java.lang.String articleId, java.lang.String title, 2562 java.lang.String description, java.lang.String content, int status, 2563 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2564 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2565 boolean andSearch, int start, int end, 2566 com.liferay.portal.kernel.search.Sort sort) { 2567 return getService() 2568 .search(companyId, groupId, folderIds, classNameId, 2569 articleId, title, description, content, status, ddmStructureKey, 2570 ddmTemplateKey, params, andSearch, start, end, sort); 2571 } 2572 2573 /** 2574 * @deprecated As of 7.0.0, replaced by {@link #search(long, long, List, 2575 long, String, String, String, String, int, String, String, 2576 LinkedHashMap, boolean, int, int, Sort)} 2577 */ 2578 @Deprecated 2579 public static com.liferay.portal.kernel.search.Hits search(long companyId, 2580 long groupId, java.util.List<java.lang.Long> folderIds, 2581 long classNameId, java.lang.String articleId, java.lang.String title, 2582 java.lang.String description, java.lang.String content, 2583 java.lang.String type, java.lang.String statusString, 2584 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2585 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2586 boolean andSearch, int start, int end, 2587 com.liferay.portal.kernel.search.Sort sort) { 2588 return getService() 2589 .search(companyId, groupId, folderIds, classNameId, 2590 articleId, title, description, content, type, statusString, 2591 ddmStructureKey, ddmTemplateKey, params, andSearch, start, end, sort); 2592 } 2593 2594 /** 2595 * Returns an ordered range of all the web content articles matching the 2596 * parameters without using the indexer, including keyword parameters for 2597 * article ID, title, description, and content, a DDM structure key 2598 * parameter, a DDM template key parameter, and an AND operator switch. It 2599 * is preferable to use the indexed version {@link #search(long, long, List, 2600 * long, String, String, String, String, int, String, String, LinkedHashMap, 2601 * boolean, int, int, Sort)} instead of this method wherever possible for 2602 * performance reasons. 2603 * 2604 * <p> 2605 * Useful when paginating results. Returns a maximum of <code>end - 2606 * start</code> instances. <code>start</code> and <code>end</code> are not 2607 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2608 * refers to the first result in the set. Setting both <code>start</code> 2609 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2610 * result set. 2611 * </p> 2612 * 2613 * @param companyId the primary key of the web content article's company 2614 * @param groupId the primary key of the group (optionally <code>0</code>) 2615 * @param folderIds the primary keys of the web content article folders 2616 (optionally {@link java.util.Collections#EMPTY_LIST}) 2617 * @param classNameId the primary key of the DDMStructure class if the web 2618 content article is related to a DDM structure, the primary key of 2619 the class name associated with the article, or {@link 2620 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2621 * @param articleId the article ID keywords (space separated, optionally 2622 <code>null</code>) 2623 * @param version the web content article's version (optionally 2624 <code>null</code>) 2625 * @param title the title keywords (space separated, optionally 2626 <code>null</code>) 2627 * @param description the description keywords (space separated, optionally 2628 <code>null</code>) 2629 * @param content the content keywords (space separated, optionally 2630 <code>null</code>) 2631 * @param ddmStructureKey the primary key of the web content article's DDM 2632 structure, if the article is related to a DDM structure, or 2633 <code>null</code> otherwise 2634 * @param ddmTemplateKey the primary key of the web content article's DDM 2635 template 2636 * @param displayDateGT the date after which a matching web content 2637 article's display date must be after (optionally 2638 <code>null</code>) 2639 * @param displayDateLT the date before which a matching web content 2640 article's display date must be before (optionally 2641 <code>null</code>) 2642 * @param status the web content article's workflow status. For more 2643 information see {@link WorkflowConstants} for constants starting 2644 with the "STATUS_" prefix. 2645 * @param reviewDate the web content article's scheduled review date 2646 (optionally <code>null</code>) 2647 * @param andOperator whether every field must match its value or keywords, 2648 or just one field must match. Company, group, folder IDs, class 2649 name ID, and status must all match their values. 2650 * @param start the lower bound of the range of web content articles to 2651 return 2652 * @param end the upper bound of the range of web content articles to 2653 return (not inclusive) 2654 * @param obc the comparator to order the web content articles 2655 * @return the range of matching web content articles ordered by the 2656 comparator 2657 */ 2658 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2659 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2660 long classNameId, java.lang.String articleId, java.lang.Double version, 2661 java.lang.String title, java.lang.String description, 2662 java.lang.String content, java.lang.String ddmStructureKey, 2663 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 2664 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 2665 boolean andOperator, int start, int end, 2666 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 2667 return getService() 2668 .search(companyId, groupId, folderIds, classNameId, 2669 articleId, version, title, description, content, ddmStructureKey, 2670 ddmTemplateKey, displayDateGT, displayDateLT, status, reviewDate, 2671 andOperator, start, end, obc); 2672 } 2673 2674 /** 2675 * Returns an ordered range of all the web content articles matching the 2676 * parameters without using the indexer, including keyword parameters for 2677 * article ID, title, description, and content, a DDM structure keys 2678 * (plural) parameter, a DDM template keys (plural) parameter, and an AND 2679 * operator switch. 2680 * 2681 * <p> 2682 * Useful when paginating results. Returns a maximum of <code>end - 2683 * start</code> instances. <code>start</code> and <code>end</code> are not 2684 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2685 * refers to the first result in the set. Setting both <code>start</code> 2686 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2687 * result set. 2688 * </p> 2689 * 2690 * @param companyId the primary key of the web content article's company 2691 * @param groupId the primary key of the group (optionally <code>0</code>) 2692 * @param folderIds the primary keys of the web content article folders 2693 (optionally {@link java.util.Collections#EMPTY_LIST}) 2694 * @param classNameId the primary key of the DDMStructure class if the web 2695 content article is related to a DDM structure, the primary key of 2696 the class name associated with the article, or {@link 2697 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2698 * @param articleId the article ID keywords (space separated, optionally 2699 <code>null</code>) 2700 * @param version the web content article's version (optionally 2701 <code>null</code>) 2702 * @param title the title keywords (space separated, optionally 2703 <code>null</code>) 2704 * @param description the description keywords (space separated, optionally 2705 <code>null</code>) 2706 * @param content the content keywords (space separated, optionally 2707 <code>null</code>) 2708 * @param ddmStructureKeys the primary keys of the web content article's 2709 DDM structures, if the article is related to a DDM structure, or 2710 <code>null</code> otherwise 2711 * @param ddmTemplateKeys the primary keys of the web content article's DDM 2712 templates (originally <code>null</code>). If the articles are 2713 related to a DDM structure, the template's structure must match 2714 it. 2715 * @param displayDateGT the date after which a matching web content 2716 article's display date must be after (optionally 2717 <code>null</code>) 2718 * @param displayDateLT the date before which a matching web content 2719 article's display date must be before (optionally 2720 <code>null</code>) 2721 * @param status the web content article's workflow status. For more 2722 information see {@link WorkflowConstants} for constants starting 2723 with the "STATUS_" prefix. 2724 * @param reviewDate the web content article's scheduled review date 2725 (optionally <code>null</code>) 2726 * @param andOperator whether every field must match its value or keywords, 2727 or just one field must match. Company, group, folder IDs, class 2728 name ID, and status must all match their values. 2729 * @param start the lower bound of the range of web content articles to 2730 return 2731 * @param end the upper bound of the range of web content articles to 2732 return (not inclusive) 2733 * @param obc the comparator to order the web content articles 2734 * @return the range of matching web content articles ordered by the 2735 comparator 2736 */ 2737 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2738 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2739 long classNameId, java.lang.String articleId, java.lang.Double version, 2740 java.lang.String title, java.lang.String description, 2741 java.lang.String content, java.lang.String[] ddmStructureKeys, 2742 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 2743 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 2744 boolean andOperator, int start, int end, 2745 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 2746 return getService() 2747 .search(companyId, groupId, folderIds, classNameId, 2748 articleId, version, title, description, content, ddmStructureKeys, 2749 ddmTemplateKeys, displayDateGT, displayDateLT, status, reviewDate, 2750 andOperator, start, end, obc); 2751 } 2752 2753 /** 2754 * Returns an ordered range of all the web content articles matching the 2755 * parameters using the indexer, including a keywords parameter for matching 2756 * an article's ID, title, description, or content, a DDM structure key 2757 * parameter, a DDM template key parameter, and a finder hash map parameter. 2758 * It is preferable to use this method instead of the non-indexed version 2759 * whenever possible for performance reasons. 2760 * 2761 * <p> 2762 * Useful when paginating results. Returns a maximum of <code>end - 2763 * start</code> instances. <code>start</code> and <code>end</code> are not 2764 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2765 * refers to the first result in the set. Setting both <code>start</code> 2766 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2767 * result set. 2768 * </p> 2769 * 2770 * @param companyId the primary key of the web content article's company 2771 * @param groupId the primary key of the group (optionally <code>0</code>) 2772 * @param folderIds the primary keys of the web content article folders 2773 (optionally {@link java.util.Collections#EMPTY_LIST}) 2774 * @param classNameId the primary key of the DDMStructure class if the web 2775 content article is related to a DDM structure, the primary key of 2776 the class name associated with the article, or {@link 2777 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2778 * @param ddmStructureKey the primary key of the web content article's DDM 2779 structure, if the article is related to a DDM structure, or 2780 <code>null</code> otherwise 2781 * @param ddmTemplateKey the primary key of the web content article's DDM 2782 template 2783 * @param keywords the keywords (space separated), which may occur in the 2784 web content article ID, title, description, or content 2785 (optionally <code>null</code>). If the keywords value is not 2786 <code>null</code>, the search uses the OR operator in connecting 2787 query criteria; otherwise it uses the AND operator. 2788 * @param params the finder parameters (optionally <code>null</code>) 2789 * @param start the lower bound of the range of web content articles to 2790 return 2791 * @param end the upper bound of the range of web content articles to 2792 return (not inclusive) 2793 * @param sort the field, type, and direction by which to sort (optionally 2794 <code>null</code>) 2795 * @return the matching web content articles ordered by <code>sort</code> 2796 */ 2797 public static com.liferay.portal.kernel.search.Hits search(long companyId, 2798 long groupId, java.util.List<java.lang.Long> folderIds, 2799 long classNameId, java.lang.String ddmStructureKey, 2800 java.lang.String ddmTemplateKey, java.lang.String keywords, 2801 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2802 int start, int end, com.liferay.portal.kernel.search.Sort sort) { 2803 return getService() 2804 .search(companyId, groupId, folderIds, classNameId, 2805 ddmStructureKey, ddmTemplateKey, keywords, params, start, end, sort); 2806 } 2807 2808 /** 2809 * Returns an ordered range of all the web content articles matching the 2810 * parameters without using the indexer, including a keywords parameter for 2811 * matching with the article's ID, title, description, and content, a DDM 2812 * structure key parameter, and a DDM template key parameter. It is 2813 * preferable to use the indexed version {@link #search(long, long, List, 2814 * long, String, String, String, LinkedHashMap, int, int, Sort)} instead of 2815 * this method wherever possible for performance reasons. 2816 * 2817 * <p> 2818 * Useful when paginating results. Returns a maximum of <code>end - 2819 * start</code> instances. <code>start</code> and <code>end</code> are not 2820 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2821 * refers to the first result in the set. Setting both <code>start</code> 2822 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2823 * result set. 2824 * </p> 2825 * 2826 * @param companyId the primary key of the web content article's company 2827 * @param groupId the primary key of the group (optionally <code>0</code>) 2828 * @param folderIds the primary keys of the web content article folders 2829 (optionally {@link java.util.Collections#EMPTY_LIST}) 2830 * @param classNameId the primary key of the DDMStructure class if the web 2831 content article is related to a DDM structure, the primary key of 2832 the class name associated with the article, or {@link 2833 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2834 * @param keywords the keywords (space separated), which may occur in the 2835 web content article ID, title, description, or content 2836 (optionally <code>null</code>). If the keywords value is not 2837 <code>null</code>, the search uses the OR operator in connecting 2838 query criteria; otherwise it uses the AND operator. 2839 * @param version the web content article's version (optionally 2840 <code>null</code>) 2841 * @param ddmStructureKey the primary key of the web content article's DDM 2842 structure, if the article is related to a DDM structure, or 2843 <code>null</code> otherwise 2844 * @param ddmTemplateKey the primary key of the web content article's DDM 2845 template 2846 * @param displayDateGT the date after which a matching web content 2847 article's display date must be after (optionally 2848 <code>null</code>) 2849 * @param displayDateLT the date before which a matching web content 2850 article's display date must be before (optionally 2851 <code>null</code>) 2852 * @param status the web content article's workflow status. For more 2853 information see {@link WorkflowConstants} for constants starting 2854 with the "STATUS_" prefix. 2855 * @param reviewDate the web content article's scheduled review date 2856 (optionally <code>null</code>) 2857 * @param start the lower bound of the range of web content articles to 2858 return 2859 * @param end the upper bound of the range of web content articles to 2860 return (not inclusive) 2861 * @param obc the comparator to order the web content articles 2862 * @return the range of matching web content articles ordered by the 2863 comparator 2864 */ 2865 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2866 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2867 long classNameId, java.lang.String keywords, java.lang.Double version, 2868 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2869 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 2870 java.util.Date reviewDate, int start, int end, 2871 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.journal.model.JournalArticle> obc) { 2872 return getService() 2873 .search(companyId, groupId, folderIds, classNameId, 2874 keywords, version, ddmStructureKey, ddmTemplateKey, displayDateGT, 2875 displayDateLT, status, reviewDate, start, end, obc); 2876 } 2877 2878 /** 2879 * Returns a range of all the web content articles in a single folder 2880 * matching the parameters without using the indexer. It is preferable to 2881 * use the indexed version {@link #search(long, long, long, int, int, int)} 2882 * instead of this method wherever possible for performance reasons. 2883 * 2884 * <p> 2885 * Useful when paginating results. Returns a maximum of <code>end - 2886 * start</code> instances. <code>start</code> and <code>end</code> are not 2887 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2888 * refers to the first result in the set. Setting both <code>start</code> 2889 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2890 * result set. 2891 * </p> 2892 * 2893 * @param groupId the primary key of the group (optionally <code>0</code>) 2894 * @param folderId the primary key of the web content article folder 2895 * @param status the web content article's workflow status. For more 2896 information see {@link WorkflowConstants} for constants starting 2897 with the "STATUS_" prefix. 2898 * @param start the lower bound of the range of web content articles to 2899 return 2900 * @param end the upper bound of the range of web content articles to 2901 return (not inclusive) 2902 * @return the matching web content articles 2903 */ 2904 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2905 long groupId, long folderId, int status, int start, int end) { 2906 return getService().search(groupId, folderId, status, start, end); 2907 } 2908 2909 /** 2910 * Returns a range of all the web content articles matching the parameters 2911 * without using the indexer. It is preferable to use the indexed version 2912 * {@link #search(long, long, long, int, int, int)} instead of this method 2913 * wherever possible for performance reasons. 2914 * 2915 * <p> 2916 * Useful when paginating results. Returns a maximum of <code>end - 2917 * start</code> instances. <code>start</code> and <code>end</code> are not 2918 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2919 * refers to the first result in the set. Setting both <code>start</code> 2920 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2921 * result set. 2922 * </p> 2923 * 2924 * @param groupId the primary key of the group (optionally <code>0</code>) 2925 * @param folderIds the primary keys of the web content article folders 2926 (optionally {@link java.util.Collections#EMPTY_LIST}) 2927 * @param status the web content article's workflow status. For more 2928 information see {@link WorkflowConstants} for constants starting 2929 with the "STATUS_" prefix. 2930 * @param start the lower bound of the range of web content articles to 2931 return 2932 * @param end the upper bound of the range of web content articles to 2933 return (not inclusive) 2934 * @return the matching web content articles 2935 */ 2936 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2937 long groupId, java.util.List<java.lang.Long> folderIds, int status, 2938 int start, int end) { 2939 return getService().search(groupId, folderIds, status, start, end); 2940 } 2941 2942 /** 2943 * Returns a range of all the web content articles matching the group, 2944 * creator, and status using the indexer. It is preferable to use this 2945 * method instead of the non-indexed version whenever possible for 2946 * performance reasons. 2947 * 2948 * <p> 2949 * Useful when paginating results. Returns a maximum of <code>end - 2950 * start</code> instances. <code>start</code> and <code>end</code> are not 2951 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2952 * refers to the first result in the set. Setting both <code>start</code> 2953 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2954 * result set. 2955 * </p> 2956 * 2957 * @param groupId the primary key of the group (optionally <code>0</code>) 2958 * @param userId the primary key of the user searching for web content 2959 articles 2960 * @param creatorUserId the primary key of the web content article's 2961 creator 2962 * @param status the web content article's workflow status. For more 2963 information see {@link WorkflowConstants} for constants starting 2964 with the "STATUS_" prefix. 2965 * @param start the lower bound of the range of web content articles to 2966 return 2967 * @param end the upper bound of the range of web content articles to 2968 return (not inclusive) 2969 * @return the matching web content articles 2970 * @throws PortalException if a portal exception occurred 2971 */ 2972 public static com.liferay.portal.kernel.search.Hits search(long groupId, 2973 long userId, long creatorUserId, int status, int start, int end) 2974 throws com.liferay.portal.kernel.exception.PortalException { 2975 return getService() 2976 .search(groupId, userId, creatorUserId, status, start, end); 2977 } 2978 2979 /** 2980 * Returns the number of web content articles matching the parameters, 2981 * including keyword parameters for article ID, title, description, and 2982 * content, a DDM structure key parameter, a DDM template key parameter, and 2983 * an AND operator switch. 2984 * 2985 * @param companyId the primary key of the web content article's company 2986 * @param groupId the primary key of the group (optionally <code>0</code>) 2987 * @param folderIds the primary keys of the web content article folders 2988 (optionally {@link java.util.Collections#EMPTY_LIST}) 2989 * @param classNameId the primary key of the DDMStructure class if the web 2990 content article is related to a DDM structure, the primary key of 2991 the class name associated with the article, or {@link 2992 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2993 * @param articleId the article ID keywords (space separated, optionally 2994 <code>null</code>) 2995 * @param version the web content article's version (optionally 2996 <code>null</code>) 2997 * @param title the title keywords (space separated, optionally 2998 <code>null</code>) 2999 * @param description the description keywords (space separated, optionally 3000 <code>null</code>) 3001 * @param content the content keywords (space separated, optionally 3002 <code>null</code>) 3003 * @param ddmStructureKey the primary key of the web content article's DDM 3004 structure, if the article is related to a DDM structure, or 3005 <code>null</code> otherwise 3006 * @param ddmTemplateKey the primary key of the web content article's DDM 3007 template 3008 * @param displayDateGT the date after which a matching web content 3009 article's display date must be after (optionally 3010 <code>null</code>) 3011 * @param displayDateLT the date before which a matching web content 3012 article's display date must be before (optionally 3013 <code>null</code>) 3014 * @param status the web content article's workflow status. For more 3015 information see {@link WorkflowConstants} for constants starting 3016 with the "STATUS_" prefix. 3017 * @param reviewDate the web content article's scheduled review date 3018 (optionally <code>null</code>) 3019 * @param andOperator whether every field must match its value or keywords, 3020 or just one field must match. Group, folder IDs, class name ID, 3021 and status must all match their values. 3022 * @return the number of matching web content articles 3023 */ 3024 public static int searchCount(long companyId, long groupId, 3025 java.util.List<java.lang.Long> folderIds, long classNameId, 3026 java.lang.String articleId, java.lang.Double version, 3027 java.lang.String title, java.lang.String description, 3028 java.lang.String content, java.lang.String ddmStructureKey, 3029 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 3030 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 3031 boolean andOperator) { 3032 return getService() 3033 .searchCount(companyId, groupId, folderIds, classNameId, 3034 articleId, version, title, description, content, ddmStructureKey, 3035 ddmTemplateKey, displayDateGT, displayDateLT, status, reviewDate, 3036 andOperator); 3037 } 3038 3039 /** 3040 * Returns the number of web content articles matching the parameters, 3041 * including keyword parameters for article ID, title, description, and 3042 * content, a DDM structure keys (plural) parameter, a DDM template keys 3043 * (plural) parameter, and an AND operator switch. 3044 * 3045 * @param companyId the primary key of the web content article's company 3046 * @param groupId the primary key of the group (optionally <code>0</code>) 3047 * @param folderIds the primary keys of the web content article folders 3048 (optionally {@link java.util.Collections#EMPTY_LIST}) 3049 * @param classNameId the primary key of the DDMStructure class if the web 3050 content article is related to a DDM structure, the primary key of 3051 the class name associated with the article, or {@link 3052 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3053 * @param articleId the article ID keywords (space separated, optionally 3054 <code>null</code>) 3055 * @param version the web content article's version (optionally 3056 <code>null</code>) 3057 * @param title the title keywords (space separated, optionally 3058 <code>null</code>) 3059 * @param description the description keywords (space separated, optionally 3060 <code>null</code>) 3061 * @param content the content keywords (space separated, optionally 3062 <code>null</code>) 3063 * @param ddmStructureKeys the primary keys of the web content article's 3064 DDM structures, if the article is related to a DDM structure, or 3065 <code>null</code> otherwise 3066 * @param ddmTemplateKeys the primary keys of the web content article's DDM 3067 templates (originally <code>null</code>). If the articles are 3068 related to a DDM structure, the template's structure must match 3069 it. 3070 * @param displayDateGT the date after which a matching web content 3071 article's display date must be after (optionally 3072 <code>null</code>) 3073 * @param displayDateLT the date before which a matching web content 3074 article's display date must be before (optionally 3075 <code>null</code>) 3076 * @param status the web content article's workflow status. For more 3077 information see {@link WorkflowConstants} for constants starting 3078 with the "STATUS_" prefix. 3079 * @param reviewDate the web content article's scheduled review date 3080 (optionally <code>null</code>) 3081 * @param andOperator whether every field must match its value or keywords, 3082 or just one field must match. Group, folder IDs, class name ID, 3083 and status must all match their values. 3084 * @return the number of matching web content articles 3085 */ 3086 public static int searchCount(long companyId, long groupId, 3087 java.util.List<java.lang.Long> folderIds, long classNameId, 3088 java.lang.String articleId, java.lang.Double version, 3089 java.lang.String title, java.lang.String description, 3090 java.lang.String content, java.lang.String[] ddmStructureKeys, 3091 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 3092 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 3093 boolean andOperator) { 3094 return getService() 3095 .searchCount(companyId, groupId, folderIds, classNameId, 3096 articleId, version, title, description, content, ddmStructureKeys, 3097 ddmTemplateKeys, displayDateGT, displayDateLT, status, reviewDate, 3098 andOperator); 3099 } 3100 3101 /** 3102 * Returns the number of web content articles matching the parameters, 3103 * including a keywords parameter for matching with the article's ID, title, 3104 * description, and content, a DDM structure key parameter, and a DDM 3105 * template key parameter. 3106 * 3107 * @param companyId the primary key of the web content article's company 3108 * @param groupId the primary key of the group (optionally <code>0</code>) 3109 * @param folderIds the primary keys of the web content article folders 3110 (optionally {@link java.util.Collections#EMPTY_LIST}) 3111 * @param classNameId the primary key of the DDMStructure class if the web 3112 content article is related to a DDM structure, the primary key of 3113 the class name associated with the article, or {@link 3114 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3115 * @param keywords the keywords (space separated), which may occur in the 3116 web content article ID, title, description, or content 3117 (optionally <code>null</code>). If the keywords value is not 3118 <code>null</code>, the search uses the OR operator in connecting 3119 query criteria; otherwise it uses the AND operator. 3120 * @param version the web content article's version (optionally 3121 <code>null</code>) 3122 * @param ddmStructureKey the primary key of the web content article's DDM 3123 structure, if the article is related to a DDM structure, or 3124 <code>null</code> otherwise 3125 * @param ddmTemplateKey the primary key of the web content article's DDM 3126 template 3127 * @param displayDateGT the date after which a matching web content 3128 article's display date must be after (optionally 3129 <code>null</code>) 3130 * @param displayDateLT the date before which a matching web content 3131 article's display date must be before (optionally 3132 <code>null</code>) 3133 * @param status the web content article's workflow status. For more 3134 information see {@link WorkflowConstants} for constants starting 3135 with the "STATUS_" prefix. 3136 * @param reviewDate the web content article's scheduled review date 3137 (optionally <code>null</code>) 3138 * @return the number of matching web content articles 3139 */ 3140 public static int searchCount(long companyId, long groupId, 3141 java.util.List<java.lang.Long> folderIds, long classNameId, 3142 java.lang.String keywords, java.lang.Double version, 3143 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 3144 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 3145 java.util.Date reviewDate) { 3146 return getService() 3147 .searchCount(companyId, groupId, folderIds, classNameId, 3148 keywords, version, ddmStructureKey, ddmTemplateKey, displayDateGT, 3149 displayDateLT, status, reviewDate); 3150 } 3151 3152 /** 3153 * Returns the number of web content articles matching the group, folder, 3154 * and status. 3155 * 3156 * @param groupId the primary key of the group (optionally <code>0</code>) 3157 * @param folderId the primary key of the web content article folder 3158 * @param status the web content article's workflow status. For more 3159 information see {@link WorkflowConstants} for constants starting 3160 with the "STATUS_" prefix. 3161 * @return the number of matching web content articles 3162 */ 3163 public static int searchCount(long groupId, long folderId, int status) { 3164 return getService().searchCount(groupId, folderId, status); 3165 } 3166 3167 /** 3168 * Returns the number of web content articles matching the group, folders, 3169 * and status. 3170 * 3171 * @param groupId the primary key of the group (optionally <code>0</code>) 3172 * @param folderIds the primary keys of the web content article folders 3173 (optionally {@link java.util.Collections#EMPTY_LIST}) 3174 * @param status the web content article's workflow status. For more 3175 information see {@link WorkflowConstants} for constants starting 3176 with the "STATUS_" prefix. 3177 * @return the number of matching web content articles 3178 */ 3179 public static int searchCount(long groupId, 3180 java.util.List<java.lang.Long> folderIds, int status) { 3181 return getService().searchCount(groupId, folderIds, status); 3182 } 3183 3184 /** 3185 * Returns a {@link BaseModelSearchResult} containing the total number of 3186 * hits and an ordered range of all the web content articles matching the 3187 * parameters using the indexer, including keyword parameters for article 3188 * ID, title, description, or content, a DDM structure key parameter, a DDM 3189 * template key parameter, an AND operator switch, and parameters for type, 3190 * status, and a finder hash map. It is preferable to use this method 3191 * instead of the non-indexed version whenever possible for performance 3192 * reasons. 3193 * 3194 * <p> 3195 * The <code>start</code> and <code>end</code> parameters only affect the 3196 * amount of web content articles returned as results, not the total number 3197 * of hits. 3198 * </p> 3199 * 3200 * <p> 3201 * Useful when paginating results. Returns a maximum of <code>end - 3202 * start</code> instances. <code>start</code> and <code>end</code> are not 3203 * primary keys, they are indexes in the result set. Thus, <code>0</code> 3204 * refers to the first result in the set. Setting both <code>start</code> 3205 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 3206 * result set. 3207 * </p> 3208 * 3209 * @param companyId the primary key of the web content article's company 3210 * @param groupId the primary key of the group (optionally <code>0</code>) 3211 * @param folderIds the primary keys of the web content article folders 3212 (optionally {@link java.util.Collections#EMPTY_LIST}) 3213 * @param classNameId the primary key of the DDMStructure class, the 3214 primary key of the class name associated with the article, or 3215 {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3216 * @param articleId the article ID keywords (space separated, optionally 3217 <code>null</code>) 3218 * @param title the title keywords (space separated, optionally 3219 <code>null</code>) 3220 * @param description the description keywords (space separated, optionally 3221 <code>null</code>) 3222 * @param content the content keywords (space separated, optionally 3223 <code>null</code>) 3224 * @param status the web content article's workflow status. For more 3225 information see {@link WorkflowConstants} for constants starting 3226 with the "STATUS_" prefix. 3227 * @param ddmStructureKey the primary key of the web content article's DDM 3228 structure 3229 * @param ddmTemplateKey the primary key of the web content article's DDM 3230 template 3231 * @param params the finder parameters (optionally <code>null</code>). The 3232 <code>includeDiscussions</code> parameter can be set to 3233 <code>true</code> to search for the keywords in the web content 3234 article discussions. 3235 * @param andSearch whether every field must match its value or keywords, 3236 or just one field must match 3237 * @param start the lower bound of the range of web content articles to 3238 return 3239 * @param end the upper bound of the range of web content articles to 3240 return (not inclusive) 3241 * @param sort the field, type, and direction by which to sort (optionally 3242 <code>null</code>) 3243 * @return a {@link BaseModelSearchResult} containing the total number of 3244 hits and an ordered range of all the matching web content 3245 articles ordered by <code>sort</code> 3246 * @throws PortalException if a portal exception occurred 3247 */ 3248 public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.journal.model.JournalArticle> searchJournalArticles( 3249 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 3250 long classNameId, java.lang.String articleId, java.lang.String title, 3251 java.lang.String description, java.lang.String content, int status, 3252 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 3253 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 3254 boolean andSearch, int start, int end, 3255 com.liferay.portal.kernel.search.Sort sort) 3256 throws com.liferay.portal.kernel.exception.PortalException { 3257 return getService() 3258 .searchJournalArticles(companyId, groupId, folderIds, 3259 classNameId, articleId, title, description, content, status, 3260 ddmStructureKey, ddmTemplateKey, params, andSearch, start, end, sort); 3261 } 3262 3263 /** 3264 * Returns a {@link BaseModelSearchResult} containing the total number of 3265 * hits and an ordered range of all the web content articles matching the 3266 * parameters using the indexer, including a keywords parameter for matching 3267 * an article's ID, title, description, or content, a DDM structure key 3268 * parameter, a DDM template key parameter, and a finder hash map parameter. 3269 * It is preferable to use this method instead of the non-indexed version 3270 * whenever possible for performance reasons. 3271 * 3272 * <p> 3273 * The <code>start</code> and <code>end</code> parameters only affect the 3274 * amount of web content articles returned as results, not the total number 3275 * of hits. 3276 * </p> 3277 * 3278 * <p> 3279 * Useful when paginating results. Returns a maximum of <code>end - 3280 * start</code> instances. <code>start</code> and <code>end</code> are not 3281 * primary keys, they are indexes in the result set. Thus, <code>0</code> 3282 * refers to the first result in the set. Setting both <code>start</code> 3283 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 3284 * result set. 3285 * </p> 3286 * 3287 * @param companyId the primary key of the web content article's company 3288 * @param groupId the primary key of the group (optionally <code>0</code>) 3289 * @param folderIds the primary keys of the web content article folders 3290 (optionally {@link java.util.Collections#EMPTY_LIST}) 3291 * @param classNameId the primary key of the DDMStructure class, the 3292 primary key of the class name associated with the article, or 3293 {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3294 * @param ddmStructureKey the primary key of the web content article's DDM 3295 structure 3296 * @param ddmTemplateKey the primary key of the web content article's DDM 3297 template 3298 * @param keywords the keywords (space separated), which may occur in the 3299 web content article ID, title, description, or content 3300 (optionally <code>null</code>). If the keywords value is not 3301 <code>null</code>, the search uses the OR operator in connecting 3302 query criteria; otherwise it uses the AND operator. 3303 * @param params the finder parameters (optionally <code>null</code>) 3304 * @param start the lower bound of the range of web content articles to 3305 return 3306 * @param end the upper bound of the range of web content articles to 3307 return (not inclusive) 3308 * @param sort the field, type, and direction by which to sort (optionally 3309 <code>null</code>) 3310 * @return a {@link BaseModelSearchResult} containing the total number of 3311 hits and an ordered range of all the matching web content 3312 articles ordered by <code>sort</code> 3313 * @throws PortalException if a portal exception occurred 3314 */ 3315 public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.journal.model.JournalArticle> searchJournalArticles( 3316 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 3317 long classNameId, java.lang.String ddmStructureKey, 3318 java.lang.String ddmTemplateKey, java.lang.String keywords, 3319 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 3320 int start, int end, com.liferay.portal.kernel.search.Sort sort) 3321 throws com.liferay.portal.kernel.exception.PortalException { 3322 return getService() 3323 .searchJournalArticles(companyId, groupId, folderIds, 3324 classNameId, ddmStructureKey, ddmTemplateKey, keywords, params, 3325 start, end, sort); 3326 } 3327 3328 /** 3329 * Returns a {@link BaseModelSearchResult} containing the total number of 3330 * hits and an ordered range of all the web content articles matching the 3331 * parameters using the indexer, including the web content article's creator 3332 * ID and status. It is preferable to use this method instead of the 3333 * non-indexed version whenever possible for performance reasons. 3334 * 3335 * <p> 3336 * The <code>start</code> and <code>end</code> parameters only affect the 3337 * amount of web content articles returned as results, not the total number 3338 * of hits. 3339 * </p> 3340 * 3341 * <p> 3342 * Useful when paginating results. Returns a maximum of <code>end - 3343 * start</code> instances. <code>start</code> and <code>end</code> are not 3344 * primary keys, they are indexes in the result set. Thus, <code>0</code> 3345 * refers to the first result in the set. Setting both <code>start</code> 3346 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 3347 * result set. 3348 * </p> 3349 * 3350 * @param groupId the primary key of the group (optionally <code>0</code>) 3351 * @param userId the primary key of the user searching for web content 3352 articles 3353 * @param creatorUserId the primary key of the web content article's 3354 creator 3355 * @param status the web content article's workflow status. For more 3356 information see {@link WorkflowConstants} for constants starting 3357 with the "STATUS_" prefix. 3358 * @param start the lower bound of the range of web content articles to 3359 return 3360 * @param end the upper bound of the range of web content articles to 3361 return (not inclusive) 3362 * @return a {@link BaseModelSearchResult} containing the total number of 3363 hits and an ordered range of all the matching web content 3364 articles ordered by <code>sort</code> 3365 * @throws PortalException if a portal exception occurred 3366 */ 3367 public static com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portlet.journal.model.JournalArticle> searchJournalArticles( 3368 long groupId, long userId, long creatorUserId, int status, int start, 3369 int end) throws com.liferay.portal.kernel.exception.PortalException { 3370 return getService() 3371 .searchJournalArticles(groupId, userId, creatorUserId, 3372 status, start, end); 3373 } 3374 3375 /** 3376 * Sets the Spring bean ID for this bean. 3377 * 3378 * @param beanIdentifier the Spring bean ID for this bean 3379 */ 3380 public static void setBeanIdentifier(java.lang.String beanIdentifier) { 3381 getService().setBeanIdentifier(beanIdentifier); 3382 } 3383 3384 public static void setTreePaths(long folderId, java.lang.String treePath, 3385 boolean reindex) 3386 throws com.liferay.portal.kernel.exception.PortalException { 3387 getService().setTreePaths(folderId, treePath, reindex); 3388 } 3389 3390 /** 3391 * Subscribes the user to changes in elements that belong to the web content 3392 * article's DDM structure. 3393 * 3394 * @param groupId the primary key of the folder's group 3395 * @param userId the primary key of the user to be subscribed 3396 * @param ddmStructureId the primary key of the structure to subscribe to 3397 * @throws PortalException if a matching user or group could not be found 3398 */ 3399 public static void subscribeStructure(long groupId, long userId, 3400 long ddmStructureId) 3401 throws com.liferay.portal.kernel.exception.PortalException { 3402 getService().subscribeStructure(groupId, userId, ddmStructureId); 3403 } 3404 3405 /** 3406 * Unsubscribes the user from changes in elements that belong to the web 3407 * content article's DDM structure. 3408 * 3409 * @param groupId the primary key of the folder's group 3410 * @param userId the primary key of the user to be subscribed 3411 * @param ddmStructureId the primary key of the structure to subscribe to 3412 * @throws PortalException if a matching user or subscription could not be 3413 found 3414 */ 3415 public static void unsubscribeStructure(long groupId, long userId, 3416 long ddmStructureId) 3417 throws com.liferay.portal.kernel.exception.PortalException { 3418 getService().unsubscribeStructure(groupId, userId, ddmStructureId); 3419 } 3420 3421 /** 3422 * Updates the web content article matching the version, replacing its 3423 * folder and content. 3424 * 3425 * @param userId the primary key of the user updating the web content 3426 article 3427 * @param groupId the primary key of the web content article's group 3428 * @param folderId the primary key of the web content article folder 3429 * @param articleId the primary key of the web content article 3430 * @param version the web content article's version 3431 * @param content the HTML content wrapped in XML. For more information, 3432 see the content example in the {@link #addArticle(long, long, 3433 long, long, long, String, boolean, double, Map, Map, String, 3434 String, String, String, int, int, int, int, int, int, int, int, 3435 int, int, boolean, int, int, int, int, int, boolean, boolean, 3436 boolean, String, File, Map, String, ServiceContext)} description. 3437 * @param serviceContext the service context to be applied. Can set the 3438 modification date, expando bridge attributes, asset category IDs, 3439 asset tag names, asset link entry IDs, workflow actions, URL 3440 title, and can set whether to add the default command update for 3441 the web content article. With respect to social activities, by 3442 setting the service context's command to {@link 3443 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3444 is considered a web content update activity; otherwise it is 3445 considered a web content add activity. 3446 * @return the updated web content article 3447 * @throws PortalException if a user with the primary key or a matching web 3448 content article could not be found, or if a portal exception 3449 occurred 3450 */ 3451 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3452 long userId, long groupId, long folderId, java.lang.String articleId, 3453 double version, java.lang.String content, 3454 com.liferay.portal.service.ServiceContext serviceContext) 3455 throws com.liferay.portal.kernel.exception.PortalException { 3456 return getService() 3457 .updateArticle(userId, groupId, folderId, articleId, 3458 version, content, serviceContext); 3459 } 3460 3461 /** 3462 * Updates the web content article with additional parameters. 3463 * 3464 * @param userId the primary key of the user updating the web content 3465 article 3466 * @param groupId the primary key of the web content article's group 3467 * @param folderId the primary key of the web content article folder 3468 * @param articleId the primary key of the web content article 3469 * @param version the web content article's version 3470 * @param titleMap the web content article's locales and localized titles 3471 * @param descriptionMap the web content article's locales and localized 3472 descriptions 3473 * @param content the HTML content wrapped in XML. For more information, 3474 see the content example in the {@link #addArticle(long, long, 3475 long, long, long, String, boolean, double, Map, Map, String, 3476 String, String, String, int, int, int, int, int, int, int, int, 3477 int, int, boolean, int, int, int, int, int, boolean, boolean, 3478 boolean, String, File, Map, String, ServiceContext)} description. 3479 * @param ddmStructureKey the primary key of the web content article's DDM 3480 structure, if the article is related to a DDM structure, or 3481 <code>null</code> otherwise 3482 * @param ddmTemplateKey the primary key of the web content article's DDM 3483 template 3484 * @param layoutUuid the unique string identifying the web content 3485 article's display page 3486 * @param displayDateMonth the month the web content article is set to 3487 display 3488 * @param displayDateDay the calendar day the web content article is set to 3489 display 3490 * @param displayDateYear the year the web content article is set to 3491 display 3492 * @param displayDateHour the hour the web content article is set to 3493 display 3494 * @param displayDateMinute the minute the web content article is set to 3495 display 3496 * @param expirationDateMonth the month the web content article is set to 3497 expire 3498 * @param expirationDateDay the calendar day the web content article is set 3499 to expire 3500 * @param expirationDateYear the year the web content article is set to 3501 expire 3502 * @param expirationDateHour the hour the web content article is set to 3503 expire 3504 * @param expirationDateMinute the minute the web content article is set to 3505 expire 3506 * @param neverExpire whether the web content article is not set to auto 3507 expire 3508 * @param reviewDateMonth the month the web content article is set for 3509 review 3510 * @param reviewDateDay the calendar day the web content article is set for 3511 review 3512 * @param reviewDateYear the year the web content article is set for review 3513 * @param reviewDateHour the hour the web content article is set for review 3514 * @param reviewDateMinute the minute the web content article is set for 3515 review 3516 * @param neverReview whether the web content article is not set for review 3517 * @param indexable whether the web content is searchable 3518 * @param smallImage whether to update web content article's a small image. 3519 A file must be passed in as <code>smallImageFile</code> value, 3520 otherwise the current small image is deleted. 3521 * @param smallImageURL the web content article's small image URL 3522 (optionally <code>null</code>) 3523 * @param smallImageFile the web content article's new small image file 3524 (optionally <code>null</code>). Must pass in 3525 <code>smallImage</code> value of <code>true</code> to replace the 3526 article's small image file. 3527 * @param images the web content's images (optionally <code>null</code>) 3528 * @param articleURL the web content article's accessible URL (optionally 3529 <code>null</code>) 3530 * @param serviceContext the service context to be applied. Can set the 3531 modification date, expando bridge attributes, asset category IDs, 3532 asset tag names, asset link entry IDs, workflow actions, URL 3533 title , and can set whether to add the default command update for 3534 the web content article. With respect to social activities, by 3535 setting the service context's command to {@link 3536 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3537 is considered a web content update activity; otherwise it is 3538 considered a web content add activity. 3539 * @return the updated web content article 3540 * @throws PortalException if a user with the primary key or a matching web 3541 content article could not be found, or if a portal exception 3542 occurred 3543 */ 3544 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3545 long userId, long groupId, long folderId, java.lang.String articleId, 3546 double version, 3547 java.util.Map<java.util.Locale, java.lang.String> titleMap, 3548 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 3549 java.lang.String content, java.lang.String ddmStructureKey, 3550 java.lang.String ddmTemplateKey, java.lang.String layoutUuid, 3551 int displayDateMonth, int displayDateDay, int displayDateYear, 3552 int displayDateHour, int displayDateMinute, int expirationDateMonth, 3553 int expirationDateDay, int expirationDateYear, int expirationDateHour, 3554 int expirationDateMinute, boolean neverExpire, int reviewDateMonth, 3555 int reviewDateDay, int reviewDateYear, int reviewDateHour, 3556 int reviewDateMinute, boolean neverReview, boolean indexable, 3557 boolean smallImage, java.lang.String smallImageURL, 3558 java.io.File smallImageFile, 3559 java.util.Map<java.lang.String, byte[]> images, 3560 java.lang.String articleURL, 3561 com.liferay.portal.service.ServiceContext serviceContext) 3562 throws com.liferay.portal.kernel.exception.PortalException { 3563 return getService() 3564 .updateArticle(userId, groupId, folderId, articleId, 3565 version, titleMap, descriptionMap, content, ddmStructureKey, 3566 ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay, 3567 displayDateYear, displayDateHour, displayDateMinute, 3568 expirationDateMonth, expirationDateDay, expirationDateYear, 3569 expirationDateHour, expirationDateMinute, neverExpire, 3570 reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour, 3571 reviewDateMinute, neverReview, indexable, smallImage, 3572 smallImageURL, smallImageFile, images, articleURL, serviceContext); 3573 } 3574 3575 /** 3576 * Updates the web content article matching the version, replacing its 3577 * folder, title, description, content, and layout UUID. 3578 * 3579 * @param userId the primary key of the user updating the web content 3580 article 3581 * @param groupId the primary key of the web content article's group 3582 * @param folderId the primary key of the web content article folder 3583 * @param articleId the primary key of the web content article 3584 * @param version the web content article's version 3585 * @param titleMap the web content article's locales and localized titles 3586 * @param descriptionMap the web content article's locales and localized 3587 descriptions 3588 * @param content the HTML content wrapped in XML. For more information, 3589 see the content example in the {@link #addArticle(long, long, 3590 long, long, long, String, boolean, double, Map, Map, String, 3591 String, String, String, int, int, int, int, int, int, int, int, 3592 int, int, boolean, int, int, int, int, int, boolean, boolean, 3593 boolean, String, File, Map, String, ServiceContext)} description. 3594 * @param layoutUuid the unique string identifying the web content 3595 article's display page 3596 * @param serviceContext the service context to be applied. Can set the 3597 modification date, expando bridge attributes, asset category IDs, 3598 asset tag names, asset link entry IDs, workflow actions, URL 3599 title, and can set whether to add the default command update for 3600 the web content article. With respect to social activities, by 3601 setting the service context's command to {@link 3602 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3603 is considered a web content update activity; otherwise it is 3604 considered a web content add activity. 3605 * @return the updated web content article 3606 * @throws PortalException if a user with the primary key or a matching web 3607 content article could not be found, or if a portal exception 3608 occurred 3609 */ 3610 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3611 long userId, long groupId, long folderId, java.lang.String articleId, 3612 double version, 3613 java.util.Map<java.util.Locale, java.lang.String> titleMap, 3614 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 3615 java.lang.String content, java.lang.String layoutUuid, 3616 com.liferay.portal.service.ServiceContext serviceContext) 3617 throws com.liferay.portal.kernel.exception.PortalException { 3618 return getService() 3619 .updateArticle(userId, groupId, folderId, articleId, 3620 version, titleMap, descriptionMap, content, layoutUuid, 3621 serviceContext); 3622 } 3623 3624 /** 3625 * @deprecated As of 6.2.0, replaced by {@link 3626 #updateArticleTranslation(long, String, double, Locale, 3627 String, String, String, Map, ServiceContext)} 3628 */ 3629 @Deprecated 3630 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 3631 long groupId, java.lang.String articleId, double version, 3632 java.util.Locale locale, java.lang.String title, 3633 java.lang.String description, java.lang.String content, 3634 java.util.Map<java.lang.String, byte[]> images) 3635 throws com.liferay.portal.kernel.exception.PortalException { 3636 return getService() 3637 .updateArticleTranslation(groupId, articleId, version, 3638 locale, title, description, content, images); 3639 } 3640 3641 /** 3642 * Updates the translation of the web content article. 3643 * 3644 * @param groupId the primary key of the web content article's group 3645 * @param articleId the primary key of the web content article 3646 * @param version the web content article's version 3647 * @param locale the locale of the web content article's display template 3648 * @param title the translated web content article title 3649 * @param description the translated web content article description 3650 * @param content the HTML content wrapped in XML. For more information, 3651 see the content example in the {@link #addArticle(long, long, 3652 long, long, long, String, boolean, double, Map, Map, String, 3653 String, String, String, int, int, int, int, int, int, int, int, 3654 int, int, boolean, int, int, int, int, int, boolean, boolean, 3655 boolean, String, File, Map, String, ServiceContext)} description. 3656 * @param images the web content's images 3657 * @param serviceContext the service context to be applied. Can set the 3658 modification date and URL title for the web content article. 3659 * @return the updated web content article 3660 * @throws PortalException if a user with the primary key or a matching web 3661 content article could not be found, or if a portal exception 3662 occurred 3663 */ 3664 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 3665 long groupId, java.lang.String articleId, double version, 3666 java.util.Locale locale, java.lang.String title, 3667 java.lang.String description, java.lang.String content, 3668 java.util.Map<java.lang.String, byte[]> images, 3669 com.liferay.portal.service.ServiceContext serviceContext) 3670 throws com.liferay.portal.kernel.exception.PortalException { 3671 return getService() 3672 .updateArticleTranslation(groupId, articleId, version, 3673 locale, title, description, content, images, serviceContext); 3674 } 3675 3676 /** 3677 * Updates the web content article's asset with the new asset categories, 3678 * tag names, and link entries, removing and adding them as necessary. 3679 * 3680 * @param userId the primary key of the user updating the web content 3681 article's asset 3682 * @param article the web content article 3683 * @param assetCategoryIds the primary keys of the new asset categories 3684 * @param assetTagNames the new asset tag names 3685 * @param assetLinkEntryIds the primary keys of the new asset link entries 3686 * @throws PortalException if a portal exception occurred 3687 */ 3688 public static void updateAsset(long userId, 3689 com.liferay.portlet.journal.model.JournalArticle article, 3690 long[] assetCategoryIds, java.lang.String[] assetTagNames, 3691 long[] assetLinkEntryIds) 3692 throws com.liferay.portal.kernel.exception.PortalException { 3693 getService() 3694 .updateAsset(userId, article, assetCategoryIds, assetTagNames, 3695 assetLinkEntryIds); 3696 } 3697 3698 /** 3699 * Updates the web content article matching the group, article ID, and 3700 * version, replacing its content. 3701 * 3702 * @param groupId the primary key of the web content article's group 3703 * @param articleId the primary key of the web content article 3704 * @param version the web content article's version 3705 * @param content the HTML content wrapped in XML. For more information, 3706 see the content example in the {@link #addArticle(long, long, 3707 long, long, long, String, boolean, double, Map, Map, String, 3708 String, String, String, int, int, int, int, int, int, int, int, 3709 int, int, boolean, int, int, int, int, int, boolean, boolean, 3710 boolean, String, File, Map, String, ServiceContext)} description. 3711 * @return the updated web content article 3712 * @throws PortalException if a matching web content article could not be 3713 found 3714 */ 3715 public static com.liferay.portlet.journal.model.JournalArticle updateContent( 3716 long groupId, java.lang.String articleId, double version, 3717 java.lang.String content) 3718 throws com.liferay.portal.kernel.exception.PortalException { 3719 return getService().updateContent(groupId, articleId, version, content); 3720 } 3721 3722 /** 3723 * Updates the web content articles matching the group, class name ID, and 3724 * DDM template key, replacing the DDM template key with a new one. 3725 * 3726 * @param groupId the primary key of the web content article's group 3727 * @param classNameId the primary key of the DDMStructure class if the web 3728 content article is related to a DDM structure, the primary key of 3729 the class name associated with the article, or {@link 3730 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3731 * @param oldDDMTemplateKey the primary key of the web content article's old 3732 DDM template 3733 * @param newDDMTemplateKey the primary key of the web content article's new 3734 DDM template 3735 */ 3736 public static void updateDDMTemplateKey(long groupId, long classNameId, 3737 java.lang.String oldDDMTemplateKey, java.lang.String newDDMTemplateKey) { 3738 getService() 3739 .updateDDMTemplateKey(groupId, classNameId, oldDDMTemplateKey, 3740 newDDMTemplateKey); 3741 } 3742 3743 /** 3744 * Updates the journal article in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 3745 * 3746 * @param journalArticle the journal article 3747 * @return the journal article that was updated 3748 */ 3749 public static com.liferay.portlet.journal.model.JournalArticle updateJournalArticle( 3750 com.liferay.portlet.journal.model.JournalArticle journalArticle) { 3751 return getService().updateJournalArticle(journalArticle); 3752 } 3753 3754 /** 3755 * Updates the workflow status of the web content article. 3756 * 3757 * @param userId the primary key of the user updating the web content 3758 article's status 3759 * @param article the web content article 3760 * @param status the web content article's workflow status. For more 3761 information see {@link WorkflowConstants} for constants starting 3762 with the "STATUS_" prefix. 3763 * @param articleURL the web content article's accessible URL 3764 * @param serviceContext the service context to be applied. Can set the 3765 modification date, status date, and portlet preferences. With 3766 respect to social activities, by setting the service context's 3767 command to {@link 3768 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3769 is considered a web content update activity; otherwise it is 3770 considered a web content add activity. 3771 * @param workflowContext the web content article's configured workflow 3772 context 3773 * @return the updated web content article 3774 * @throws PortalException if a portal exception occurred 3775 */ 3776 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3777 long userId, com.liferay.portlet.journal.model.JournalArticle article, 3778 int status, java.lang.String articleURL, 3779 com.liferay.portal.service.ServiceContext serviceContext, 3780 java.util.Map<java.lang.String, java.io.Serializable> workflowContext) 3781 throws com.liferay.portal.kernel.exception.PortalException { 3782 return getService() 3783 .updateStatus(userId, article, status, articleURL, 3784 serviceContext, workflowContext); 3785 } 3786 3787 /** 3788 * Updates the workflow status of the web content article matching the class 3789 * PK. 3790 * 3791 * @param userId the primary key of the user updating the web content 3792 article's status 3793 * @param classPK the primary key of the DDM structure, if the web content 3794 article is related to a DDM structure, the primary key of the 3795 class associated with the article, or <code>0</code> otherwise 3796 * @param status the web content article's workflow status. For more 3797 information see {@link WorkflowConstants} for constants starting 3798 with the "STATUS_" prefix. 3799 * @param workflowContext the web content article's configured workflow 3800 * @param serviceContext the service context to be applied. Can set the 3801 modification date, portlet preferences, and can set whether to 3802 add the default command update for the web content article. 3803 * @return the updated web content article 3804 * @throws PortalException if a matching web content article could not be 3805 found or if a portal exception occurred 3806 */ 3807 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3808 long userId, long classPK, int status, 3809 java.util.Map<java.lang.String, java.io.Serializable> workflowContext, 3810 com.liferay.portal.service.ServiceContext serviceContext) 3811 throws com.liferay.portal.kernel.exception.PortalException { 3812 return getService() 3813 .updateStatus(userId, classPK, status, workflowContext, 3814 serviceContext); 3815 } 3816 3817 /** 3818 * Updates the workflow status of the web content article matching the 3819 * group, article ID, and version. 3820 * 3821 * @param userId the primary key of the user updating the web content 3822 article's status 3823 * @param groupId the primary key of the web content article's group 3824 * @param articleId the primary key of the web content article 3825 * @param version the web content article's version 3826 * @param status the web content article's workflow status. For more 3827 information see {@link WorkflowConstants} for constants starting 3828 with the "STATUS_" prefix. 3829 * @param articleURL the web content article's accessible URL 3830 * @param workflowContext the web content article's configured workflow 3831 * @param serviceContext the service context to be applied. Can set the 3832 modification date, portlet preferences, and can set whether to 3833 add the default command update for the web content article. 3834 * @return the updated web content article 3835 * @throws PortalException if a matching web content article could not be 3836 found or if a portal exception occurred 3837 */ 3838 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3839 long userId, long groupId, java.lang.String articleId, double version, 3840 int status, java.lang.String articleURL, 3841 java.util.Map<java.lang.String, java.io.Serializable> workflowContext, 3842 com.liferay.portal.service.ServiceContext serviceContext) 3843 throws com.liferay.portal.kernel.exception.PortalException { 3844 return getService() 3845 .updateStatus(userId, groupId, articleId, version, status, 3846 articleURL, workflowContext, serviceContext); 3847 } 3848 3849 /** 3850 * Updates the web content articles matching the group, class name ID, and 3851 * DDM template key, replacing the DDM template key with a new one. 3852 * 3853 * @param groupId the primary key of the web content article's group 3854 * @param classNameId the primary key of the DDMStructure class if the 3855 web content article is related to a DDM structure, the 3856 primary key of the class name associated with the article, or 3857 {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 3858 otherwise 3859 * @param oldDDMTemplateKey the primary key of the web content 3860 article's old DDM template 3861 * @param newDDMTemplateKey the primary key of the web content 3862 article's new DDM template 3863 * @deprecated As of 7.0.0, replaced by {@link #updateDDMTemplateKey} 3864 */ 3865 @Deprecated 3866 public static void updateTemplateId(long groupId, long classNameId, 3867 java.lang.String oldDDMTemplateKey, java.lang.String newDDMTemplateKey) { 3868 getService() 3869 .updateTemplateId(groupId, classNameId, oldDDMTemplateKey, 3870 newDDMTemplateKey); 3871 } 3872 3873 public static JournalArticleLocalService getService() { 3874 if (_service == null) { 3875 _service = (JournalArticleLocalService)PortalBeanLocatorUtil.locate(JournalArticleLocalService.class.getName()); 3876 3877 ReferenceRegistry.registerReference(JournalArticleLocalServiceUtil.class, 3878 "_service"); 3879 } 3880 3881 return _service; 3882 } 3883 3884 /** 3885 * @deprecated As of 6.2.0 3886 */ 3887 @Deprecated 3888 public void setService(JournalArticleLocalService service) { 3889 } 3890 3891 private static JournalArticleLocalService _service; 3892 }