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