001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * The contents of this file are subject to the terms of the Liferay Enterprise 005 * Subscription License ("License"). You may not use this file except in 006 * compliance with the License. You can obtain a copy of the License by 007 * contacting Liferay, Inc. See the License for the specific language governing 008 * permissions and limitations under the License, including but not limited to 009 * distribution rights of the Software. 010 * 011 * 012 * 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 public static void deleteArticles(long groupId, java.lang.String className, 804 long classPK) 805 throws com.liferay.portal.kernel.exception.PortalException, 806 com.liferay.portal.kernel.exception.SystemException { 807 getService().deleteArticles(groupId, className, classPK); 808 } 809 810 /** 811 * Deletes the layout's association with the web content articles for the 812 * group. 813 * 814 * @param groupId the primary key of the web content article's group 815 * @param layoutUuid the unique string identifying the web content 816 article's display page 817 * @throws SystemException if a system exception occurred 818 */ 819 public static void deleteLayoutArticleReferences(long groupId, 820 java.lang.String layoutUuid) 821 throws com.liferay.portal.kernel.exception.SystemException { 822 getService().deleteLayoutArticleReferences(groupId, layoutUuid); 823 } 824 825 /** 826 * Expires the web content article matching the group, article ID, and 827 * version. 828 * 829 * @param userId the primary key of the user updating the web content 830 article 831 * @param groupId the primary key of the web content article's group 832 * @param articleId the primary key of the web content article 833 * @param version the web content article's version 834 * @param articleURL the web content article's accessible URL 835 * @param serviceContext the service context to be applied. Can set the 836 modification date, status date, portlet preferences, and can set 837 whether to add the default command update for the web content 838 article. With respect to social activities, by setting the 839 service context's command to {@link 840 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 841 is considered a web content update activity; otherwise it is 842 considered a web content add activity. 843 * @return the web content article 844 * @throws PortalException if a matching web content article could not be 845 found or if a portal exception occurred 846 * @throws SystemException if a system exception occurred 847 */ 848 public static com.liferay.portlet.journal.model.JournalArticle expireArticle( 849 long userId, long groupId, java.lang.String articleId, double version, 850 java.lang.String articleURL, 851 com.liferay.portal.service.ServiceContext serviceContext) 852 throws com.liferay.portal.kernel.exception.PortalException, 853 com.liferay.portal.kernel.exception.SystemException { 854 return getService() 855 .expireArticle(userId, groupId, articleId, version, 856 articleURL, serviceContext); 857 } 858 859 /** 860 * Expires the web content article matching the group and article ID, 861 * expiring all of its versions if the 862 * <code>journal.article.expire.all.versions</code> portal property is 863 * <code>true</code>, otherwise expiring only its latest approved version. 864 * 865 * @param userId the primary key of the user updating the web content 866 article 867 * @param groupId the primary key of the web content article's group 868 * @param articleId the primary key of the web content article 869 * @param articleURL the web content article's accessible URL 870 * @param serviceContext the service context to be applied. Can set the 871 modification date, status date, portlet preferences, and can set 872 whether to add the default command update for the web content 873 article. With respect to social activities, by setting the 874 service context's command to {@link 875 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 876 is considered a web content update activity; otherwise it is 877 considered a web content add activity. 878 * @throws PortalException if a matching web content article could not be 879 found or if a portal exception occurred 880 * @throws SystemException if a system exception occurred 881 */ 882 public static void expireArticle(long userId, long groupId, 883 java.lang.String articleId, java.lang.String articleURL, 884 com.liferay.portal.service.ServiceContext serviceContext) 885 throws com.liferay.portal.kernel.exception.PortalException, 886 com.liferay.portal.kernel.exception.SystemException { 887 getService() 888 .expireArticle(userId, groupId, articleId, articleURL, 889 serviceContext); 890 } 891 892 public static com.liferay.portlet.journal.model.JournalArticle fetchArticle( 893 long groupId, java.lang.String articleId) 894 throws com.liferay.portal.kernel.exception.SystemException { 895 return getService().fetchArticle(groupId, articleId); 896 } 897 898 /** 899 * Returns the web content article matching the group, article ID, and 900 * version. 901 * 902 * @param groupId the primary key of the web content article's group 903 * @param articleId the primary key of the web content article 904 * @param version the web content article's version 905 * @return the web content article matching the group, article ID, and 906 version, or <code>null</code> if no web content article could be 907 found 908 */ 909 public static com.liferay.portlet.journal.model.JournalArticle fetchArticle( 910 long groupId, java.lang.String articleId, double version) 911 throws com.liferay.portal.kernel.exception.SystemException { 912 return getService().fetchArticle(groupId, articleId, version); 913 } 914 915 public static com.liferay.portlet.journal.model.JournalArticle fetchArticleByUrlTitle( 916 long groupId, java.lang.String urlTitle) 917 throws com.liferay.portal.kernel.exception.SystemException { 918 return getService().fetchArticleByUrlTitle(groupId, urlTitle); 919 } 920 921 public static com.liferay.portlet.journal.model.JournalArticle fetchDisplayArticle( 922 long groupId, java.lang.String articleId) 923 throws com.liferay.portal.kernel.exception.SystemException { 924 return getService().fetchDisplayArticle(groupId, articleId); 925 } 926 927 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 928 long resourcePrimKey) 929 throws com.liferay.portal.kernel.exception.SystemException { 930 return getService().fetchLatestArticle(resourcePrimKey); 931 } 932 933 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 934 long resourcePrimKey, int status) 935 throws com.liferay.portal.kernel.exception.SystemException { 936 return getService().fetchLatestArticle(resourcePrimKey, status); 937 } 938 939 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 940 long resourcePrimKey, int[] statuses) 941 throws com.liferay.portal.kernel.exception.SystemException { 942 return getService().fetchLatestArticle(resourcePrimKey, statuses); 943 } 944 945 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 946 long resourcePrimKey, int status, boolean preferApproved) 947 throws com.liferay.portal.kernel.exception.SystemException { 948 return getService() 949 .fetchLatestArticle(resourcePrimKey, status, preferApproved); 950 } 951 952 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticle( 953 long groupId, java.lang.String articleId, int status) 954 throws com.liferay.portal.kernel.exception.SystemException { 955 return getService().fetchLatestArticle(groupId, articleId, status); 956 } 957 958 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestArticleByUrlTitle( 959 long groupId, java.lang.String urlTitle, int status) 960 throws com.liferay.portal.kernel.exception.SystemException { 961 return getService() 962 .fetchLatestArticleByUrlTitle(groupId, urlTitle, status); 963 } 964 965 /** 966 * Returns the latest indexable web content article matching the resource 967 * primary key. 968 * 969 * @param resourcePrimKey the primary key of the resource instance 970 * @return the latest indexable web content article matching the resource 971 primary key, or <code>null</code> if no matching web content 972 article could be found 973 */ 974 public static com.liferay.portlet.journal.model.JournalArticle fetchLatestIndexableArticle( 975 long resourcePrimKey) 976 throws com.liferay.portal.kernel.exception.SystemException { 977 return getService().fetchLatestIndexableArticle(resourcePrimKey); 978 } 979 980 /** 981 * Returns the web content article with the ID. 982 * 983 * @param id the primary key of the web content article 984 * @return the web content article with the ID 985 * @throws PortalException if a matching web content article could not be 986 found 987 * @throws SystemException if a system exception occurred 988 */ 989 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 990 long id) 991 throws com.liferay.portal.kernel.exception.PortalException, 992 com.liferay.portal.kernel.exception.SystemException { 993 return getService().getArticle(id); 994 } 995 996 /** 997 * Returns the latest approved web content article, or the latest unapproved 998 * article if none are approved. Both approved and unapproved articles must 999 * match the group and article ID. 1000 * 1001 * @param groupId the primary key of the web content article's group 1002 * @param articleId the primary key of the web content article 1003 * @return the matching web content article 1004 * @throws PortalException if a matching web content article could not be 1005 found 1006 * @throws SystemException if a system exception occurred 1007 */ 1008 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 1009 long groupId, java.lang.String articleId) 1010 throws com.liferay.portal.kernel.exception.PortalException, 1011 com.liferay.portal.kernel.exception.SystemException { 1012 return getService().getArticle(groupId, articleId); 1013 } 1014 1015 /** 1016 * Returns the web content article matching the group, article ID, and 1017 * version. 1018 * 1019 * @param groupId the primary key of the web content article's group 1020 * @param articleId the primary key of the web content article 1021 * @param version the web content article's version 1022 * @return the matching web content article 1023 * @throws PortalException if a matching web content article could not be 1024 found 1025 * @throws SystemException if a system exception occurred 1026 */ 1027 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 1028 long groupId, java.lang.String articleId, double version) 1029 throws com.liferay.portal.kernel.exception.PortalException, 1030 com.liferay.portal.kernel.exception.SystemException { 1031 return getService().getArticle(groupId, articleId, version); 1032 } 1033 1034 /** 1035 * Returns the web content article matching the group, class name, and class 1036 * PK. 1037 * 1038 * @param groupId the primary key of the web content article's group 1039 * @param className the DDMStructure class name if the web content article 1040 is related to a DDM structure, the primary key of the class name 1041 associated with the article, or {@link 1042 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1043 * @param classPK the primary key of the DDM structure, if the the 1044 DDMStructure class name is given as the <code>className</code> 1045 parameter, the primary key of the class associated with the web 1046 content article, or <code>0</code> otherwise 1047 * @return the matching web content article 1048 * @throws PortalException if a matching web content article could not be 1049 found 1050 * @throws SystemException if a system exception occurred 1051 */ 1052 public static com.liferay.portlet.journal.model.JournalArticle getArticle( 1053 long groupId, java.lang.String className, long classPK) 1054 throws com.liferay.portal.kernel.exception.PortalException, 1055 com.liferay.portal.kernel.exception.SystemException { 1056 return getService().getArticle(groupId, className, classPK); 1057 } 1058 1059 /** 1060 * Returns the latest web content article that is approved, or the latest 1061 * unapproved article if none are approved. Both approved and unapproved 1062 * articles must match the group and URL title. 1063 * 1064 * @param groupId the primary key of the web content article's group 1065 * @param urlTitle the web content article's accessible URL title 1066 * @return the matching web content article 1067 * @throws PortalException if a portal exception occurred 1068 * @throws SystemException if a system exception occurred 1069 */ 1070 public static com.liferay.portlet.journal.model.JournalArticle getArticleByUrlTitle( 1071 long groupId, java.lang.String urlTitle) 1072 throws com.liferay.portal.kernel.exception.PortalException, 1073 com.liferay.portal.kernel.exception.SystemException { 1074 return getService().getArticleByUrlTitle(groupId, urlTitle); 1075 } 1076 1077 /** 1078 * Returns the web content associated with the web content article and DDM 1079 * template. 1080 * 1081 * @param article the web content article 1082 * @param ddmTemplateKey the primary key of the web content article's DDM 1083 template (optionally <code>null</code>). If the article is 1084 related to a DDM structure, the template's structure must match 1085 it. 1086 * @param viewMode the mode in which the web content is being viewed 1087 * @param languageId the primary key of the language translation to get 1088 * @param themeDisplay the theme display 1089 * @return the web content associated with the DDM template 1090 * @throws PortalException if a matching DDM template could not be found or 1091 if a portal exception occurred 1092 * @throws SystemException if a system exception occurred 1093 */ 1094 public static java.lang.String getArticleContent( 1095 com.liferay.portlet.journal.model.JournalArticle article, 1096 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1097 java.lang.String languageId, 1098 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1099 throws com.liferay.portal.kernel.exception.PortalException, 1100 com.liferay.portal.kernel.exception.SystemException { 1101 return getService() 1102 .getArticleContent(article, ddmTemplateKey, viewMode, 1103 languageId, themeDisplay); 1104 } 1105 1106 /** 1107 * Returns the web content matching the group, article ID, and version, and 1108 * associated with the DDM template. 1109 * 1110 * @param groupId the primary key of the web content article's group 1111 * @param articleId the primary key of the web content article 1112 * @param version the web content article's version 1113 * @param viewMode the mode in which the web content is being viewed 1114 * @param ddmTemplateKey the primary key of the web content article's DDM 1115 template (optionally <code>null</code>). If the article is 1116 related to a DDM structure, the template's structure must match 1117 it. 1118 * @param languageId the primary key of the language translation to get 1119 * @param themeDisplay the theme display 1120 * @return the matching web content 1121 * @throws PortalException if a matching web content article or DDM template 1122 could not be found, or if a portal exception occurred 1123 * @throws SystemException if a system exception occurred 1124 */ 1125 public static java.lang.String getArticleContent(long groupId, 1126 java.lang.String articleId, double version, java.lang.String viewMode, 1127 java.lang.String ddmTemplateKey, java.lang.String languageId, 1128 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1129 throws com.liferay.portal.kernel.exception.PortalException, 1130 com.liferay.portal.kernel.exception.SystemException { 1131 return getService() 1132 .getArticleContent(groupId, articleId, version, viewMode, 1133 ddmTemplateKey, languageId, themeDisplay); 1134 } 1135 1136 /** 1137 * Returns the web content matching the group, article ID, and version. 1138 * 1139 * @param groupId the primary key of the web content article's group 1140 * @param articleId the primary key of the web content article 1141 * @param version the web content article's version 1142 * @param viewMode the mode in which the web content is being viewed 1143 * @param languageId the primary key of the language translation to get 1144 * @param themeDisplay the theme display 1145 * @return the matching web content 1146 * @throws PortalException if a matching web content article or DDM template 1147 could not be found, or if a portal exception occurred 1148 * @throws SystemException if a system exception occurred 1149 */ 1150 public static java.lang.String getArticleContent(long groupId, 1151 java.lang.String articleId, double version, java.lang.String viewMode, 1152 java.lang.String languageId, 1153 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1154 throws com.liferay.portal.kernel.exception.PortalException, 1155 com.liferay.portal.kernel.exception.SystemException { 1156 return getService() 1157 .getArticleContent(groupId, articleId, version, viewMode, 1158 languageId, themeDisplay); 1159 } 1160 1161 /** 1162 * Returns the latest web content matching the group and article ID, and 1163 * associated with DDM template key. 1164 * 1165 * @param groupId the primary key of the web content article's group 1166 * @param articleId the primary key of the web content article 1167 * @param viewMode the mode in which the web content is being viewed 1168 * @param ddmTemplateKey the primary key of the web content article's DDM 1169 template (optionally <code>null</code>). If the article is 1170 related to a DDM structure, the template's structure must match 1171 it. 1172 * @param languageId the primary key of the language translation to get 1173 * @param themeDisplay the theme display 1174 * @return the matching web content 1175 * @throws PortalException if a matching web content article or DDM template 1176 could not be found, or if a portal exception occurred 1177 * @throws SystemException if a system exception occurred 1178 */ 1179 public static java.lang.String getArticleContent(long groupId, 1180 java.lang.String articleId, java.lang.String viewMode, 1181 java.lang.String ddmTemplateKey, java.lang.String languageId, 1182 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1183 throws com.liferay.portal.kernel.exception.PortalException, 1184 com.liferay.portal.kernel.exception.SystemException { 1185 return getService() 1186 .getArticleContent(groupId, articleId, viewMode, 1187 ddmTemplateKey, languageId, themeDisplay); 1188 } 1189 1190 /** 1191 * Returns the latest web content matching the group and article ID. 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 viewMode the mode in which the web content is being viewed 1196 * @param languageId the primary key of the language translation to get 1197 * @param themeDisplay the theme display 1198 * @return the matching web content 1199 * @throws PortalException if a matching web content article or DDM template 1200 could not be found, or if a portal exception occurred 1201 * @throws SystemException if a system exception occurred 1202 */ 1203 public static java.lang.String getArticleContent(long groupId, 1204 java.lang.String articleId, java.lang.String viewMode, 1205 java.lang.String languageId, 1206 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1207 throws com.liferay.portal.kernel.exception.PortalException, 1208 com.liferay.portal.kernel.exception.SystemException { 1209 return getService() 1210 .getArticleContent(groupId, articleId, viewMode, languageId, 1211 themeDisplay); 1212 } 1213 1214 /** 1215 * Returns a web content article display for the specified page of the 1216 * latest version of the web content article, optionally based on the DDM 1217 * template if the article is template driven. If the article is template 1218 * driven, web content transformation tokens are added from the theme 1219 * display (if not <code>null</code>) or the XML request otherwise. 1220 * 1221 * @param article the web content article 1222 * @param ddmTemplateKey the primary key of the web content article's DDM 1223 template (optionally <code>null</code>). If the article is 1224 related to a DDM structure, the template's structure must match 1225 it. 1226 * @param viewMode the mode in which the web content is being viewed 1227 * @param languageId the primary key of the language translation to get 1228 * @param page the web content's page number. Page numbers start at 1229 <code>1</code>. 1230 * @param xmlRequest the request that serializes the web content into a 1231 hierarchical hash map (optionally <code>null</code>) 1232 * @param themeDisplay the theme display 1233 * @return the web content article display 1234 * @throws PortalException if a matching DDM template could not be found or 1235 if a portal exception occurred 1236 * @throws SystemException if a system exception occurred 1237 */ 1238 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1239 com.liferay.portlet.journal.model.JournalArticle article, 1240 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1241 java.lang.String languageId, int page, java.lang.String xmlRequest, 1242 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1243 throws com.liferay.portal.kernel.exception.PortalException, 1244 com.liferay.portal.kernel.exception.SystemException { 1245 return getService() 1246 .getArticleDisplay(article, ddmTemplateKey, viewMode, 1247 languageId, page, xmlRequest, themeDisplay); 1248 } 1249 1250 /** 1251 * Returns a web content article display for the first page of the specified 1252 * version of the web content article, optionally based on the DDM template 1253 * if the article is template driven. If the article is template driven, web 1254 * content transformation tokens are added from the theme display (if not 1255 * <code>null</code>) or the XML request otherwise. 1256 * 1257 * @param groupId the primary key of the web content article's group 1258 * @param articleId the primary key of the web content article 1259 * @param version the web content article's version 1260 * @param ddmTemplateKey the primary key of the web content article's DDM 1261 template (optionally <code>null</code>). If the article is 1262 related to a DDM structure, the template's structure must match 1263 it. 1264 * @param viewMode the mode in which the web content is being viewed 1265 * @param languageId the primary key of the language translation to get 1266 * @param page the web content's page number 1267 * @param xmlRequest the request that serializes the web content into a 1268 hierarchical hash map 1269 * @param themeDisplay the theme display 1270 * @return the web content article display, or <code>null</code> if the 1271 article has expired or if article's display date/time is after 1272 the current date/time 1273 * @throws PortalException if a matching web content article or DDM template 1274 could not be found, or if a portal exception occurred 1275 * @throws SystemException if a system exception occurred 1276 */ 1277 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1278 long groupId, java.lang.String articleId, double version, 1279 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1280 java.lang.String languageId, int page, java.lang.String xmlRequest, 1281 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1282 throws com.liferay.portal.kernel.exception.PortalException, 1283 com.liferay.portal.kernel.exception.SystemException { 1284 return getService() 1285 .getArticleDisplay(groupId, articleId, version, 1286 ddmTemplateKey, viewMode, languageId, page, xmlRequest, themeDisplay); 1287 } 1288 1289 /** 1290 * Returns a web content article display for the first page of the specified 1291 * version of the web content article matching the group and article ID, 1292 * optionally based on the DDM template if the article is template driven. 1293 * If the article is template driven, web content transformation tokens are 1294 * added from the theme display (if not <code>null</code>). 1295 * 1296 * @param groupId the primary key of the web content article's group 1297 * @param articleId the primary key of the web content article 1298 * @param version the web content article's version 1299 * @param ddmTemplateKey the primary key of the web content article's DDM 1300 template (optionally <code>null</code>). If the article is 1301 related to a DDM structure, the template's structure must match 1302 it. 1303 * @param viewMode the mode in which the web content is being viewed 1304 * @param languageId the primary key of the language translation to get 1305 * @param themeDisplay the theme display 1306 * @return the web content article display, or <code>null</code> if the 1307 article has expired or if article's display date/time is after 1308 the current date/time 1309 * @throws PortalException if a matching web content article or DDM template 1310 could not be found, or if a portal exception occurred 1311 * @throws SystemException if a system exception occurred 1312 */ 1313 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1314 long groupId, java.lang.String articleId, double version, 1315 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1316 java.lang.String languageId, 1317 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1318 throws com.liferay.portal.kernel.exception.PortalException, 1319 com.liferay.portal.kernel.exception.SystemException { 1320 return getService() 1321 .getArticleDisplay(groupId, articleId, version, 1322 ddmTemplateKey, viewMode, languageId, themeDisplay); 1323 } 1324 1325 /** 1326 * Returns a web content article display for the first page of the latest 1327 * version of the web content article matching the group and article ID. If 1328 * the article is template driven, web content transformation tokens are 1329 * added from the theme display (if not <code>null</code>) or the XML 1330 * request otherwise. 1331 * 1332 * @param groupId the primary key of the web content article's group 1333 * @param articleId the primary key of the web content article 1334 * @param viewMode the mode in which the web content is being viewed 1335 * @param languageId the primary key of the language translation to get 1336 * @param page the web content's page number 1337 * @param xmlRequest the request that serializes the web content into a 1338 hierarchical hash map 1339 * @param themeDisplay the theme display 1340 * @return the web content article display, or <code>null</code> if the 1341 article has expired or if article's display date/time is after 1342 the current date/time 1343 * @throws PortalException if a matching web content article or DDM template 1344 could not be found, or if a portal exception occurred 1345 * @throws SystemException if a system exception occurred 1346 */ 1347 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1348 long groupId, java.lang.String articleId, java.lang.String viewMode, 1349 java.lang.String languageId, int page, java.lang.String xmlRequest, 1350 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1351 throws com.liferay.portal.kernel.exception.PortalException, 1352 com.liferay.portal.kernel.exception.SystemException { 1353 return getService() 1354 .getArticleDisplay(groupId, articleId, viewMode, languageId, 1355 page, xmlRequest, themeDisplay); 1356 } 1357 1358 /** 1359 * Returns a web content article display for the specified page of the 1360 * latest version of the web content article matching the group and article 1361 * ID, optionally based on the DDM template if the article is template 1362 * driven. If the article is template driven, web content transformation 1363 * tokens are added from the theme display (if not <code>null</code>) or the 1364 * XML request otherwise. 1365 * 1366 * @param groupId the primary key of the web content article's group 1367 * @param articleId the primary key of the web content article 1368 * @param ddmTemplateKey the primary key of the web content article's DDM 1369 template (optionally <code>null</code>). If the article is 1370 related to a DDM structure, the template's structure must match 1371 it. 1372 * @param viewMode the mode in which the web content is being viewed 1373 * @param languageId the primary key of the language translation to get 1374 * @param page the web content's page number 1375 * @param xmlRequest the request that serializes the web content into a 1376 hierarchical hash map 1377 * @param themeDisplay the theme display 1378 * @return the web content article display, or <code>null</code> if the 1379 article has expired or if article's display date/time is after 1380 the current date/time 1381 * @throws PortalException if a matching web content article or DDM template 1382 could not be found, or if a portal exception occurred 1383 * @throws SystemException if a system exception occurred 1384 */ 1385 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1386 long groupId, java.lang.String articleId, 1387 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1388 java.lang.String languageId, int page, java.lang.String xmlRequest, 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, ddmTemplateKey, 1394 viewMode, languageId, page, xmlRequest, themeDisplay); 1395 } 1396 1397 /** 1398 * Returns a web content article display for the first page of the latest 1399 * version of the web content article matching the group and article ID, 1400 * optionally based on the DDM template if the article is template driven. 1401 * If the article is template driven, web content transformation tokens are 1402 * added from the theme display (if not <code>null</code>). 1403 * 1404 * @param groupId the primary key of the web content article's group 1405 * @param articleId the primary key of the web content article 1406 * @param ddmTemplateKey the primary key of the web content article's DDM 1407 template (optionally <code>null</code>). If the article is 1408 related to a DDM structure, the template's structure must match 1409 it. 1410 * @param viewMode the mode in which the web content is being viewed 1411 * @param languageId the primary key of the language translation to get 1412 * @param themeDisplay the theme display 1413 * @return the web content article display, or <code>null</code> if the 1414 article has expired or if article's display date/time is after 1415 the current date/time 1416 * @throws PortalException if a matching web content article or DDM template 1417 could not be found, or if a portal exception occurred 1418 * @throws SystemException if a system exception occurred 1419 */ 1420 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1421 long groupId, java.lang.String articleId, 1422 java.lang.String ddmTemplateKey, java.lang.String viewMode, 1423 java.lang.String languageId, 1424 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1425 throws com.liferay.portal.kernel.exception.PortalException, 1426 com.liferay.portal.kernel.exception.SystemException { 1427 return getService() 1428 .getArticleDisplay(groupId, articleId, ddmTemplateKey, 1429 viewMode, languageId, themeDisplay); 1430 } 1431 1432 /** 1433 * Returns a web content article display for the first page of the latest 1434 * version of the web content article matching the group and article ID. If 1435 * the article is template driven, web content transformation tokens are 1436 * added from the theme display (if not <code>null</code>). 1437 * 1438 * @param groupId the primary key of the web content article's group 1439 * @param articleId the primary key of the web content article 1440 * @param viewMode the mode in which the web content is being viewed 1441 * @param languageId the primary key of the language translation to get 1442 * @param themeDisplay the theme display 1443 * @return the web content article display, or <code>null</code> if the 1444 article has expired or if article's display date/time is after 1445 the current date/time 1446 * @throws PortalException if a matching web content article or DDM template 1447 could not be found, or if a portal exception occurred 1448 * @throws SystemException if a system exception occurred 1449 */ 1450 public static com.liferay.portlet.journal.model.JournalArticleDisplay getArticleDisplay( 1451 long groupId, java.lang.String articleId, java.lang.String viewMode, 1452 java.lang.String languageId, 1453 com.liferay.portal.theme.ThemeDisplay themeDisplay) 1454 throws com.liferay.portal.kernel.exception.PortalException, 1455 com.liferay.portal.kernel.exception.SystemException { 1456 return getService() 1457 .getArticleDisplay(groupId, articleId, viewMode, languageId, 1458 themeDisplay); 1459 } 1460 1461 /** 1462 * Returns all the web content articles present in the system. 1463 * 1464 * @return the web content articles present in the system 1465 * @throws SystemException if a system exception occurred 1466 */ 1467 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles() 1468 throws com.liferay.portal.kernel.exception.SystemException { 1469 return getService().getArticles(); 1470 } 1471 1472 /** 1473 * Returns all the web content articles belonging to the group. 1474 * 1475 * @param groupId the primary key of the web content article's group 1476 * @return the web content articles belonging to the group 1477 * @throws SystemException if a system exception occurred 1478 */ 1479 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1480 long groupId) 1481 throws com.liferay.portal.kernel.exception.SystemException { 1482 return getService().getArticles(groupId); 1483 } 1484 1485 /** 1486 * Returns a range of all the web content articles belonging to the group. 1487 * 1488 * <p> 1489 * Useful when paginating results. Returns a maximum of <code>end - 1490 * start</code> instances. <code>start</code> and <code>end</code> are not 1491 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1492 * refers to the first result in the set. Setting both <code>start</code> 1493 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1494 * result set. 1495 * </p> 1496 * 1497 * @param groupId the primary key of the web content article's group 1498 * @param start the lower bound of the range of web content articles to 1499 return 1500 * @param end the upper bound of the range of web content articles to 1501 return (not inclusive) 1502 * @return the range of matching web content articles 1503 * @throws SystemException if a system exception occurred 1504 */ 1505 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1506 long groupId, int start, int end) 1507 throws com.liferay.portal.kernel.exception.SystemException { 1508 return getService().getArticles(groupId, start, end); 1509 } 1510 1511 /** 1512 * Returns an ordered range of all the web content articles belonging to the 1513 * group. 1514 * 1515 * <p> 1516 * Useful when paginating results. Returns a maximum of <code>end - 1517 * start</code> instances. <code>start</code> and <code>end</code> are not 1518 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1519 * refers to the first result in the set. Setting both <code>start</code> 1520 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1521 * result set. 1522 * </p> 1523 * 1524 * @param groupId the primary key of the web content article's group 1525 * @param start the lower bound of the range of web content articles to 1526 return 1527 * @param end the upper bound of the range of web content articles to 1528 return (not inclusive) 1529 * @param obc the comparator to order the web content articles 1530 * @return the range of matching web content articles ordered by the 1531 comparator 1532 * @throws SystemException if a system exception occurred 1533 */ 1534 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1535 long groupId, int start, int end, 1536 com.liferay.portal.kernel.util.OrderByComparator obc) 1537 throws com.liferay.portal.kernel.exception.SystemException { 1538 return getService().getArticles(groupId, start, end, obc); 1539 } 1540 1541 /** 1542 * Returns all the web content articles matching the group and folder. 1543 * 1544 * @param groupId the primary key of the web content article's group 1545 * @param folderId the primary key of the web content article folder 1546 * @return the matching web content articles 1547 * @throws SystemException if a system exception occurred 1548 */ 1549 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1550 long groupId, long folderId) 1551 throws com.liferay.portal.kernel.exception.SystemException { 1552 return getService().getArticles(groupId, folderId); 1553 } 1554 1555 /** 1556 * Returns a range of all the web content articles matching the group and 1557 * folder. 1558 * 1559 * <p> 1560 * Useful when paginating results. Returns a maximum of <code>end - 1561 * start</code> instances. <code>start</code> and <code>end</code> are not 1562 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1563 * refers to the first result in the set. Setting both <code>start</code> 1564 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1565 * result set. 1566 * </p> 1567 * 1568 * @param groupId the primary key of the web content article's group 1569 * @param folderId the primary key of the web content article's folder 1570 * @param start the lower bound of the range of web content articles to 1571 return 1572 * @param end the upper bound of the range of web content articles to 1573 return (not inclusive) 1574 * @return the range of matching web content articles 1575 * @throws SystemException if a system exception occurred 1576 */ 1577 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1578 long groupId, long folderId, int start, int end) 1579 throws com.liferay.portal.kernel.exception.SystemException { 1580 return getService().getArticles(groupId, folderId, start, end); 1581 } 1582 1583 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1584 long groupId, long folderId, int status, int start, int end) 1585 throws com.liferay.portal.kernel.exception.SystemException { 1586 return getService().getArticles(groupId, folderId, status, start, end); 1587 } 1588 1589 /** 1590 * Returns an ordered range of all the web content articles matching the 1591 * group and folder. 1592 * 1593 * <p> 1594 * Useful when paginating results. Returns a maximum of <code>end - 1595 * start</code> instances. <code>start</code> and <code>end</code> are not 1596 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1597 * refers to the first result in the set. Setting both <code>start</code> 1598 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1599 * result set. 1600 * </p> 1601 * 1602 * @param groupId the primary key of the web content article's group 1603 * @param folderId the primary key of the web content article's folder 1604 * @param start the lower bound of the range of web content articles to 1605 return 1606 * @param end the upper bound of the range of web content articles to 1607 return (not inclusive) 1608 * @param orderByComparator the comparator to order the web content 1609 articles 1610 * @return the range of matching web content articles ordered by the 1611 comparator 1612 * @throws SystemException if a system exception occurred 1613 */ 1614 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1615 long groupId, long folderId, int start, int end, 1616 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1617 throws com.liferay.portal.kernel.exception.SystemException { 1618 return getService() 1619 .getArticles(groupId, folderId, start, end, orderByComparator); 1620 } 1621 1622 /** 1623 * Returns all the web content articles matching the group and article ID. 1624 * 1625 * @param groupId the primary key of the web content article's group 1626 * @param articleId the primary key of the web content article 1627 * @return the matching web content articles 1628 * @throws SystemException if a system exception occurred 1629 */ 1630 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1631 long groupId, java.lang.String articleId) 1632 throws com.liferay.portal.kernel.exception.SystemException { 1633 return getService().getArticles(groupId, articleId); 1634 } 1635 1636 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticles( 1637 long groupId, java.lang.String articleId, int start, int end, 1638 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1639 throws com.liferay.portal.kernel.exception.SystemException { 1640 return getService() 1641 .getArticles(groupId, articleId, start, end, 1642 orderByComparator); 1643 } 1644 1645 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesByResourcePrimKey( 1646 long resourcePrimKey) 1647 throws com.liferay.portal.kernel.exception.SystemException { 1648 return getService().getArticlesByResourcePrimKey(resourcePrimKey); 1649 } 1650 1651 /** 1652 * Returns all the web content articles matching the small image ID. 1653 * 1654 * @param smallImageId the primary key of the web content article's small 1655 image 1656 * @return the web content articles matching the small image ID 1657 * @throws SystemException if a system exception occurred 1658 */ 1659 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getArticlesBySmallImageId( 1660 long smallImageId) 1661 throws com.liferay.portal.kernel.exception.SystemException { 1662 return getService().getArticlesBySmallImageId(smallImageId); 1663 } 1664 1665 /** 1666 * Returns the number of web content articles belonging to the group. 1667 * 1668 * @param groupId the primary key of the web content article's group 1669 * @return the number of web content articles belonging to the group 1670 * @throws SystemException if a system exception occurred 1671 */ 1672 public static int getArticlesCount(long groupId) 1673 throws com.liferay.portal.kernel.exception.SystemException { 1674 return getService().getArticlesCount(groupId); 1675 } 1676 1677 /** 1678 * Returns the number of web content articles matching the group and folder. 1679 * 1680 * @param groupId the primary key of the web content article's group 1681 * @param folderId the primary key of the web content article's folder 1682 * @return the number of matching web content articles 1683 * @throws SystemException if a system exception occurred 1684 */ 1685 public static int getArticlesCount(long groupId, long folderId) 1686 throws com.liferay.portal.kernel.exception.SystemException { 1687 return getService().getArticlesCount(groupId, folderId); 1688 } 1689 1690 public static int getArticlesCount(long groupId, long folderId, int status) 1691 throws com.liferay.portal.kernel.exception.SystemException { 1692 return getService().getArticlesCount(groupId, folderId, status); 1693 } 1694 1695 public static int getArticlesCount(long groupId, java.lang.String articleId) 1696 throws com.liferay.portal.kernel.exception.SystemException { 1697 return getService().getArticlesCount(groupId, articleId); 1698 } 1699 1700 /** 1701 * Returns an ordered range of all the web content articles matching the 1702 * company, version, and workflow status. 1703 * 1704 * <p> 1705 * Useful when paginating results. Returns a maximum of <code>end - 1706 * start</code> instances. <code>start</code> and <code>end</code> are not 1707 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1708 * refers to the first result in the set. Setting both <code>start</code> 1709 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1710 * result set. 1711 * </p> 1712 * 1713 * @param companyId the primary key of the web content article's company 1714 * @param version the web content article's version 1715 * @param status the web content article's workflow status. For more 1716 information see {@link WorkflowConstants} for constants starting 1717 with the "STATUS_" prefix. 1718 * @param start the lower bound of the range of web content articles to 1719 return 1720 * @param end the upper bound of the range of web content articles to 1721 return (not inclusive) 1722 * @return the range of matching web content articles ordered by article ID 1723 * @throws SystemException if a system exception occurred 1724 */ 1725 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles( 1726 long companyId, double version, int status, int start, int end) 1727 throws com.liferay.portal.kernel.exception.SystemException { 1728 return getService() 1729 .getCompanyArticles(companyId, version, status, start, end); 1730 } 1731 1732 /** 1733 * Returns an ordered range of all the web content articles matching the 1734 * company and workflow status. 1735 * 1736 * <p> 1737 * Useful when paginating results. Returns a maximum of <code>end - 1738 * start</code> instances. <code>start</code> and <code>end</code> are not 1739 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1740 * refers to the first result in the set. Setting both <code>start</code> 1741 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1742 * result set. 1743 * </p> 1744 * 1745 * @param companyId the primary key of the web content article's company 1746 * @param status the web content article's workflow status. For more 1747 information see {@link WorkflowConstants} for constants starting 1748 with the "STATUS_" prefix. 1749 * @param start the lower bound of the range of web content articles to 1750 return 1751 * @param end the upper bound of the range of web content articles to 1752 return (not inclusive) 1753 * @return the range of matching web content articles ordered by article ID 1754 * @throws SystemException if a system exception occurred 1755 */ 1756 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getCompanyArticles( 1757 long companyId, int status, int start, int end) 1758 throws com.liferay.portal.kernel.exception.SystemException { 1759 return getService().getCompanyArticles(companyId, status, start, end); 1760 } 1761 1762 /** 1763 * Returns the number of web content articles matching the company, version, 1764 * and workflow status. 1765 * 1766 * <p> 1767 * Useful when paginating results. Returns a maximum of <code>end - 1768 * start</code> instances. <code>start</code> and <code>end</code> are not 1769 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1770 * refers to the first result in the set. Setting both <code>start</code> 1771 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 1772 * result set. 1773 * </p> 1774 * 1775 * @param companyId the primary key of the web content article's company 1776 * @param version the web content article's version 1777 * @param status the web content article's workflow status. For more 1778 information see {@link WorkflowConstants} for constants starting 1779 with the "STATUS_" prefix. 1780 * @param start the lower bound of the range of web content articles to 1781 return 1782 * @param end the upper bound of the range of web content articles to 1783 return (not inclusive) 1784 * @return the number of matching web content articles 1785 * @throws SystemException if a system exception occurred 1786 */ 1787 public static int getCompanyArticlesCount(long companyId, double version, 1788 int status, int start, int end) 1789 throws com.liferay.portal.kernel.exception.SystemException { 1790 return getService() 1791 .getCompanyArticlesCount(companyId, version, status, start, 1792 end); 1793 } 1794 1795 /** 1796 * Returns the number of web content articles matching the company and 1797 * workflow status. 1798 * 1799 * @param companyId the primary key of the web content article's company 1800 * @param status the web content article's workflow status. For more 1801 information see {@link WorkflowConstants} for constants starting 1802 with the "STATUS_" prefix. 1803 * @return the number of matching web content articles 1804 * @throws SystemException if a system exception occurred 1805 */ 1806 public static int getCompanyArticlesCount(long companyId, int status) 1807 throws com.liferay.portal.kernel.exception.SystemException { 1808 return getService().getCompanyArticlesCount(companyId, status); 1809 } 1810 1811 /** 1812 * Returns the matching web content article currently displayed or next to 1813 * be displayed if no article is currently displayed. 1814 * 1815 * @param groupId the primary key of the web content article's group 1816 * @param articleId the primary key of the web content article 1817 * @return the matching web content article currently displayed, or the next 1818 one to be displayed if no version of the article is currently 1819 displayed 1820 * @throws PortalException if no approved matching web content articles 1821 could be found 1822 * @throws SystemException if a system exception occurred 1823 */ 1824 public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticle( 1825 long groupId, java.lang.String articleId) 1826 throws com.liferay.portal.kernel.exception.PortalException, 1827 com.liferay.portal.kernel.exception.SystemException { 1828 return getService().getDisplayArticle(groupId, articleId); 1829 } 1830 1831 /** 1832 * Returns the web content article matching the URL title that is currently 1833 * displayed or next to be displayed if no article is currently displayed. 1834 * 1835 * @param groupId the primary key of the web content article's group 1836 * @param urlTitle the web content article's accessible URL title 1837 * @return the web content article matching the URL title that is currently 1838 displayed, or next one to be displayed if no version of the 1839 article is currently displayed 1840 * @throws PortalException if no approved matching web content articles 1841 could be found 1842 * @throws SystemException if a system exception occurred 1843 */ 1844 public static com.liferay.portlet.journal.model.JournalArticle getDisplayArticleByUrlTitle( 1845 long groupId, java.lang.String urlTitle) 1846 throws com.liferay.portal.kernel.exception.PortalException, 1847 com.liferay.portal.kernel.exception.SystemException { 1848 return getService().getDisplayArticleByUrlTitle(groupId, urlTitle); 1849 } 1850 1851 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getIndexableArticlesByDDMStructureKey( 1852 java.lang.String[] ddmStructureKeys) 1853 throws com.liferay.portal.kernel.exception.SystemException { 1854 return getService() 1855 .getIndexableArticlesByDDMStructureKey(ddmStructureKeys); 1856 } 1857 1858 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getIndexableArticlesByResourcePrimKey( 1859 long resourcePrimKey) 1860 throws com.liferay.portal.kernel.exception.SystemException { 1861 return getService() 1862 .getIndexableArticlesByResourcePrimKey(resourcePrimKey); 1863 } 1864 1865 /** 1866 * Returns the latest web content article matching the resource primary key, 1867 * preferring articles with approved workflow status. 1868 * 1869 * @param resourcePrimKey the primary key of the resource instance 1870 * @return the latest web content article matching the resource primary key, 1871 preferring articles with approved workflow status 1872 * @throws PortalException if a matching web content article could not be 1873 found 1874 * @throws SystemException if a system exception occurred 1875 */ 1876 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1877 long resourcePrimKey) 1878 throws com.liferay.portal.kernel.exception.PortalException, 1879 com.liferay.portal.kernel.exception.SystemException { 1880 return getService().getLatestArticle(resourcePrimKey); 1881 } 1882 1883 /** 1884 * Returns the latest web content article matching the resource primary key 1885 * and workflow status, preferring articles with approved workflow status. 1886 * 1887 * @param resourcePrimKey the primary key of the resource instance 1888 * @param status the web content article's workflow status. For more 1889 information see {@link WorkflowConstants} for constants starting 1890 with the "STATUS_" prefix. 1891 * @return the latest web content article matching the resource primary key 1892 and workflow status, preferring articles with approved workflow 1893 status 1894 * @throws PortalException if a matching web content article could not be 1895 found 1896 * @throws SystemException if a system exception occurred 1897 */ 1898 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1899 long resourcePrimKey, int status) 1900 throws com.liferay.portal.kernel.exception.PortalException, 1901 com.liferay.portal.kernel.exception.SystemException { 1902 return getService().getLatestArticle(resourcePrimKey, status); 1903 } 1904 1905 /** 1906 * Returns the latest web content article matching the resource primary key 1907 * and workflow status, optionally preferring articles with approved 1908 * workflow status. 1909 * 1910 * @param resourcePrimKey the primary key of the resource instance 1911 * @param status the web content article's workflow status. For more 1912 information see {@link WorkflowConstants} for constants starting 1913 with the "STATUS_" prefix. 1914 * @param preferApproved whether to prefer returning the latest matching 1915 article that has workflow status {@link 1916 WorkflowConstants#STATUS_APPROVED} over returning one that has a 1917 different status 1918 * @return the latest web content article matching the resource primary key 1919 and workflow status, optionally preferring articles with approved 1920 workflow status 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 getLatestArticle( 1926 long resourcePrimKey, int status, boolean preferApproved) 1927 throws com.liferay.portal.kernel.exception.PortalException, 1928 com.liferay.portal.kernel.exception.SystemException { 1929 return getService() 1930 .getLatestArticle(resourcePrimKey, status, preferApproved); 1931 } 1932 1933 /** 1934 * Returns the latest web content article with the group and 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 matching web content article 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 com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1944 long groupId, java.lang.String articleId) 1945 throws com.liferay.portal.kernel.exception.PortalException, 1946 com.liferay.portal.kernel.exception.SystemException { 1947 return getService().getLatestArticle(groupId, articleId); 1948 } 1949 1950 /** 1951 * Returns the latest web content article matching the group, article ID, 1952 * 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 matching web content article 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 com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1965 long groupId, java.lang.String articleId, int status) 1966 throws com.liferay.portal.kernel.exception.PortalException, 1967 com.liferay.portal.kernel.exception.SystemException { 1968 return getService().getLatestArticle(groupId, articleId, status); 1969 } 1970 1971 /** 1972 * Returns the latest web content article matching the group, class name ID, 1973 * and class PK. 1974 * 1975 * @param groupId the primary key of the web content article's group 1976 * @param className the DDMStructure class name if the web content article 1977 is related to a DDM structure, the class name associated with the 1978 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1979 otherwise 1980 * @param classPK the primary key of the DDM structure, if the DDMStructure 1981 class name is given as the <code>className</code> parameter, the 1982 primary key of the class associated with the web content article, 1983 or <code>0</code> otherwise 1984 * @return the latest matching web content article 1985 * @throws PortalException if a matching web content article could not be 1986 found 1987 * @throws SystemException if a system exception occurred 1988 */ 1989 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticle( 1990 long groupId, java.lang.String className, long classPK) 1991 throws com.liferay.portal.kernel.exception.PortalException, 1992 com.liferay.portal.kernel.exception.SystemException { 1993 return getService().getLatestArticle(groupId, className, classPK); 1994 } 1995 1996 /** 1997 * Returns the latest web content article matching the group, URL title, and 1998 * workflow status. 1999 * 2000 * @param groupId the primary key of the web content article's group 2001 * @param urlTitle the web content article's accessible URL title 2002 * @param status the web content article's workflow status. For more 2003 information see {@link WorkflowConstants} for constants starting 2004 with the "STATUS_" prefix. 2005 * @return the latest matching web content article 2006 * @throws PortalException if a matching web content article could not be 2007 found 2008 * @throws SystemException if a system exception occurred 2009 */ 2010 public static com.liferay.portlet.journal.model.JournalArticle getLatestArticleByUrlTitle( 2011 long groupId, java.lang.String urlTitle, int status) 2012 throws com.liferay.portal.kernel.exception.PortalException, 2013 com.liferay.portal.kernel.exception.SystemException { 2014 return getService().getLatestArticleByUrlTitle(groupId, urlTitle, status); 2015 } 2016 2017 /** 2018 * Returns the latest version number of the web content with the group and 2019 * article ID. 2020 * 2021 * @param groupId the primary key of the web content article's group 2022 * @param articleId the primary key of the web content article 2023 * @return the latest version number of the matching web content 2024 * @throws PortalException if a matching web content article could not be 2025 found 2026 * @throws SystemException if a system exception occurred 2027 */ 2028 public static double getLatestVersion(long groupId, 2029 java.lang.String articleId) 2030 throws com.liferay.portal.kernel.exception.PortalException, 2031 com.liferay.portal.kernel.exception.SystemException { 2032 return getService().getLatestVersion(groupId, articleId); 2033 } 2034 2035 /** 2036 * Returns the latest version number of the web content with the group, 2037 * article ID, and workflow status. 2038 * 2039 * @param groupId the primary key of the web content article's group 2040 * @param articleId the primary key of the web content article 2041 * @param status the web content article's workflow status. For more 2042 information see {@link WorkflowConstants} for constants starting 2043 with the "STATUS_" prefix. 2044 * @return the latest version number of the matching web content 2045 * @throws PortalException if a matching web content article could not be 2046 found 2047 * @throws SystemException if a system exception occurred 2048 */ 2049 public static double getLatestVersion(long groupId, 2050 java.lang.String articleId, int status) 2051 throws com.liferay.portal.kernel.exception.PortalException, 2052 com.liferay.portal.kernel.exception.SystemException { 2053 return getService().getLatestVersion(groupId, articleId, status); 2054 } 2055 2056 /** 2057 * Returns the number of web content articles that are not recycled. 2058 * 2059 * @param groupId the primary key of the web content article's group 2060 * @param folderId the primary key of the web content article folder 2061 * @return the number of web content articles that are not recycled 2062 * @throws SystemException if a system exception occurred 2063 */ 2064 public static int getNotInTrashArticlesCount(long groupId, long folderId) 2065 throws com.liferay.portal.kernel.exception.SystemException { 2066 return getService().getNotInTrashArticlesCount(groupId, folderId); 2067 } 2068 2069 public static com.liferay.portlet.journal.model.JournalArticle getOldestArticle( 2070 long groupId, java.lang.String articleId) 2071 throws com.liferay.portal.kernel.exception.PortalException, 2072 com.liferay.portal.kernel.exception.SystemException { 2073 return getService().getOldestArticle(groupId, articleId); 2074 } 2075 2076 public static com.liferay.portlet.journal.model.JournalArticle getOldestArticle( 2077 long groupId, java.lang.String articleId, int status) 2078 throws com.liferay.portal.kernel.exception.PortalException, 2079 com.liferay.portal.kernel.exception.SystemException { 2080 return getService().getOldestArticle(groupId, articleId, status); 2081 } 2082 2083 /** 2084 * Returns the web content articles matching the group and DDM structure 2085 * key. 2086 * 2087 * @param groupId the primary key of the web content article's group 2088 * @param ddmStructureKey the primary key of the web content article's DDM 2089 structure 2090 * @return the matching web content articles 2091 * @throws SystemException if a system exception occurred 2092 */ 2093 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2094 long groupId, java.lang.String ddmStructureKey) 2095 throws com.liferay.portal.kernel.exception.SystemException { 2096 return getService().getStructureArticles(groupId, ddmStructureKey); 2097 } 2098 2099 /** 2100 * Returns an ordered range of all the web content articles matching the 2101 * group and DDM structure key. 2102 * 2103 * <p> 2104 * Useful when paginating results. Returns a maximum of <code>end - 2105 * start</code> instances. <code>start</code> and <code>end</code> are not 2106 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2107 * refers to the first result in the set. Setting both <code>start</code> 2108 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2109 * result set. 2110 * </p> 2111 * 2112 * @param groupId the primary key of the web content article's group 2113 * @param ddmStructureKey the primary key of the web content article's DDM 2114 structure 2115 * @param start the lower bound of the range of web content articles to 2116 return 2117 * @param end the upper bound of the range of web content articles to 2118 return (not inclusive) 2119 * @param obc the comparator to order the web content articles 2120 * @return the range of matching web content articles ordered by the 2121 comparator 2122 * @throws SystemException if a system exception occurred 2123 */ 2124 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2125 long groupId, java.lang.String ddmStructureKey, int start, int end, 2126 com.liferay.portal.kernel.util.OrderByComparator obc) 2127 throws com.liferay.portal.kernel.exception.SystemException { 2128 return getService() 2129 .getStructureArticles(groupId, ddmStructureKey, start, end, 2130 obc); 2131 } 2132 2133 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getStructureArticles( 2134 java.lang.String[] ddmStructureKeys) 2135 throws com.liferay.portal.kernel.exception.SystemException { 2136 return getService().getStructureArticles(ddmStructureKeys); 2137 } 2138 2139 /** 2140 * Returns the number of web content articles matching the group and DDM 2141 * structure key. 2142 * 2143 * @param groupId the primary key of the web content article's group 2144 * @param ddmStructureKey the primary key of the web content article's DDM 2145 structure 2146 * @return the number of matching web content articles 2147 * @throws SystemException if a system exception occurred 2148 */ 2149 public static int getStructureArticlesCount(long groupId, 2150 java.lang.String ddmStructureKey) 2151 throws com.liferay.portal.kernel.exception.SystemException { 2152 return getService().getStructureArticlesCount(groupId, ddmStructureKey); 2153 } 2154 2155 /** 2156 * Returns the web content articles matching the group and DDM template key. 2157 * 2158 * @param groupId the primary key of the web content article's group 2159 * @param ddmTemplateKey the primary key of the web content article's DDM 2160 template (optionally <code>null</code>). If the article is 2161 related to a DDM structure, the template's structure must match 2162 it. 2163 * @return the matching web content articles 2164 * @throws SystemException if a system exception occurred 2165 */ 2166 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles( 2167 long groupId, java.lang.String ddmTemplateKey) 2168 throws com.liferay.portal.kernel.exception.SystemException { 2169 return getService().getTemplateArticles(groupId, ddmTemplateKey); 2170 } 2171 2172 /** 2173 * Returns an ordered range of all the web content articles matching the 2174 * group and DDM template key. 2175 * 2176 * <p> 2177 * Useful when paginating results. Returns a maximum of <code>end - 2178 * start</code> instances. <code>start</code> and <code>end</code> are not 2179 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2180 * refers to the first result in the set. Setting both <code>start</code> 2181 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2182 * result set. 2183 * </p> 2184 * 2185 * @param groupId the primary key of the web content article's group 2186 * @param ddmTemplateKey the primary key of the web content article's DDM 2187 template (optionally <code>null</code>). If the article is 2188 related to a DDM structure, the template's structure must match 2189 it. 2190 * @param start the lower bound of the range of web content articles to 2191 return 2192 * @param end the upper bound of the range of web content articles to 2193 return (not inclusive) 2194 * @param obc the comparator to order the web content articles 2195 * @return the range of matching web content articles ordered by the 2196 comparator 2197 * @throws SystemException if a system exception occurred 2198 */ 2199 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> getTemplateArticles( 2200 long groupId, java.lang.String ddmTemplateKey, int start, int end, 2201 com.liferay.portal.kernel.util.OrderByComparator obc) 2202 throws com.liferay.portal.kernel.exception.SystemException { 2203 return getService() 2204 .getTemplateArticles(groupId, ddmTemplateKey, start, end, obc); 2205 } 2206 2207 /** 2208 * Returns the number of web content articles matching the group and DDM 2209 * template key. 2210 * 2211 * @param groupId the primary key of the web content article's group 2212 * @param ddmTemplateKey the primary key of the web content article's DDM 2213 template (optionally <code>null</code>). If the article is 2214 related to a DDM structure, the template's structure must match 2215 it. 2216 * @return the number of matching web content articles 2217 * @throws SystemException if a system exception occurred 2218 */ 2219 public static int getTemplateArticlesCount(long groupId, 2220 java.lang.String ddmTemplateKey) 2221 throws com.liferay.portal.kernel.exception.SystemException { 2222 return getService().getTemplateArticlesCount(groupId, ddmTemplateKey); 2223 } 2224 2225 public static java.lang.String getUniqueUrlTitle(long groupId, 2226 java.lang.String articleId, java.lang.String urlTitle) 2227 throws com.liferay.portal.kernel.exception.PortalException, 2228 com.liferay.portal.kernel.exception.SystemException { 2229 return getService().getUniqueUrlTitle(groupId, articleId, urlTitle); 2230 } 2231 2232 /** 2233 * Returns <code>true</code> if the specified web content article exists. 2234 * 2235 * @param groupId the primary key of the group 2236 * @param articleId the primary key of the web content article 2237 * @return <code>true</code> if the specified web content article exists; 2238 <code>false</code> otherwise 2239 * @throws SystemException if a system exception occurred 2240 */ 2241 public static boolean hasArticle(long groupId, java.lang.String articleId) 2242 throws com.liferay.portal.kernel.exception.SystemException { 2243 return getService().hasArticle(groupId, articleId); 2244 } 2245 2246 /** 2247 * Returns <code>true</code> if the web content article, specified by group 2248 * and article ID, is the latest version. 2249 * 2250 * @param groupId the primary key of the web content article's group 2251 * @param articleId the primary key of the web content article 2252 * @param version the web content article's version 2253 * @return <code>true</code> if the specified web content article is the 2254 latest version; <code>false</code> otherwise 2255 * @throws PortalException if a matching web content article could not be 2256 found 2257 * @throws SystemException if a system exception occurred 2258 */ 2259 public static boolean isLatestVersion(long groupId, 2260 java.lang.String articleId, double version) 2261 throws com.liferay.portal.kernel.exception.PortalException, 2262 com.liferay.portal.kernel.exception.SystemException { 2263 return getService().isLatestVersion(groupId, articleId, version); 2264 } 2265 2266 /** 2267 * Returns <code>true</code> if the web content article, specified by group, 2268 * article ID, and workflow status, is the latest version. 2269 * 2270 * @param groupId the primary key of the web content article's group 2271 * @param articleId the primary key of the web content article 2272 * @param version the web content article's version 2273 * @param status the web content article's workflow status. For more 2274 information see {@link WorkflowConstants} for constants starting 2275 with the "STATUS_" prefix. 2276 * @return <code>true</code> if the specified web content article is the 2277 latest version; <code>false</code> otherwise 2278 * @throws PortalException if a matching web content article could not be 2279 found 2280 * @throws SystemException if a system exception occurred 2281 */ 2282 public static boolean isLatestVersion(long groupId, 2283 java.lang.String articleId, double version, int status) 2284 throws com.liferay.portal.kernel.exception.PortalException, 2285 com.liferay.portal.kernel.exception.SystemException { 2286 return getService().isLatestVersion(groupId, articleId, version, status); 2287 } 2288 2289 /** 2290 * Moves the web content article matching the group and article ID to a new 2291 * folder. 2292 * 2293 * @param groupId the primary key of the web content article's group 2294 * @param articleId the primary key of the web content article 2295 * @param newFolderId the primary key of the web content article's new 2296 folder 2297 * @return the updated web content article, which was moved to a new folder 2298 * @throws PortalException if a matching web content article could not be 2299 found 2300 * @throws SystemException if a system exception occurred 2301 */ 2302 public static com.liferay.portlet.journal.model.JournalArticle moveArticle( 2303 long groupId, java.lang.String articleId, long newFolderId) 2304 throws com.liferay.portal.kernel.exception.PortalException, 2305 com.liferay.portal.kernel.exception.SystemException { 2306 return getService().moveArticle(groupId, articleId, newFolderId); 2307 } 2308 2309 /** 2310 * Moves the web content article from the Recycle Bin to a new folder. 2311 * 2312 * @param userId the primary key of the user updating the web content 2313 article 2314 * @param groupId the primary key of the web content article's group 2315 * @param article the web content article 2316 * @param newFolderId the primary key of the web content article's new 2317 folder 2318 * @param serviceContext the service context to be applied. Can set the 2319 modification date, portlet preferences, and can set whether to 2320 add the default command update for the web content article. With 2321 respect to social activities, by setting the service context's 2322 command to {@link 2323 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2324 is considered a web content update activity; otherwise it is 2325 considered a web content add activity. 2326 * @return the updated web content article, which was moved from the Recycle 2327 Bin to a new folder 2328 * @throws PortalException if a trashed web content article with the primary 2329 key could not be found or if a portal exception occurred 2330 * @throws SystemException if a system exception occurred 2331 */ 2332 public static com.liferay.portlet.journal.model.JournalArticle moveArticleFromTrash( 2333 long userId, long groupId, 2334 com.liferay.portlet.journal.model.JournalArticle article, 2335 long newFolderId, 2336 com.liferay.portal.service.ServiceContext serviceContext) 2337 throws com.liferay.portal.kernel.exception.PortalException, 2338 com.liferay.portal.kernel.exception.SystemException { 2339 return getService() 2340 .moveArticleFromTrash(userId, groupId, article, newFolderId, 2341 serviceContext); 2342 } 2343 2344 /** 2345 * Moves the latest version of the web content article matching the group 2346 * and article ID to the recycle bin. 2347 * 2348 * @param userId the primary key of the user updating the web content 2349 article 2350 * @param article the web content article 2351 * @return the updated web content article, which was moved to the Recycle 2352 Bin 2353 * @throws PortalException if the user did not have permission to move the 2354 article to the Recycle Bin or if a portal exception occurred 2355 * @throws SystemException if a system exception occurred 2356 */ 2357 public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash( 2358 long userId, com.liferay.portlet.journal.model.JournalArticle article) 2359 throws com.liferay.portal.kernel.exception.PortalException, 2360 com.liferay.portal.kernel.exception.SystemException { 2361 return getService().moveArticleToTrash(userId, article); 2362 } 2363 2364 /** 2365 * Moves the latest version of the web content article matching the group 2366 * and article ID to the recycle bin. 2367 * 2368 * @param userId the primary key of the user updating the web content 2369 article 2370 * @param groupId the primary key of the web content article's group 2371 * @param articleId the primary key of the web content article 2372 * @return the moved web content article or <code>null</code> if no matching 2373 article was found 2374 * @throws PortalException if the user did not have permission to move the 2375 article to the Recycle Bin or if a portal exception occurred 2376 * @throws SystemException if a system exception occurred 2377 */ 2378 public static com.liferay.portlet.journal.model.JournalArticle moveArticleToTrash( 2379 long userId, long groupId, java.lang.String articleId) 2380 throws com.liferay.portal.kernel.exception.PortalException, 2381 com.liferay.portal.kernel.exception.SystemException { 2382 return getService().moveArticleToTrash(userId, groupId, articleId); 2383 } 2384 2385 public static void rebuildTree(long companyId) 2386 throws com.liferay.portal.kernel.exception.PortalException, 2387 com.liferay.portal.kernel.exception.SystemException { 2388 getService().rebuildTree(companyId); 2389 } 2390 2391 /** 2392 * Removes the web content of the web content article matching the group, 2393 * article ID, and version, and language. 2394 * 2395 * @param groupId the primary key of the web content article's group 2396 * @param articleId the primary key of the web content article 2397 * @param version the web content article's version 2398 * @param languageId the primary key of the language locale to remove 2399 * @return the updated web content article with the locale removed 2400 * @throws PortalException if a matching web content article could not be 2401 found 2402 * @throws SystemException if a system exception occurred 2403 */ 2404 public static com.liferay.portlet.journal.model.JournalArticle removeArticleLocale( 2405 long groupId, java.lang.String articleId, double version, 2406 java.lang.String languageId) 2407 throws com.liferay.portal.kernel.exception.PortalException, 2408 com.liferay.portal.kernel.exception.SystemException { 2409 return getService() 2410 .removeArticleLocale(groupId, articleId, version, languageId); 2411 } 2412 2413 /** 2414 * Restores the web content article from the Recycle Bin. 2415 * 2416 * @param userId the primary key of the user restoring the web content 2417 article 2418 * @param article the web content article 2419 * @throws PortalException if the web content article with the primary key 2420 could not be found in the Recycle Bin, if the user did not have 2421 permission to restore the article, or if a portal exception 2422 occurred 2423 * @throws SystemException if a system exception occurred 2424 */ 2425 public static com.liferay.portlet.journal.model.JournalArticle restoreArticleFromTrash( 2426 long userId, com.liferay.portlet.journal.model.JournalArticle article) 2427 throws com.liferay.portal.kernel.exception.PortalException, 2428 com.liferay.portal.kernel.exception.SystemException { 2429 return getService().restoreArticleFromTrash(userId, article); 2430 } 2431 2432 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2433 long groupId, java.util.List<java.lang.Long> folderIds, int status, 2434 int start, int end) 2435 throws com.liferay.portal.kernel.exception.SystemException { 2436 return getService().search(groupId, folderIds, status, start, end); 2437 } 2438 2439 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2440 long groupId, long folderId, int status, int start, int end) 2441 throws com.liferay.portal.kernel.exception.SystemException { 2442 return getService().search(groupId, folderId, status, start, end); 2443 } 2444 2445 /** 2446 * Returns an ordered range of all the web content articles matching the 2447 * parameters without using the indexer, including a keywords parameter for 2448 * matching with the article's ID, title, description, and content, a DDM 2449 * structure key parameter, and a DDM template key parameter. It is 2450 * preferable to use the indexed version {@link #search(long, long, List, 2451 * long, String, String, String, LinkedHashMap, int, int, Sort)} instead of 2452 * this method wherever possible for performance reasons. 2453 * 2454 * <p> 2455 * Useful when paginating results. Returns a maximum of <code>end - 2456 * start</code> instances. <code>start</code> and <code>end</code> are not 2457 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2458 * refers to the first result in the set. Setting both <code>start</code> 2459 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2460 * result set. 2461 * </p> 2462 * 2463 * @param companyId the primary key of the web content article's company 2464 * @param groupId the primary key of the group (optionally <code>0</code>) 2465 * @param folderIds the primary keys of the web content article folders 2466 (optionally {@link java.util.Collections#EMPTY_LIST}) 2467 * @param classNameId the primary key of the DDMStructure class if the web 2468 content article is related to a DDM structure, the primary key of 2469 the class name associated with the article, or {@link 2470 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2471 * @param keywords the keywords (space separated), which may occur in the 2472 web content article ID, title, description, or content 2473 (optionally <code>null</code>). If the keywords value is not 2474 <code>null</code>, the search uses the OR operator in connecting 2475 query criteria; otherwise it uses the AND operator. 2476 * @param version the web content article's version (optionally 2477 <code>null</code>) 2478 * @param type the web content article's type (optionally 2479 <code>null</code>) 2480 * @param ddmStructureKey the primary key of the web content article's DDM 2481 structure, if the article is related to a DDM structure, or 2482 <code>null</code> otherwise 2483 * @param ddmTemplateKey the primary key of the web content article's DDM 2484 template (optionally <code>null</code>). If the article is 2485 related to a DDM structure, the template's structure must match 2486 it. 2487 * @param displayDateGT the date after which a matching web content 2488 article's display date must be after (optionally 2489 <code>null</code>) 2490 * @param displayDateLT the date before which a matching web content 2491 article's display date must be before (optionally 2492 <code>null</code>) 2493 * @param status the web content article's workflow status. For more 2494 information see {@link WorkflowConstants} for constants starting 2495 with the "STATUS_" prefix. 2496 * @param reviewDate the web content article's scheduled review date 2497 (optionally <code>null</code>) 2498 * @param start the lower bound of the range of web content articles to 2499 return 2500 * @param end the upper bound of the range of web content articles to 2501 return (not inclusive) 2502 * @param obc the comparator to order the web content articles 2503 * @return the range of matching web content articles ordered by the 2504 comparator 2505 * @throws SystemException if a system exception occurred 2506 */ 2507 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2508 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2509 long classNameId, java.lang.String keywords, java.lang.Double version, 2510 java.lang.String type, java.lang.String ddmStructureKey, 2511 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 2512 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 2513 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 2514 throws com.liferay.portal.kernel.exception.SystemException { 2515 return getService() 2516 .search(companyId, groupId, folderIds, classNameId, 2517 keywords, version, type, ddmStructureKey, ddmTemplateKey, 2518 displayDateGT, displayDateLT, status, reviewDate, 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 key 2525 * parameter, a DDM template key parameter, and an AND operator switch. It 2526 * is preferable to use the indexed version {@link #search(long, long, List, 2527 * long, String, String, String, String, String, String, String, String, 2528 * LinkedHashMap, boolean, int, int, Sort)} instead of this method wherever 2529 * possible for performance reasons. 2530 * 2531 * <p> 2532 * Useful when paginating results. Returns a maximum of <code>end - 2533 * start</code> instances. <code>start</code> and <code>end</code> are not 2534 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2535 * refers to the first result in the set. Setting both <code>start</code> 2536 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2537 * result set. 2538 * </p> 2539 * 2540 * @param companyId the primary key of the web content article's company 2541 * @param groupId the primary key of the group (optionally <code>0</code>) 2542 * @param folderIds the primary keys of the web content article folders 2543 (optionally {@link java.util.Collections#EMPTY_LIST}) 2544 * @param classNameId the primary key of the DDMStructure class if the web 2545 content article is related to a DDM structure, the primary key of 2546 the class name associated with the article, or {@link 2547 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2548 * @param articleId the article ID keywords (space separated, optionally 2549 <code>null</code>) 2550 * @param version the web content article's version (optionally 2551 <code>null</code>) 2552 * @param title the title keywords (space separated, optionally 2553 <code>null</code>) 2554 * @param description the description keywords (space separated, optionally 2555 <code>null</code>) 2556 * @param content the content keywords (space separated, optionally 2557 <code>null</code>) 2558 * @param type the web content article's type (optionally 2559 <code>null</code>) 2560 * @param ddmStructureKey the primary key of the web content article's DDM 2561 structure, if the article is related to a DDM structure, or 2562 <code>null</code> otherwise 2563 * @param ddmTemplateKey the primary key of the web content article's DDM 2564 template (optionally <code>null</code>). If the article is 2565 related to a DDM structure, the template's structure must match 2566 it. 2567 * @param displayDateGT the date after which a matching web content 2568 article's display date must be after (optionally 2569 <code>null</code>) 2570 * @param displayDateLT the date before which a matching web content 2571 article's display date must be before (optionally 2572 <code>null</code>) 2573 * @param status the web content article's workflow status. For more 2574 information see {@link WorkflowConstants} for constants starting 2575 with the "STATUS_" prefix. 2576 * @param reviewDate the web content article's scheduled review date 2577 (optionally <code>null</code>) 2578 * @param andOperator whether every field must match its value or keywords, 2579 or just one field must match. Company, group, folder IDs, class 2580 name ID, and status must all match their values. 2581 * @param start the lower bound of the range of web content articles to 2582 return 2583 * @param end the upper bound of the range of web content articles to 2584 return (not inclusive) 2585 * @param obc the comparator to order the web content articles 2586 * @return the range of matching web content articles ordered by the 2587 comparator 2588 * @throws SystemException if a system exception occurred 2589 */ 2590 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2591 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2592 long classNameId, java.lang.String articleId, java.lang.Double version, 2593 java.lang.String title, java.lang.String description, 2594 java.lang.String content, java.lang.String type, 2595 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2596 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 2597 java.util.Date reviewDate, boolean andOperator, int start, int end, 2598 com.liferay.portal.kernel.util.OrderByComparator obc) 2599 throws com.liferay.portal.kernel.exception.SystemException { 2600 return getService() 2601 .search(companyId, groupId, folderIds, classNameId, 2602 articleId, version, title, description, content, type, 2603 ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, 2604 status, reviewDate, andOperator, start, end, obc); 2605 } 2606 2607 /** 2608 * Returns an ordered range of all the web content articles matching the 2609 * parameters without using the indexer, including keyword parameters for 2610 * article ID, title, description, and content, a DDM structure keys 2611 * (plural) parameter, a DDM template keys (plural) parameter, and an AND 2612 * operator switch. 2613 * 2614 * <p> 2615 * Useful when paginating results. Returns a maximum of <code>end - 2616 * start</code> instances. <code>start</code> and <code>end</code> are not 2617 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2618 * refers to the first result in the set. Setting both <code>start</code> 2619 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2620 * result set. 2621 * </p> 2622 * 2623 * @param companyId the primary key of the web content article's company 2624 * @param groupId the primary key of the group (optionally <code>0</code>) 2625 * @param folderIds the primary keys of the web content article folders 2626 (optionally {@link java.util.Collections#EMPTY_LIST}) 2627 * @param classNameId the primary key of the DDMStructure class if the web 2628 content article is related to a DDM structure, the primary key of 2629 the class name associated with the article, or {@link 2630 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2631 * @param articleId the article ID keywords (space separated, optionally 2632 <code>null</code>) 2633 * @param version the web content article's version (optionally 2634 <code>null</code>) 2635 * @param title the title keywords (space separated, optionally 2636 <code>null</code>) 2637 * @param description the description keywords (space separated, optionally 2638 <code>null</code>) 2639 * @param content the content keywords (space separated, optionally 2640 <code>null</code>) 2641 * @param type the web content article's type (optionally 2642 <code>null</code>) 2643 * @param ddmStructureKeys the primary keys of the web content article's 2644 DDM structures, if the article is related to a DDM structure, or 2645 <code>null</code> otherwise 2646 * @param ddmTemplateKeys the primary keys of the web content article's DDM 2647 templates (originally <code>null</code>). If the articles are 2648 related to a DDM structure, the template's structure must match 2649 it. 2650 * @param displayDateGT the date after which a matching web content 2651 article's display date must be after (optionally 2652 <code>null</code>) 2653 * @param displayDateLT the date before which a matching web content 2654 article's display date must be before (optionally 2655 <code>null</code>) 2656 * @param status the web content article's workflow status. For more 2657 information see {@link WorkflowConstants} for constants starting 2658 with the "STATUS_" prefix. 2659 * @param reviewDate the web content article's scheduled review date 2660 (optionally <code>null</code>) 2661 * @param andOperator whether every field must match its value or keywords, 2662 or just one field must match. Company, group, folder IDs, class 2663 name ID, and status must all match their values. 2664 * @param start the lower bound of the range of web content articles to 2665 return 2666 * @param end the upper bound of the range of web content articles to 2667 return (not inclusive) 2668 * @param obc the comparator to order the web content articles 2669 * @return the range of matching web content articles ordered by the 2670 comparator 2671 * @throws SystemException if a system exception occurred 2672 */ 2673 public static java.util.List<com.liferay.portlet.journal.model.JournalArticle> search( 2674 long companyId, long groupId, java.util.List<java.lang.Long> folderIds, 2675 long classNameId, java.lang.String articleId, java.lang.Double version, 2676 java.lang.String title, java.lang.String description, 2677 java.lang.String content, java.lang.String type, 2678 java.lang.String[] ddmStructureKeys, 2679 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 2680 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 2681 boolean andOperator, int start, int end, 2682 com.liferay.portal.kernel.util.OrderByComparator obc) 2683 throws com.liferay.portal.kernel.exception.SystemException { 2684 return getService() 2685 .search(companyId, groupId, folderIds, classNameId, 2686 articleId, version, title, description, content, type, 2687 ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT, 2688 status, reviewDate, andOperator, start, end, obc); 2689 } 2690 2691 /** 2692 * Returns an ordered range of all the web content articles matching the 2693 * parameters using the indexer, including a keywords parameter for matching 2694 * an article's ID, title, description, or content, a DDM structure key 2695 * parameter, a DDM template key parameter, and a finder hash map parameter. 2696 * It is preferable to use this method instead of the non-indexed version 2697 * whenever possible for performance reasons. 2698 * 2699 * <p> 2700 * Useful when paginating results. Returns a maximum of <code>end - 2701 * start</code> instances. <code>start</code> and <code>end</code> are not 2702 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2703 * refers to the first result in the set. Setting both <code>start</code> 2704 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2705 * result set. 2706 * </p> 2707 * 2708 * @param companyId the primary key of the web content article's company 2709 * @param groupId the primary key of the group (optionally <code>0</code>) 2710 * @param folderIds the primary keys of the web content article folders 2711 (optionally {@link java.util.Collections#EMPTY_LIST}) 2712 * @param classNameId the primary key of the DDMStructure class if the web 2713 content article is related to a DDM structure, the primary key of 2714 the class name associated with the article, or {@link 2715 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2716 * @param ddmStructureKey the primary key of the web content article's DDM 2717 structure, if the article is related to a DDM structure, or 2718 <code>null</code> otherwise 2719 * @param ddmTemplateKey the primary key of the web content article's DDM 2720 template (optionally <code>null</code>). If the article is 2721 related to a DDM structure, the template's structure must match 2722 it. 2723 * @param keywords the keywords (space separated), which may occur in the 2724 web content article ID, title, description, or content 2725 (optionally <code>null</code>). If the keywords value is not 2726 <code>null</code>, the search uses the OR operator in connecting 2727 query criteria; otherwise it uses the AND operator. 2728 * @param params the finder parameters (optionally <code>null</code>) 2729 * @param start the lower bound of the range of web content articles to 2730 return 2731 * @param end the upper bound of the range of web content articles to 2732 return (not inclusive) 2733 * @param sort the field, type, and direction by which to sort (optionally 2734 <code>null</code>) 2735 * @return the matching web content articles ordered by <code>sort</code> 2736 * @throws SystemException if a system exception occurred 2737 */ 2738 public static com.liferay.portal.kernel.search.Hits search(long companyId, 2739 long groupId, java.util.List<java.lang.Long> folderIds, 2740 long classNameId, java.lang.String ddmStructureKey, 2741 java.lang.String ddmTemplateKey, java.lang.String keywords, 2742 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2743 int start, int end, com.liferay.portal.kernel.search.Sort sort) 2744 throws com.liferay.portal.kernel.exception.SystemException { 2745 return getService() 2746 .search(companyId, groupId, folderIds, classNameId, 2747 ddmStructureKey, ddmTemplateKey, keywords, params, start, end, sort); 2748 } 2749 2750 /** 2751 * Returns an ordered range of all the web content articles matching the 2752 * parameters using the indexer, including a keywords parameter for matching 2753 * an article's ID, title, description, or content, a DDM structure key 2754 * parameter, a DDM template key parameter, an AND operator switch, and 2755 * parameters for type, status, a finder hash map. It is preferable to use 2756 * this method instead of the non-indexed version whenever possible for 2757 * performance reasons. 2758 * 2759 * <p> 2760 * Useful when paginating results. Returns a maximum of <code>end - 2761 * start</code> instances. <code>start</code> and <code>end</code> are not 2762 * primary keys, they are indexes in the result set. Thus, <code>0</code> 2763 * refers to the first result in the set. Setting both <code>start</code> 2764 * and <code>end</code> to {@link QueryUtil#ALL_POS} will return the full 2765 * result set. 2766 * </p> 2767 * 2768 * @param companyId the primary key of the web content article's company 2769 * @param groupId the primary key of the group (optionally <code>0</code>) 2770 * @param folderIds the primary keys of the web content article folders 2771 (optionally {@link java.util.Collections#EMPTY_LIST}) 2772 * @param classNameId the primary key of the DDMStructure class if the web 2773 content article is related to a DDM structure, the primary key of 2774 the class name associated with the article, or {@link 2775 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2776 * @param articleId the article ID keywords (space separated, optionally 2777 <code>null</code>) 2778 * @param title the title keywords (space separated, optionally 2779 <code>null</code>) 2780 * @param description the description keywords (space separated, optionally 2781 <code>null</code>) 2782 * @param content the content keywords (space separated, optionally 2783 <code>null</code>) 2784 * @param type the web content article's type (optionally 2785 <code>null</code>) 2786 * @param status the web content article's workflow status. For more 2787 information see {@link WorkflowConstants} for constants starting 2788 with the "STATUS_" prefix. 2789 * @param ddmStructureKey the primary key of the web content article's DDM 2790 structure, if the article is related to a DDM structure, or 2791 <code>null</code> otherwise 2792 * @param ddmTemplateKey the primary key of the web content article's DDM 2793 template (optionally <code>null</code>). If the article is 2794 related to a DDM structure, the template's structure must match 2795 it. 2796 * @param params the finder parameters (optionally <code>null</code>). Can 2797 set parameter <code>"includeDiscussions"</code> to 2798 <code>true</code> to search for the keywords in the web content 2799 article discussions. 2800 * @param andSearch whether every field must match its value or keywords, 2801 or just one field must match 2802 * @param start the lower bound of the range of web content articles to 2803 return 2804 * @param end the upper bound of the range of web content articles to 2805 return (not inclusive) 2806 * @param sort the field, type, and direction by which to sort (optionally 2807 <code>null</code>) 2808 * @return the matching web content articles ordered by <code>sort</code> 2809 * @throws SystemException if a system exception occurred 2810 */ 2811 public static com.liferay.portal.kernel.search.Hits search(long companyId, 2812 long groupId, java.util.List<java.lang.Long> folderIds, 2813 long classNameId, java.lang.String articleId, java.lang.String title, 2814 java.lang.String description, java.lang.String content, 2815 java.lang.String type, java.lang.String status, 2816 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2817 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params, 2818 boolean andSearch, int start, int end, 2819 com.liferay.portal.kernel.search.Sort sort) 2820 throws com.liferay.portal.kernel.exception.SystemException { 2821 return getService() 2822 .search(companyId, groupId, folderIds, classNameId, 2823 articleId, title, description, content, type, status, 2824 ddmStructureKey, ddmTemplateKey, params, andSearch, start, end, sort); 2825 } 2826 2827 public static com.liferay.portal.kernel.search.Hits search(long groupId, 2828 long userId, long creatorUserId, int status, int start, int end) 2829 throws com.liferay.portal.kernel.exception.PortalException, 2830 com.liferay.portal.kernel.exception.SystemException { 2831 return getService() 2832 .search(groupId, userId, creatorUserId, status, start, end); 2833 } 2834 2835 public static int searchCount(long groupId, 2836 java.util.List<java.lang.Long> folderIds, int status) 2837 throws com.liferay.portal.kernel.exception.SystemException { 2838 return getService().searchCount(groupId, folderIds, status); 2839 } 2840 2841 public static int searchCount(long groupId, long folderId, int status) 2842 throws com.liferay.portal.kernel.exception.SystemException { 2843 return getService().searchCount(groupId, folderId, status); 2844 } 2845 2846 /** 2847 * Returns the number of web content articles matching the parameters, 2848 * including a keywords parameter for matching with the article's ID, title, 2849 * description, and content, a DDM structure key parameter, and a DDM 2850 * template key parameter. 2851 * 2852 * @param companyId the primary key of the web content article's company 2853 * @param groupId the primary key of the group (optionally <code>0</code>) 2854 * @param folderIds the primary keys of the web content article folders 2855 (optionally {@link java.util.Collections#EMPTY_LIST}) 2856 * @param classNameId the primary key of the DDMStructure class if the web 2857 content article is related to a DDM structure, the primary key of 2858 the class name associated with the article, or {@link 2859 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2860 * @param keywords the keywords (space separated), which may occur in the 2861 web content article ID, title, description, or content 2862 (optionally <code>null</code>). If the keywords value is not 2863 <code>null</code>, the search uses the OR operator in connecting 2864 query criteria; otherwise it uses the AND operator. 2865 * @param version the web content article's version (optionally 2866 <code>null</code>) 2867 * @param type the web content article's type (optionally 2868 <code>null</code>) 2869 * @param ddmStructureKey the primary key of the web content article's DDM 2870 structure, if the article is related to a DDM structure, or 2871 <code>null</code> otherwise 2872 * @param ddmTemplateKey the primary key of the web content article's DDM 2873 template (optionally <code>null</code>). If the article is 2874 related to a DDM structure, the template's structure must match 2875 it. 2876 * @param displayDateGT the date after which a matching web content 2877 article's display date must be after (optionally 2878 <code>null</code>) 2879 * @param displayDateLT the date before which a matching web content 2880 article's display date must be before (optionally 2881 <code>null</code>) 2882 * @param status the web content article's workflow status. For more 2883 information see {@link WorkflowConstants} for constants starting 2884 with the "STATUS_" prefix. 2885 * @param reviewDate the web content article's scheduled review date 2886 (optionally <code>null</code>) 2887 * @return the number of matching web content articles 2888 * @throws SystemException if a system exception occurred 2889 */ 2890 public static int searchCount(long companyId, long groupId, 2891 java.util.List<java.lang.Long> folderIds, long classNameId, 2892 java.lang.String keywords, java.lang.Double version, 2893 java.lang.String type, java.lang.String ddmStructureKey, 2894 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 2895 java.util.Date displayDateLT, int status, java.util.Date reviewDate) 2896 throws com.liferay.portal.kernel.exception.SystemException { 2897 return getService() 2898 .searchCount(companyId, groupId, folderIds, classNameId, 2899 keywords, version, type, ddmStructureKey, ddmTemplateKey, 2900 displayDateGT, displayDateLT, status, reviewDate); 2901 } 2902 2903 /** 2904 * Returns the number of web content articles matching the parameters, 2905 * including keyword parameters for article ID, title, description, and 2906 * content, a DDM structure key parameter, a DDM template key parameter, and 2907 * an AND operator switch. 2908 * 2909 * @param companyId the primary key of the web content article's company 2910 * @param groupId the primary key of the group (optionally <code>0</code>) 2911 * @param folderIds the primary keys of the web content article folders 2912 (optionally {@link java.util.Collections#EMPTY_LIST}) 2913 * @param classNameId the primary key of the DDMStructure class if the web 2914 content article is related to a DDM structure, the primary key of 2915 the class name associated with the article, or {@link 2916 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2917 * @param articleId the article ID keywords (space separated, optionally 2918 <code>null</code>) 2919 * @param version the web content article's version (optionally 2920 <code>null</code>) 2921 * @param title the title keywords (space separated, optionally 2922 <code>null</code>) 2923 * @param description the description keywords (space separated, optionally 2924 <code>null</code>) 2925 * @param content the content keywords (space separated, optionally 2926 <code>null</code>) 2927 * @param type the web content article's type (optionally 2928 <code>null</code>) 2929 * @param ddmStructureKey the primary key of the web content article's DDM 2930 structure, if the article is related to a DDM structure, or 2931 <code>null</code> otherwise 2932 * @param ddmTemplateKey the primary key of the web content article's DDM 2933 template (optionally <code>null</code>). If the article is 2934 related to a DDM structure, the template's structure must match 2935 it. 2936 * @param displayDateGT the date after which a matching web content 2937 article's display date must be after (optionally 2938 <code>null</code>) 2939 * @param displayDateLT the date before which a matching web content 2940 article's display date must be before (optionally 2941 <code>null</code>) 2942 * @param status the web content article's workflow status. For more 2943 information see {@link WorkflowConstants} for constants starting 2944 with the "STATUS_" prefix. 2945 * @param reviewDate the web content article's scheduled review date 2946 (optionally <code>null</code>) 2947 * @param andOperator whether every field must match its value or keywords, 2948 or just one field must match. Group, folder IDs, class name ID, 2949 and status must all match their values. 2950 * @return the number of matching web content articles 2951 * @throws SystemException if a system exception occurred 2952 */ 2953 public static int searchCount(long companyId, long groupId, 2954 java.util.List<java.lang.Long> folderIds, long classNameId, 2955 java.lang.String articleId, java.lang.Double version, 2956 java.lang.String title, java.lang.String description, 2957 java.lang.String content, java.lang.String type, 2958 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 2959 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 2960 java.util.Date reviewDate, boolean andOperator) 2961 throws com.liferay.portal.kernel.exception.SystemException { 2962 return getService() 2963 .searchCount(companyId, groupId, folderIds, classNameId, 2964 articleId, version, title, description, content, type, 2965 ddmStructureKey, ddmTemplateKey, displayDateGT, displayDateLT, 2966 status, reviewDate, andOperator); 2967 } 2968 2969 /** 2970 * Returns the number of web content articles matching the parameters, 2971 * including keyword parameters for article ID, title, description, and 2972 * content, a DDM structure keys (plural) parameter, a DDM template keys 2973 * (plural) parameter, and an AND operator switch. 2974 * 2975 * @param companyId the primary key of the web content article's company 2976 * @param groupId the primary key of the group (optionally <code>0</code>) 2977 * @param folderIds the primary keys of the web content article folders 2978 (optionally {@link java.util.Collections#EMPTY_LIST}) 2979 * @param classNameId the primary key of the DDMStructure class if the web 2980 content article is related to a DDM structure, the primary key of 2981 the class name associated with the article, or {@link 2982 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 2983 * @param articleId the article ID keywords (space separated, optionally 2984 <code>null</code>) 2985 * @param version the web content article's version (optionally 2986 <code>null</code>) 2987 * @param title the title keywords (space separated, optionally 2988 <code>null</code>) 2989 * @param description the description keywords (space separated, optionally 2990 <code>null</code>) 2991 * @param content the content keywords (space separated, optionally 2992 <code>null</code>) 2993 * @param type the web content article's type (optionally 2994 <code>null</code>) 2995 * @param ddmStructureKeys the primary keys of the web content article's 2996 DDM structures, if the article is related to a DDM structure, or 2997 <code>null</code> otherwise 2998 * @param ddmTemplateKeys the primary keys of the web content article's DDM 2999 templates (originally <code>null</code>). If the articles are 3000 related to a DDM structure, the template's structure must match 3001 it. 3002 * @param displayDateGT the date after which a matching web content 3003 article's display date must be after (optionally 3004 <code>null</code>) 3005 * @param displayDateLT the date before which a matching web content 3006 article's display date must be before (optionally 3007 <code>null</code>) 3008 * @param status the web content article's workflow status. For more 3009 information see {@link WorkflowConstants} for constants starting 3010 with the "STATUS_" prefix. 3011 * @param reviewDate the web content article's scheduled review date 3012 (optionally <code>null</code>) 3013 * @param andOperator whether every field must match its value or keywords, 3014 or just one field must match. Group, folder IDs, class name ID, 3015 and status must all match their values. 3016 * @return the number of matching web content articles 3017 * @throws SystemException if a system exception occurred 3018 */ 3019 public static int searchCount(long companyId, long groupId, 3020 java.util.List<java.lang.Long> folderIds, long classNameId, 3021 java.lang.String articleId, java.lang.Double version, 3022 java.lang.String title, java.lang.String description, 3023 java.lang.String content, java.lang.String type, 3024 java.lang.String[] ddmStructureKeys, 3025 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 3026 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 3027 boolean andOperator) 3028 throws com.liferay.portal.kernel.exception.SystemException { 3029 return getService() 3030 .searchCount(companyId, groupId, folderIds, classNameId, 3031 articleId, version, title, description, content, type, 3032 ddmStructureKeys, ddmTemplateKeys, displayDateGT, displayDateLT, 3033 status, reviewDate, andOperator); 3034 } 3035 3036 public static void setTreePaths(long folderId, java.lang.String treePath, 3037 boolean reindex) 3038 throws com.liferay.portal.kernel.exception.PortalException, 3039 com.liferay.portal.kernel.exception.SystemException { 3040 getService().setTreePaths(folderId, treePath, reindex); 3041 } 3042 3043 /** 3044 * Subscribes the user to notifications for the web content article matching 3045 * the group, notifying him the instant versions of the article are created, 3046 * deleted, or modified. 3047 * 3048 * @param userId the primary key of the user to subscribe 3049 * @param groupId the primary key of the group 3050 * @throws PortalException if a matching user or group could not be found 3051 * @throws SystemException if a system exception occurred 3052 */ 3053 public static void subscribe(long userId, long groupId) 3054 throws com.liferay.portal.kernel.exception.PortalException, 3055 com.liferay.portal.kernel.exception.SystemException { 3056 getService().subscribe(userId, groupId); 3057 } 3058 3059 /** 3060 * Unsubscribes the user from notifications for the web content article 3061 * matching the group. 3062 * 3063 * @param userId the primary key of the user to unsubscribe 3064 * @param groupId the primary key of the group 3065 * @throws PortalException if a matching user or subscription could not be 3066 found 3067 * @throws SystemException if a system exception occurred 3068 */ 3069 public static void unsubscribe(long userId, long groupId) 3070 throws com.liferay.portal.kernel.exception.PortalException, 3071 com.liferay.portal.kernel.exception.SystemException { 3072 getService().unsubscribe(userId, groupId); 3073 } 3074 3075 /** 3076 * Updates the web content article matching the version, replacing its 3077 * folder, title, description, content, and layout UUID. 3078 * 3079 * @param userId the primary key of the user updating the web content 3080 article 3081 * @param groupId the primary key of the web content article's group 3082 * @param folderId the primary key of the web content article folder 3083 * @param articleId the primary key of the web content article 3084 * @param version the web content article's version 3085 * @param titleMap the web content article's locales and localized titles 3086 * @param descriptionMap the web content article's locales and localized 3087 descriptions 3088 * @param content the HTML content wrapped in XML. For more information, 3089 see the content example in the class description for {@link 3090 JournalArticleLocalServiceImpl}. 3091 * @param layoutUuid the unique string identifying the web content 3092 article's display page 3093 * @param serviceContext the service context to be applied. Can set the 3094 modification date, expando bridge attributes, asset category IDs, 3095 asset tag names, asset link entry IDs, workflow actions, the 3096 "defaultLanguageId" and "urlTitle" attributes, and can set 3097 whether to add the default command update for the web content 3098 article. With respect to social activities, by setting the 3099 service context's command to {@link 3100 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3101 is considered a web content update activity; otherwise it is 3102 considered a web content add activity. 3103 * @return the updated web content article 3104 * @throws PortalException if a user with the primary key or a matching web 3105 content article could not be found, or if a portal exception 3106 occurred 3107 * @throws SystemException if a system exception occurred 3108 */ 3109 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3110 long userId, long groupId, long folderId, java.lang.String articleId, 3111 double version, 3112 java.util.Map<java.util.Locale, java.lang.String> titleMap, 3113 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 3114 java.lang.String content, java.lang.String layoutUuid, 3115 com.liferay.portal.service.ServiceContext serviceContext) 3116 throws com.liferay.portal.kernel.exception.PortalException, 3117 com.liferay.portal.kernel.exception.SystemException { 3118 return getService() 3119 .updateArticle(userId, groupId, folderId, articleId, 3120 version, titleMap, descriptionMap, content, layoutUuid, 3121 serviceContext); 3122 } 3123 3124 /** 3125 * Updates the web content article with additional parameters. 3126 * 3127 * @param userId the primary key of the user updating the web content 3128 article 3129 * @param groupId the primary key of the web content article's group 3130 * @param folderId the primary key of the web content article folder 3131 * @param articleId the primary key of the web content article 3132 * @param version the web content article's version 3133 * @param titleMap the web content article's locales and localized titles 3134 * @param descriptionMap the web content article's locales and localized 3135 descriptions 3136 * @param content the HTML content wrapped in XML. For more information, 3137 see the content example in the class description for {@link 3138 JournalArticleLocalServiceImpl}. 3139 * @param type the structure's type, if the web content article is related 3140 to a DDM structure. For more information, see {@link 3141 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 3142 * @param ddmStructureKey the primary key of the web content article's DDM 3143 structure, if the article is related to a DDM structure, or 3144 <code>null</code> otherwise 3145 * @param ddmTemplateKey the primary key of the web content article's DDM 3146 template (optionally <code>null</code>). If the article is 3147 related to a DDM structure, the template's structure must match 3148 it. 3149 * @param layoutUuid the unique string identifying the web content 3150 article's display page 3151 * @param displayDateMonth the month the web content article is set to 3152 display 3153 * @param displayDateDay the calendar day the web content article is set to 3154 display 3155 * @param displayDateYear the year the web content article is set to 3156 display 3157 * @param displayDateHour the hour the web content article is set to 3158 display 3159 * @param displayDateMinute the minute the web content article is set to 3160 display 3161 * @param expirationDateMonth the month the web content article is set to 3162 expire 3163 * @param expirationDateDay the calendar day the web content article is set 3164 to expire 3165 * @param expirationDateYear the year the web content article is set to 3166 expire 3167 * @param expirationDateHour the hour the web content article is set to 3168 expire 3169 * @param expirationDateMinute the minute the web content article is set to 3170 expire 3171 * @param neverExpire whether the web content article is not set to auto 3172 expire 3173 * @param reviewDateMonth the month the web content article is set for 3174 review 3175 * @param reviewDateDay the calendar day the web content article is set for 3176 review 3177 * @param reviewDateYear the year the web content article is set for review 3178 * @param reviewDateHour the hour the web content article is set for review 3179 * @param reviewDateMinute the minute the web content article is set for 3180 review 3181 * @param neverReview whether the web content article is not set for review 3182 * @param indexable whether the web content is searchable 3183 * @param smallImage whether to update web content article's a small image. 3184 A file must be passed in as <code>smallImageFile</code> value, 3185 otherwise the current small image is deleted. 3186 * @param smallImageURL the web content article's small image URL 3187 (optionally <code>null</code>) 3188 * @param smallImageFile the web content article's new small image file 3189 (optionally <code>null</code>). Must pass in 3190 <code>smallImage</code> value of <code>true</code> to replace the 3191 article's small image file. 3192 * @param images the web content's images (optionally <code>null</code>) 3193 * @param articleURL the web content article's accessible URL (optionally 3194 <code>null</code>) 3195 * @param serviceContext the service context to be applied. Can set the 3196 modification date, expando bridge attributes, asset category IDs, 3197 asset tag names, asset link entry IDs, workflow actions, the 3198 "defaultLanguageId" and "urlTitle" attributes, and can set 3199 whether to add the default command update for the web content 3200 article. With respect to social activities, by setting the 3201 service context's command to {@link 3202 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3203 is considered a web content update activity; otherwise it is 3204 considered a web content add activity. 3205 * @return the updated web content article 3206 * @throws PortalException if a user with the primary key or a matching web 3207 content article could not be found, or if a portal exception 3208 occurred 3209 * @throws SystemException if a system exception occurred 3210 */ 3211 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3212 long userId, long groupId, long folderId, java.lang.String articleId, 3213 double version, 3214 java.util.Map<java.util.Locale, java.lang.String> titleMap, 3215 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 3216 java.lang.String content, java.lang.String type, 3217 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 3218 java.lang.String layoutUuid, int displayDateMonth, int displayDateDay, 3219 int displayDateYear, int displayDateHour, int displayDateMinute, 3220 int expirationDateMonth, int expirationDateDay, int expirationDateYear, 3221 int expirationDateHour, int expirationDateMinute, boolean neverExpire, 3222 int reviewDateMonth, int reviewDateDay, int reviewDateYear, 3223 int reviewDateHour, int reviewDateMinute, boolean neverReview, 3224 boolean indexable, boolean smallImage, java.lang.String smallImageURL, 3225 java.io.File smallImageFile, 3226 java.util.Map<java.lang.String, byte[]> images, 3227 java.lang.String articleURL, 3228 com.liferay.portal.service.ServiceContext serviceContext) 3229 throws com.liferay.portal.kernel.exception.PortalException, 3230 com.liferay.portal.kernel.exception.SystemException { 3231 return getService() 3232 .updateArticle(userId, groupId, folderId, articleId, 3233 version, titleMap, descriptionMap, content, type, ddmStructureKey, 3234 ddmTemplateKey, layoutUuid, displayDateMonth, displayDateDay, 3235 displayDateYear, displayDateHour, displayDateMinute, 3236 expirationDateMonth, expirationDateDay, expirationDateYear, 3237 expirationDateHour, expirationDateMinute, neverExpire, 3238 reviewDateMonth, reviewDateDay, reviewDateYear, reviewDateHour, 3239 reviewDateMinute, neverReview, indexable, smallImage, 3240 smallImageURL, smallImageFile, images, articleURL, serviceContext); 3241 } 3242 3243 /** 3244 * Updates the web content article matching the version, replacing its 3245 * folder and content. 3246 * 3247 * @param userId the primary key of the user updating the web content 3248 article 3249 * @param groupId the primary key of the web content article's group 3250 * @param folderId the primary key of the web content article folder 3251 * @param articleId the primary key of the web content article 3252 * @param version the web content article's version 3253 * @param content the HTML content wrapped in XML. For more information, 3254 see the content example in the class description for {@link 3255 JournalArticleLocalServiceImpl}. 3256 * @param serviceContext the service context to be applied. Can set the 3257 modification date, expando bridge attributes, asset category IDs, 3258 asset tag names, asset link entry IDs, workflow actions, the 3259 "defaultLanguageId" and "urlTitle" attributes, and can set 3260 whether to add the default command update for the web content 3261 article. With respect to social activities, by setting the 3262 service context's command to {@link 3263 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3264 is considered a web content update activity; otherwise it is 3265 considered a web content add activity. 3266 * @return the updated web content article 3267 * @throws PortalException if a user with the primary key or a matching web 3268 content article could not be found, or if a portal exception 3269 occurred 3270 * @throws SystemException if a system exception occurred 3271 */ 3272 public static com.liferay.portlet.journal.model.JournalArticle updateArticle( 3273 long userId, long groupId, long folderId, java.lang.String articleId, 3274 double version, java.lang.String content, 3275 com.liferay.portal.service.ServiceContext serviceContext) 3276 throws com.liferay.portal.kernel.exception.PortalException, 3277 com.liferay.portal.kernel.exception.SystemException { 3278 return getService() 3279 .updateArticle(userId, groupId, folderId, articleId, 3280 version, content, serviceContext); 3281 } 3282 3283 /** 3284 * @deprecated As of 6.2.0, replaced by {@link 3285 #updateArticleTranslation(long, String, double, Locale, 3286 String, String, String, Map, ServiceContext)} 3287 */ 3288 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 3289 long groupId, java.lang.String articleId, double version, 3290 java.util.Locale locale, java.lang.String title, 3291 java.lang.String description, java.lang.String content, 3292 java.util.Map<java.lang.String, byte[]> images) 3293 throws com.liferay.portal.kernel.exception.PortalException, 3294 com.liferay.portal.kernel.exception.SystemException { 3295 return getService() 3296 .updateArticleTranslation(groupId, articleId, version, 3297 locale, title, description, content, images); 3298 } 3299 3300 /** 3301 * Updates the translation of the web content article. 3302 * 3303 * @param groupId the primary key of the web content article's group 3304 * @param articleId the primary key of the web content article 3305 * @param version the web content article's version 3306 * @param locale the locale of the web content article's display template 3307 * @param title the translated web content article title 3308 * @param description the translated web content article description 3309 * @param content the HTML content wrapped in XML. For more information, 3310 see the content example in the class description for {@link 3311 JournalArticleLocalServiceImpl}. 3312 * @param images the web content's images 3313 * @param serviceContext the service context to be applied. Can set the 3314 modification date and "urlTitle" attribute for the web content 3315 article. 3316 * @return the updated web content article 3317 * @throws PortalException if a user with the primary key or a matching web 3318 content article could not be found, or if a portal exception 3319 occurred 3320 * @throws SystemException if a system exception occurred 3321 */ 3322 public static com.liferay.portlet.journal.model.JournalArticle updateArticleTranslation( 3323 long groupId, java.lang.String articleId, double version, 3324 java.util.Locale locale, java.lang.String title, 3325 java.lang.String description, java.lang.String content, 3326 java.util.Map<java.lang.String, byte[]> images, 3327 com.liferay.portal.service.ServiceContext serviceContext) 3328 throws com.liferay.portal.kernel.exception.PortalException, 3329 com.liferay.portal.kernel.exception.SystemException { 3330 return getService() 3331 .updateArticleTranslation(groupId, articleId, version, 3332 locale, title, description, content, images, serviceContext); 3333 } 3334 3335 /** 3336 * Updates the web content article's asset with the new asset categories, 3337 * tag names, and link entries, removing and adding them as necessary. 3338 * 3339 * @param userId the primary key of the user updating the web content 3340 article's asset 3341 * @param article the web content article 3342 * @param assetCategoryIds the primary keys of the new asset categories 3343 * @param assetTagNames the new asset tag names 3344 * @param assetLinkEntryIds the primary keys of the new asset link entries 3345 * @throws PortalException if a portal exception occurred 3346 * @throws SystemException if a system exception occurred 3347 */ 3348 public static void updateAsset(long userId, 3349 com.liferay.portlet.journal.model.JournalArticle article, 3350 long[] assetCategoryIds, java.lang.String[] assetTagNames, 3351 long[] assetLinkEntryIds) 3352 throws com.liferay.portal.kernel.exception.PortalException, 3353 com.liferay.portal.kernel.exception.SystemException { 3354 getService() 3355 .updateAsset(userId, article, assetCategoryIds, assetTagNames, 3356 assetLinkEntryIds); 3357 } 3358 3359 /** 3360 * Updates the web content article matching the group, article ID, and 3361 * version, replacing its content. 3362 * 3363 * @param groupId the primary key of the web content article's group 3364 * @param articleId the primary key of the web content article 3365 * @param version the web content article's version 3366 * @param content the HTML content wrapped in XML. For more information, 3367 see the content example in the class description for {@link 3368 JournalArticleLocalServiceImpl}. 3369 * @return the updated web content article 3370 * @throws PortalException if a matching web content article could not be 3371 found 3372 * @throws SystemException if a system exception occurred 3373 */ 3374 public static com.liferay.portlet.journal.model.JournalArticle updateContent( 3375 long groupId, java.lang.String articleId, double version, 3376 java.lang.String content) 3377 throws com.liferay.portal.kernel.exception.PortalException, 3378 com.liferay.portal.kernel.exception.SystemException { 3379 return getService().updateContent(groupId, articleId, version, content); 3380 } 3381 3382 /** 3383 * Updates the workflow status of the web content article. 3384 * 3385 * @param userId the primary key of the user updating the web content 3386 article's status 3387 * @param article the web content article 3388 * @param status the web content article's workflow status. For more 3389 information see {@link WorkflowConstants} for constants starting 3390 with the "STATUS_" prefix. 3391 * @param articleURL the web content article's accessible URL 3392 * @param workflowContext the web content article's configured workflow 3393 context 3394 * @param serviceContext the service context to be applied. Can set the 3395 modification date, status date, and portlet preferences. With 3396 respect to social activities, by setting the service context's 3397 command to {@link 3398 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 3399 is considered a web content update activity; otherwise it is 3400 considered a web content add activity. 3401 * @return the updated web content article 3402 * @throws PortalException if a portal exception occurred 3403 * @throws SystemException if a system exception occurred 3404 */ 3405 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3406 long userId, com.liferay.portlet.journal.model.JournalArticle article, 3407 int status, java.lang.String articleURL, 3408 java.util.Map<java.lang.String, java.io.Serializable> workflowContext, 3409 com.liferay.portal.service.ServiceContext serviceContext) 3410 throws com.liferay.portal.kernel.exception.PortalException, 3411 com.liferay.portal.kernel.exception.SystemException { 3412 return getService() 3413 .updateStatus(userId, article, status, articleURL, 3414 workflowContext, serviceContext); 3415 } 3416 3417 /** 3418 * Updates the workflow status of the web content article matching the class 3419 * PK. 3420 * 3421 * @param userId the primary key of the user updating the web content 3422 article's status 3423 * @param classPK the primary key of the DDM structure, if the web content 3424 article is related to a DDM structure, the primary key of the 3425 class associated with the article, or <code>0</code> otherwise 3426 * @param status the web content article's workflow status. For more 3427 information see {@link WorkflowConstants} for constants starting 3428 with the "STATUS_" prefix. 3429 * @param workflowContext the web content article's configured workflow 3430 * @param serviceContext the service context to be applied. Can set the 3431 modification date, portlet preferences, and can set whether to 3432 add the default command update for the web content article. 3433 * @return the updated web content article 3434 * @throws PortalException if a matching web content article could not be 3435 found or if a portal exception occurred 3436 * @throws SystemException if a system exception occurred 3437 */ 3438 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3439 long userId, long classPK, int status, 3440 java.util.Map<java.lang.String, java.io.Serializable> workflowContext, 3441 com.liferay.portal.service.ServiceContext serviceContext) 3442 throws com.liferay.portal.kernel.exception.PortalException, 3443 com.liferay.portal.kernel.exception.SystemException { 3444 return getService() 3445 .updateStatus(userId, classPK, status, workflowContext, 3446 serviceContext); 3447 } 3448 3449 /** 3450 * Updates the workflow status of the web content article matching the 3451 * group, article ID, and version. 3452 * 3453 * @param userId the primary key of the user updating the web content 3454 article's status 3455 * @param groupId the primary key of the web content article's group 3456 * @param articleId the primary key of the web content article 3457 * @param version the web content article's version 3458 * @param status the web content article's workflow status. For more 3459 information see {@link WorkflowConstants} for constants starting 3460 with the "STATUS_" prefix. 3461 * @param articleURL the web content article's accessible URL 3462 * @param workflowContext the web content article's configured workflow 3463 * @param serviceContext the service context to be applied. Can set the 3464 modification date, portlet preferences, and can set whether to 3465 add the default command update for the web content article. 3466 * @return the updated web content article 3467 * @throws PortalException if a matching web content article could not be 3468 found or if a portal exception occurred 3469 * @throws SystemException if a system exception occurred 3470 */ 3471 public static com.liferay.portlet.journal.model.JournalArticle updateStatus( 3472 long userId, long groupId, java.lang.String articleId, double version, 3473 int status, java.lang.String articleURL, 3474 java.util.Map<java.lang.String, java.io.Serializable> workflowContext, 3475 com.liferay.portal.service.ServiceContext serviceContext) 3476 throws com.liferay.portal.kernel.exception.PortalException, 3477 com.liferay.portal.kernel.exception.SystemException { 3478 return getService() 3479 .updateStatus(userId, groupId, articleId, version, status, 3480 articleURL, workflowContext, serviceContext); 3481 } 3482 3483 /** 3484 * Updates the web content articles matching the group, class name ID, and 3485 * DDM template key, replacing the DDM template key with a new one. 3486 * 3487 * @param groupId the primary key of the web content article's group 3488 * @param classNameId the primary key of the DDMStructure class if the web 3489 content article is related to a DDM structure, the primary key of 3490 the class name associated with the article, or {@link 3491 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 3492 * @param oldDDMTemplateKey the primary key of the web content article's 3493 old DDM template 3494 * @param newDDMTemplateKey the primary key of the web content article's 3495 new DDM template 3496 * @throws SystemException if a system exception occurred 3497 */ 3498 public static void updateTemplateId(long groupId, long classNameId, 3499 java.lang.String oldDDMTemplateKey, java.lang.String newDDMTemplateKey) 3500 throws com.liferay.portal.kernel.exception.SystemException { 3501 getService() 3502 .updateTemplateId(groupId, classNameId, oldDDMTemplateKey, 3503 newDDMTemplateKey); 3504 } 3505 3506 public static JournalArticleLocalService getService() { 3507 if (_service == null) { 3508 _service = (JournalArticleLocalService)PortalBeanLocatorUtil.locate(JournalArticleLocalService.class.getName()); 3509 3510 ReferenceRegistry.registerReference(JournalArticleLocalServiceUtil.class, 3511 "_service"); 3512 } 3513 3514 return _service; 3515 } 3516 3517 /** 3518 * @deprecated As of 6.2.0 3519 */ 3520 public void setService(JournalArticleLocalService service) { 3521 } 3522 3523 private static JournalArticleLocalService _service; 3524 }