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