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