001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.journal.service.http; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.log.Log; 020 import com.liferay.portal.kernel.log.LogFactoryUtil; 021 import com.liferay.portal.kernel.util.ListUtil; 022 import com.liferay.portal.kernel.util.LocalizationUtil; 023 024 import com.liferay.portlet.journal.service.JournalArticleServiceUtil; 025 026 import java.rmi.RemoteException; 027 028 import java.util.Locale; 029 import java.util.Map; 030 031 /** 032 * Provides the SOAP utility for the 033 * {@link com.liferay.portlet.journal.service.JournalArticleServiceUtil} service utility. The 034 * static methods of this class calls the same methods of the service utility. 035 * However, the signatures are different because it is difficult for SOAP to 036 * support certain types. 037 * 038 * <p> 039 * ServiceBuilder follows certain rules in translating the methods. For example, 040 * if the method in the service utility returns a {@link java.util.List}, that 041 * is translated to an array of {@link com.liferay.portlet.journal.model.JournalArticleSoap}. 042 * If the method in the service utility returns a 043 * {@link com.liferay.portlet.journal.model.JournalArticle}, that is translated to a 044 * {@link com.liferay.portlet.journal.model.JournalArticleSoap}. Methods that SOAP cannot 045 * safely wire are skipped. 046 * </p> 047 * 048 * <p> 049 * The benefits of using the SOAP utility is that it is cross platform 050 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 051 * even Perl, to call the generated services. One drawback of SOAP is that it is 052 * slow because it needs to serialize all calls into a text format (XML). 053 * </p> 054 * 055 * <p> 056 * You can see a list of services at http://localhost:8080/api/axis. Set the 057 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 058 * security. 059 * </p> 060 * 061 * <p> 062 * The SOAP utility is only generated for remote services. 063 * </p> 064 * 065 * @author Brian Wing Shun Chan 066 * @see JournalArticleServiceHttp 067 * @see com.liferay.portlet.journal.model.JournalArticleSoap 068 * @see com.liferay.portlet.journal.service.JournalArticleServiceUtil 069 * @generated 070 */ 071 @ProviderType 072 public class JournalArticleServiceSoap { 073 /** 074 * Adds a web content article without any images. 075 * 076 * @param groupId the primary key of the web content article's group 077 * @param folderId the primary key of the web content article folder 078 * @param classNameId the primary key of the DDMStructure class if the web 079 content article is related to a DDM structure, the primary key of 080 the class name associated with the article, or {@link 081 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 082 * @param classPK the primary key of the DDM structure, if the primary key 083 of the DDMStructure class is given as the 084 <code>classNameId</code> parameter, the primary key of the class 085 associated with the web content article, or <code>0</code> 086 otherwise 087 * @param articleId the primary key of the web content article 088 * @param autoArticleId whether to auto generate the web content article ID 089 * @param titleMap the web content article's locales and localized titles 090 * @param descriptionMap the web content article's locales and localized 091 descriptions 092 * @param content the HTML content wrapped in XML. For more information, 093 see the content example in the class description for {@link 094 JournalArticleLocalServiceImpl}. 095 * @param type the structure's type, if the web content article is related 096 to a DDM structure. For more information, see {@link 097 com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. 098 * @param ddmStructureKey the primary key of the web content article's DDM 099 structure, if the article is related to a DDM structure, or 100 <code>null</code> otherwise 101 * @param ddmTemplateKey the primary key of the web content article's DDM 102 template (optionally <code>null</code>). If the article is 103 related to a DDM structure, the template's structure must match 104 it. 105 * @param layoutUuid the unique string identifying the web content 106 article's display page 107 * @param displayDateMonth the month the web content article is set to 108 display 109 * @param displayDateDay the calendar day the web content article is set to 110 display 111 * @param displayDateYear the year the web content article is set to 112 display 113 * @param displayDateHour the hour the web content article is set to 114 display 115 * @param displayDateMinute the minute the web content article is set to 116 display 117 * @param expirationDateMonth the month the web content article is set to 118 expire 119 * @param expirationDateDay the calendar day the web content article is set 120 to expire 121 * @param expirationDateYear the year the web content article is set to 122 expire 123 * @param expirationDateHour the hour the web content article is set to 124 expire 125 * @param expirationDateMinute the minute the web content article is set to 126 expire 127 * @param neverExpire whether the web content article is not set to auto 128 expire 129 * @param reviewDateMonth the month the web content article is set for 130 review 131 * @param reviewDateDay the calendar day the web content article is set for 132 review 133 * @param reviewDateYear the year the web content article is set for review 134 * @param reviewDateHour the hour the web content article is set for review 135 * @param reviewDateMinute the minute the web content article is set for 136 review 137 * @param neverReview whether the web content article is not set for review 138 * @param indexable whether the web content article is searchable 139 * @param articleURL the web content article's accessible URL 140 * @param serviceContext the service context to be applied. Can set the 141 UUID, creation date, modification date, expando bridge 142 attributes, guest permissions, group permissions, asset category 143 IDs, asset tag names, asset link entry IDs, the "urlTitle" 144 attribute, and workflow actions for the web content article. Can 145 also set whether to add the default guest and group permissions. 146 * @return the web content article 147 * @throws PortalException if the user did not have permission to add the 148 web content article or if a portal exception occurred 149 * @throws SystemException if a system exception occurred 150 */ 151 public static com.liferay.portlet.journal.model.JournalArticleSoap addArticle( 152 long groupId, long folderId, long classNameId, long classPK, 153 java.lang.String articleId, boolean autoArticleId, 154 java.lang.String[] titleMapLanguageIds, 155 java.lang.String[] titleMapValues, 156 java.lang.String[] descriptionMapLanguageIds, 157 java.lang.String[] descriptionMapValues, java.lang.String content, 158 java.lang.String type, java.lang.String ddmStructureKey, 159 java.lang.String ddmTemplateKey, java.lang.String layoutUuid, 160 int displayDateMonth, int displayDateDay, int displayDateYear, 161 int displayDateHour, int displayDateMinute, int expirationDateMonth, 162 int expirationDateDay, int expirationDateYear, int expirationDateHour, 163 int expirationDateMinute, boolean neverExpire, int reviewDateMonth, 164 int reviewDateDay, int reviewDateYear, int reviewDateHour, 165 int reviewDateMinute, boolean neverReview, boolean indexable, 166 java.lang.String articleURL, 167 com.liferay.portal.service.ServiceContext serviceContext) 168 throws RemoteException { 169 try { 170 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, 171 titleMapValues); 172 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 173 descriptionMapValues); 174 175 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.addArticle(groupId, 176 folderId, classNameId, classPK, articleId, autoArticleId, 177 titleMap, descriptionMap, content, type, ddmStructureKey, 178 ddmTemplateKey, layoutUuid, displayDateMonth, 179 displayDateDay, displayDateYear, displayDateHour, 180 displayDateMinute, expirationDateMonth, expirationDateDay, 181 expirationDateYear, expirationDateHour, 182 expirationDateMinute, neverExpire, reviewDateMonth, 183 reviewDateDay, reviewDateYear, reviewDateHour, 184 reviewDateMinute, neverReview, indexable, articleURL, 185 serviceContext); 186 187 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 188 } 189 catch (Exception e) { 190 _log.error(e, e); 191 192 throw new RemoteException(e.getMessage()); 193 } 194 } 195 196 /** 197 * Copies the web content article matching the group, article ID, and 198 * version. This method creates a new article, extracting all the values 199 * from the old one and updating its article ID. 200 * 201 * @param groupId the primary key of the web content article's group 202 * @param oldArticleId the primary key of the old web content article 203 * @param newArticleId the primary key of the new web content article 204 * @param autoArticleId whether to auto-generate the web content article ID 205 * @param version the web content article's version 206 * @return the new web content article 207 * @throws PortalException if the user did not have permission to add the 208 copy the web content article, if a matching web content article 209 could not be found, or if a portal exception occurred 210 * @throws SystemException if a system exception occurred 211 */ 212 public static com.liferay.portlet.journal.model.JournalArticleSoap copyArticle( 213 long groupId, java.lang.String oldArticleId, 214 java.lang.String newArticleId, boolean autoArticleId, double version) 215 throws RemoteException { 216 try { 217 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.copyArticle(groupId, 218 oldArticleId, newArticleId, autoArticleId, version); 219 220 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 221 } 222 catch (Exception e) { 223 _log.error(e, e); 224 225 throw new RemoteException(e.getMessage()); 226 } 227 } 228 229 /** 230 * Deletes the web content article and its resources matching the group, 231 * article ID, and version, optionally sending email notifying denial of the 232 * web content article if it had not yet been approved. 233 * 234 * @param groupId the primary key of the web content article's group 235 * @param articleId the primary key of the web content article 236 * @param version the web content article's version 237 * @param articleURL the web content article's accessible URL 238 * @param serviceContext the service context to be applied. Can set the 239 portlet preferences that include email information to notify 240 recipients of the unapproved web content article's denial. 241 * @throws PortalException if the user did not have permission to delete the 242 web content article, if a matching web content article could not 243 be found, or if a portal exception occurred 244 * @throws SystemException if a system exception occurred 245 */ 246 public static void deleteArticle(long groupId, java.lang.String articleId, 247 double version, java.lang.String articleURL, 248 com.liferay.portal.service.ServiceContext serviceContext) 249 throws RemoteException { 250 try { 251 JournalArticleServiceUtil.deleteArticle(groupId, articleId, 252 version, articleURL, serviceContext); 253 } 254 catch (Exception e) { 255 _log.error(e, e); 256 257 throw new RemoteException(e.getMessage()); 258 } 259 } 260 261 /** 262 * Deletes all web content articles and their resources matching the group 263 * and article ID, optionally sending email notifying denial of article if 264 * it had not yet been approved. 265 * 266 * @param groupId the primary key of the web content article's group 267 * @param articleId the primary key of the web content article 268 * @param articleURL the web content article's accessible URL 269 * @param serviceContext the service context to be applied. Can set the 270 portlet preferences that include email information to notify 271 recipients of the unapproved web content article's denial. 272 * @throws PortalException if the user did not have permission to delete the 273 web content article or if a portal exception occurred 274 * @throws SystemException if a system exception occurred 275 */ 276 public static void deleteArticle(long groupId, java.lang.String articleId, 277 java.lang.String articleURL, 278 com.liferay.portal.service.ServiceContext serviceContext) 279 throws RemoteException { 280 try { 281 JournalArticleServiceUtil.deleteArticle(groupId, articleId, 282 articleURL, serviceContext); 283 } 284 catch (Exception e) { 285 _log.error(e, e); 286 287 throw new RemoteException(e.getMessage()); 288 } 289 } 290 291 /** 292 * Expires the web content article matching the group, article ID, and 293 * version. 294 * 295 * @param groupId the primary key of the web content article's group 296 * @param articleId the primary key of the web content article 297 * @param version the web content article's version 298 * @param articleURL the web content article's accessible URL 299 * @param serviceContext the service context to be applied. Can set the 300 modification date, status date, portlet preferences, and can set 301 whether to add the default command update for the web content 302 article. With respect to social activities, by setting the 303 service context's command to {@link 304 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 305 is considered a web content update activity; otherwise it is 306 considered a web content add activity. 307 * @return the web content article 308 * @throws PortalException if the user did not have permission to expire the 309 web content article, if a matching web content article could not 310 be found, or if a portal exception occurred 311 * @throws SystemException if a system exception occurred 312 */ 313 public static com.liferay.portlet.journal.model.JournalArticleSoap expireArticle( 314 long groupId, java.lang.String articleId, double version, 315 java.lang.String articleURL, 316 com.liferay.portal.service.ServiceContext serviceContext) 317 throws RemoteException { 318 try { 319 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.expireArticle(groupId, 320 articleId, version, articleURL, serviceContext); 321 322 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 323 } 324 catch (Exception e) { 325 _log.error(e, e); 326 327 throw new RemoteException(e.getMessage()); 328 } 329 } 330 331 /** 332 * Expires the web content article matching the group and article ID, 333 * expiring all of its versions if the 334 * <code>journal.article.expire.all.versions</code> portal property is 335 * <code>true</code>, otherwise expiring only its latest approved version. 336 * 337 * @param groupId the primary key of the web content article's group 338 * @param articleId the primary key of the web content article 339 * @param articleURL the web content article's accessible URL 340 * @param serviceContext the service context to be applied. Can set the 341 modification date, status date, portlet preferences, and can set 342 whether to add the default command update for the web content 343 article. With respect to social activities, by setting the 344 service context's command to {@link 345 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 346 is considered a web content update activity; otherwise it is 347 considered a web content add activity. 348 * @throws PortalException if the user did not have permission to expire the 349 web content article, if a matching web content article could not 350 be found, or if a portal exception occurred 351 * @throws SystemException if a system exception occurred 352 */ 353 public static void expireArticle(long groupId, java.lang.String articleId, 354 java.lang.String articleURL, 355 com.liferay.portal.service.ServiceContext serviceContext) 356 throws RemoteException { 357 try { 358 JournalArticleServiceUtil.expireArticle(groupId, articleId, 359 articleURL, serviceContext); 360 } 361 catch (Exception e) { 362 _log.error(e, e); 363 364 throw new RemoteException(e.getMessage()); 365 } 366 } 367 368 public static com.liferay.portlet.journal.model.JournalArticleSoap fetchArticle( 369 long groupId, java.lang.String articleId) throws RemoteException { 370 try { 371 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.fetchArticle(groupId, 372 articleId); 373 374 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 375 } 376 catch (Exception e) { 377 _log.error(e, e); 378 379 throw new RemoteException(e.getMessage()); 380 } 381 } 382 383 /** 384 * Returns the web content article with the ID. 385 * 386 * @param id the primary key of the web content article 387 * @return the web content article with the ID 388 * @throws PortalException if a matching web content article could not be 389 found or if the user did not have permission to view the web 390 content article 391 * @throws SystemException if a system exception occurred 392 */ 393 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 394 long id) throws RemoteException { 395 try { 396 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(id); 397 398 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 399 } 400 catch (Exception e) { 401 _log.error(e, e); 402 403 throw new RemoteException(e.getMessage()); 404 } 405 } 406 407 /** 408 * Returns the latest approved web content article, or the latest unapproved 409 * article if none are approved. Both approved and unapproved articles must 410 * match the group and article ID. 411 * 412 * @param groupId the primary key of the web content article's group 413 * @param articleId the primary key of the web content article 414 * @return the matching web content article 415 * @throws PortalException if the user did not have permission to view the 416 web content article or if a matching web content article could 417 not be found 418 * @throws SystemException if a system exception occurred 419 */ 420 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 421 long groupId, java.lang.String articleId) throws RemoteException { 422 try { 423 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 424 articleId); 425 426 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 427 } 428 catch (Exception e) { 429 _log.error(e, e); 430 431 throw new RemoteException(e.getMessage()); 432 } 433 } 434 435 /** 436 * Returns the web content article matching the group, article ID, and 437 * version. 438 * 439 * @param groupId the primary key of the web content article's group 440 * @param articleId the primary key of the web content article 441 * @param version the web content article's version 442 * @return the matching web content article 443 * @throws PortalException if the user did not have permission to view the 444 web content article or if a matching web content article could 445 not be found 446 * @throws SystemException if a system exception occurred 447 */ 448 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 449 long groupId, java.lang.String articleId, double version) 450 throws RemoteException { 451 try { 452 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 453 articleId, version); 454 455 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 456 } 457 catch (Exception e) { 458 _log.error(e, e); 459 460 throw new RemoteException(e.getMessage()); 461 } 462 } 463 464 /** 465 * Returns the web content article matching the group, class name, and class 466 * PK. 467 * 468 * @param groupId the primary key of the web content article's group 469 * @param className the DDMStructure class name if the web content article 470 is related to a DDM structure, the primary key of the class name 471 associated with the article, or {@link 472 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 473 * @param classPK the primary key of the DDM structure, if the the 474 DDMStructure class name is given as the <code>className</code> 475 parameter, the primary key of the class associated with the web 476 content article, or <code>0</code> otherwise 477 * @return the matching web content article 478 * @throws PortalException if a matching web content article could not be 479 found or if the user did not have permission to view the web 480 content article 481 * @throws SystemException if a system exception occurred 482 */ 483 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 484 long groupId, java.lang.String className, long classPK) 485 throws RemoteException { 486 try { 487 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 488 className, classPK); 489 490 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 491 } 492 catch (Exception e) { 493 _log.error(e, e); 494 495 throw new RemoteException(e.getMessage()); 496 } 497 } 498 499 /** 500 * Returns the latest web content article that is approved, or the latest 501 * unapproved article if none are approved. Both approved and unapproved 502 * articles must match the group and URL title. 503 * 504 * @param groupId the primary key of the web content article's group 505 * @param urlTitle the web content article's accessible URL title 506 * @return the matching web content article 507 * @throws PortalException if the user did not have permission to view the 508 web content article or if a portal exception occurred 509 * @throws SystemException if a system exception occurred 510 */ 511 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle( 512 long groupId, java.lang.String urlTitle) throws RemoteException { 513 try { 514 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId, 515 urlTitle); 516 517 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 518 } 519 catch (Exception e) { 520 _log.error(e, e); 521 522 throw new RemoteException(e.getMessage()); 523 } 524 } 525 526 /** 527 * Returns all the web content articles matching the group and folder. 528 * 529 * @param groupId the primary key of the web content article's group 530 * @param folderId the primary key of the web content article folder 531 * @return the matching web content articles 532 * @throws SystemException if a system exception occurred 533 */ 534 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticles( 535 long groupId, long folderId) throws RemoteException { 536 try { 537 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 538 JournalArticleServiceUtil.getArticles(groupId, folderId); 539 540 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 541 } 542 catch (Exception e) { 543 _log.error(e, e); 544 545 throw new RemoteException(e.getMessage()); 546 } 547 } 548 549 /** 550 * Returns an ordered range of all the web content articles matching the 551 * group and folder. 552 * 553 * <p> 554 * Useful when paginating results. Returns a maximum of <code>end - 555 * start</code> instances. <code>start</code> and <code>end</code> are not 556 * primary keys, they are indexes in the result set. Thus, <code>0</code> 557 * refers to the first result in the set. Setting both <code>start</code> 558 * and <code>end</code> to {@link 559 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 560 * result set. 561 * </p> 562 * 563 * @param groupId the primary key of the web content article's group 564 * @param folderId the primary key of the web content article folder 565 * @param start the lower bound of the range of web content articles to 566 return 567 * @param end the upper bound of the range of web content articles to 568 return (not inclusive) 569 * @param obc the comparator to order the web content articles 570 * @return the matching web content articles 571 * @throws SystemException if a system exception occurred 572 */ 573 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticles( 574 long groupId, long folderId, int start, int end, 575 com.liferay.portal.kernel.util.OrderByComparator obc) 576 throws RemoteException { 577 try { 578 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 579 JournalArticleServiceUtil.getArticles(groupId, folderId, start, 580 end, obc); 581 582 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 583 } 584 catch (Exception e) { 585 _log.error(e, e); 586 587 throw new RemoteException(e.getMessage()); 588 } 589 } 590 591 /** 592 * Returns an ordered range of all the web content articles matching the 593 * group and article ID. 594 * 595 * <p> 596 * Useful when paginating results. Returns a maximum of <code>end - 597 * start</code> instances. <code>start</code> and <code>end</code> are not 598 * primary keys, they are indexes in the result set. Thus, <code>0</code> 599 * refers to the first result in the set. Setting both <code>start</code> 600 * and <code>end</code> to {@link 601 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 602 * result set. 603 * </p> 604 * 605 * @param groupId the primary key of the web content article's group 606 * @param articleId the primary key of the web content article 607 * @param start the lower bound of the range of web content articles to 608 return 609 * @param end the upper bound of the range of web content articles to 610 return (not inclusive) 611 * @param obc the comparator to order the web content articles 612 * @return the range of matching web content articles ordered by the 613 comparator 614 * @throws SystemException if a system exception occurred 615 */ 616 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByArticleId( 617 long groupId, java.lang.String articleId, int start, int end, 618 com.liferay.portal.kernel.util.OrderByComparator obc) 619 throws RemoteException { 620 try { 621 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 622 JournalArticleServiceUtil.getArticlesByArticleId(groupId, 623 articleId, start, end, obc); 624 625 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 626 } 627 catch (Exception e) { 628 _log.error(e, e); 629 630 throw new RemoteException(e.getMessage()); 631 } 632 } 633 634 /** 635 * Returns all the web content articles matching the group and layout UUID. 636 * 637 * @param groupId the primary key of the web content article's group 638 * @param layoutUuid the unique string identifying the web content 639 article's display page 640 * @return the matching web content articles 641 * @throws SystemException if a system exception occurred 642 */ 643 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByLayoutUuid( 644 long groupId, java.lang.String layoutUuid) throws RemoteException { 645 try { 646 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 647 JournalArticleServiceUtil.getArticlesByLayoutUuid(groupId, 648 layoutUuid); 649 650 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 651 } 652 catch (Exception e) { 653 _log.error(e, e); 654 655 throw new RemoteException(e.getMessage()); 656 } 657 } 658 659 /** 660 * Returns an ordered range of all the web content articles matching the 661 * group, class name ID, DDM structure key, and workflow status. 662 * 663 * <p> 664 * Useful when paginating results. Returns a maximum of <code>end - 665 * start</code> instances. <code>start</code> and <code>end</code> are not 666 * primary keys, they are indexes in the result set. Thus, <code>0</code> 667 * refers to the first result in the set. Setting both <code>start</code> 668 * and <code>end</code> to {@link 669 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 670 * result set. 671 * </p> 672 * 673 * @param groupId the primary key of the web content article's group 674 * @param classNameId the primary key of the DDMStructure class if the web 675 content article is related to a DDM structure, the primary key of 676 the class name associated with the article, or {@link 677 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 678 * @param ddmStructureKey the primary key of the web content article's DDM 679 structure 680 * @param status the web content article's workflow status. For more 681 information see {@link WorkflowConstants} for constants starting 682 with the "STATUS_" prefix. 683 * @param start the lower bound of the range of web content articles to 684 return 685 * @param end the upper bound of the range of web content articles to 686 return (not inclusive) 687 * @param obc the comparator to order the web content articles 688 * @return the range of matching web content articles ordered by the 689 comparator 690 * @throws SystemException if a system exception occurred 691 */ 692 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByStructureId( 693 long groupId, long classNameId, java.lang.String ddmStructureKey, 694 int status, int start, int end, 695 com.liferay.portal.kernel.util.OrderByComparator obc) 696 throws RemoteException { 697 try { 698 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 699 JournalArticleServiceUtil.getArticlesByStructureId(groupId, 700 classNameId, ddmStructureKey, status, start, end, obc); 701 702 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 703 } 704 catch (Exception e) { 705 _log.error(e, e); 706 707 throw new RemoteException(e.getMessage()); 708 } 709 } 710 711 /** 712 * Returns an ordered range of all the web content articles matching the 713 * group, default class name ID, and DDM structure key. 714 * 715 * <p> 716 * Useful when paginating results. Returns a maximum of <code>end - 717 * start</code> instances. <code>start</code> and <code>end</code> are not 718 * primary keys, they are indexes in the result set. Thus, <code>0</code> 719 * refers to the first result in the set. Setting both <code>start</code> 720 * and <code>end</code> to {@link 721 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 722 * result set. 723 * </p> 724 * 725 * @param groupId the primary key of the web content article's group 726 * @param ddmStructureKey the primary key of the web content article's DDM 727 structure 728 * @param start the lower bound of the range of web content articles to 729 return 730 * @param end the upper bound of the range of web content articles to 731 return (not inclusive) 732 * @param obc the comparator to order the web content articles 733 * @return the range of matching web content articles ordered by the 734 comparator 735 * @throws SystemException if a system exception occurred 736 */ 737 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByStructureId( 738 long groupId, java.lang.String ddmStructureKey, int start, int end, 739 com.liferay.portal.kernel.util.OrderByComparator obc) 740 throws RemoteException { 741 try { 742 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 743 JournalArticleServiceUtil.getArticlesByStructureId(groupId, 744 ddmStructureKey, start, end, obc); 745 746 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 747 } 748 catch (Exception e) { 749 _log.error(e, e); 750 751 throw new RemoteException(e.getMessage()); 752 } 753 } 754 755 /** 756 * Returns the number of web content articles matching the group and folder. 757 * 758 * @param groupId the primary key of the web content article's group 759 * @param folderId the primary key of the web content article folder 760 * @return the number of matching web content articles 761 * @throws SystemException if a system exception occurred 762 */ 763 public static int getArticlesCount(long groupId, long folderId) 764 throws RemoteException { 765 try { 766 int returnValue = JournalArticleServiceUtil.getArticlesCount(groupId, 767 folderId); 768 769 return returnValue; 770 } 771 catch (Exception e) { 772 _log.error(e, e); 773 774 throw new RemoteException(e.getMessage()); 775 } 776 } 777 778 public static int getArticlesCount(long groupId, long folderId, int status) 779 throws RemoteException { 780 try { 781 int returnValue = JournalArticleServiceUtil.getArticlesCount(groupId, 782 folderId, status); 783 784 return returnValue; 785 } 786 catch (Exception e) { 787 _log.error(e, e); 788 789 throw new RemoteException(e.getMessage()); 790 } 791 } 792 793 /** 794 * Returns the number of web content articles matching the group and article 795 * ID. 796 * 797 * @param groupId the primary key of the web content article's group 798 * @param articleId the primary key of the web content article 799 * @return the number of matching web content articles 800 * @throws SystemException if a system exception occurred 801 */ 802 public static int getArticlesCountByArticleId(long groupId, 803 java.lang.String articleId) throws RemoteException { 804 try { 805 int returnValue = JournalArticleServiceUtil.getArticlesCountByArticleId(groupId, 806 articleId); 807 808 return returnValue; 809 } 810 catch (Exception e) { 811 _log.error(e, e); 812 813 throw new RemoteException(e.getMessage()); 814 } 815 } 816 817 /** 818 * Returns the number of web content articles matching the group, class name 819 * ID, DDM structure key, and workflow status. 820 * 821 * @param groupId the primary key of the web content article's group 822 * @param classNameId the primary key of the DDMStructure class if the web 823 content article is related to a DDM structure, the primary key of 824 the class name associated with the article, or {@link 825 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 826 * @param ddmStructureKey the primary key of the web content article's DDM 827 structure 828 * @param status the web content article's workflow status. For more 829 information see {@link WorkflowConstants} for constants starting 830 with the "STATUS_" prefix. 831 * @return the number of matching web content articles 832 * @throws SystemException if a system exception occurred 833 */ 834 public static int getArticlesCountByStructureId(long groupId, 835 long classNameId, java.lang.String ddmStructureKey, int status) 836 throws RemoteException { 837 try { 838 int returnValue = JournalArticleServiceUtil.getArticlesCountByStructureId(groupId, 839 classNameId, ddmStructureKey, status); 840 841 return returnValue; 842 } 843 catch (Exception e) { 844 _log.error(e, e); 845 846 throw new RemoteException(e.getMessage()); 847 } 848 } 849 850 /** 851 * Returns the number of web content articles matching the group, default 852 * class name ID, and DDM structure key. 853 * 854 * @param groupId the primary key of the web content article's group 855 * @param ddmStructureKey the primary key of the web content article's DDM 856 structure 857 * @return the number of matching web content articles 858 * @throws SystemException if a system exception occurred 859 */ 860 public static int getArticlesCountByStructureId(long groupId, 861 java.lang.String ddmStructureKey) throws RemoteException { 862 try { 863 int returnValue = JournalArticleServiceUtil.getArticlesCountByStructureId(groupId, 864 ddmStructureKey); 865 866 return returnValue; 867 } 868 catch (Exception e) { 869 _log.error(e, e); 870 871 throw new RemoteException(e.getMessage()); 872 } 873 } 874 875 /** 876 * Returns the web content article matching the URL title that is currently 877 * displayed or next to be displayed if no article is currently displayed. 878 * 879 * @param groupId the primary key of the web content article's group 880 * @param urlTitle the web content article's accessible URL title 881 * @return the web content article matching the URL title that is currently 882 displayed, or next one to be displayed if no version of the 883 article is currently displayed 884 * @throws PortalException if the user did not have permission to view the 885 web content article or if no approved matching web content 886 articles could be found 887 * @throws SystemException if a system exception occurred 888 */ 889 public static com.liferay.portlet.journal.model.JournalArticleSoap getDisplayArticleByUrlTitle( 890 long groupId, java.lang.String urlTitle) throws RemoteException { 891 try { 892 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getDisplayArticleByUrlTitle(groupId, 893 urlTitle); 894 895 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 896 } 897 catch (Exception e) { 898 _log.error(e, e); 899 900 throw new RemoteException(e.getMessage()); 901 } 902 } 903 904 /** 905 * Returns the number of folders containing web content articles belonging 906 * to the group. 907 * 908 * @param groupId the primary key of the web content article's group 909 * @param folderIds the primary keys of the web content article folders 910 (optionally {@link java.util.Collections#EMPTY_LIST}) 911 * @return the number of matching folders containing web content articles 912 * @throws SystemException if a system exception occurred 913 */ 914 public static int getFoldersAndArticlesCount(long groupId, Long[] folderIds) 915 throws RemoteException { 916 try { 917 int returnValue = JournalArticleServiceUtil.getFoldersAndArticlesCount(groupId, 918 ListUtil.toList(folderIds)); 919 920 return returnValue; 921 } 922 catch (Exception e) { 923 _log.error(e, e); 924 925 throw new RemoteException(e.getMessage()); 926 } 927 } 928 929 /** 930 * Returns an ordered range of all the web content articles matching the 931 * group, user, the root folder or any of its subfolders. 932 * 933 * @param groupId the primary key of the web content article's group 934 * @param userId the primary key of the user (optionally <code>0</code>) 935 * @param rootFolderId the primary key of the root folder to begin the 936 search 937 * @param status the web content article's workflow status. For more 938 information see {@link WorkflowConstants} for constants starting 939 with the "STATUS_" prefix. 940 * @param start the lower bound of the range of web content articles to 941 return 942 * @param end the upper bound of the range of web content articles to 943 return (not inclusive) 944 * @param orderByComparator the comparator to order the web content 945 articles 946 * @return the range of matching web content articles ordered by the 947 comparator 948 * @throws PortalException if the root folder could not be found, if the 949 current user did not have permission to view the root folder, or 950 if a portal exception occurred 951 * @throws SystemException if a system exception occurred 952 */ 953 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 954 long groupId, long userId, long rootFolderId, int status, 955 boolean includeOwner, int start, int end, 956 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 957 throws RemoteException { 958 try { 959 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 960 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 961 rootFolderId, status, includeOwner, start, end, 962 orderByComparator); 963 964 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 965 } 966 catch (Exception e) { 967 _log.error(e, e); 968 969 throw new RemoteException(e.getMessage()); 970 } 971 } 972 973 /** 974 * Returns an ordered range of all the web content articles matching the 975 * group, user, the root folder or any of its subfolders. 976 * 977 * @param groupId the primary key of the web content article's group 978 * @param userId the primary key of the user (optionally <code>0</code>) 979 * @param rootFolderId the primary key of the root folder to begin the 980 search 981 * @param status the web content article's workflow status. For more 982 information see {@link WorkflowConstants} for constants starting 983 with the "STATUS_" prefix. 984 * @param start the lower bound of the range of web content articles to 985 return 986 * @param end the upper bound of the range of web content articles to 987 return (not inclusive) 988 * @param orderByComparator the comparator to order the web content 989 articles 990 * @return the range of matching web content articles ordered by the 991 comparator 992 * @throws PortalException if the root folder could not be found, if the 993 current user did not have permission to view the root folder, or 994 if a portal exception occurred 995 * @throws SystemException if a system exception occurred 996 */ 997 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 998 long groupId, long userId, long rootFolderId, int status, int start, 999 int end, 1000 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1001 throws RemoteException { 1002 try { 1003 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1004 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 1005 rootFolderId, status, start, end, orderByComparator); 1006 1007 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1008 } 1009 catch (Exception e) { 1010 _log.error(e, e); 1011 1012 throw new RemoteException(e.getMessage()); 1013 } 1014 } 1015 1016 /** 1017 * Returns an ordered range of all the web content articles matching the 1018 * group, user, the root folder or any of its subfolders. 1019 * 1020 * <p> 1021 * Useful when paginating results. Returns a maximum of <code>end - 1022 * start</code> instances. <code>start</code> and <code>end</code> are not 1023 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1024 * refers to the first result in the set. Setting both <code>start</code> 1025 * and <code>end</code> to {@link 1026 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1027 * result set. 1028 * </p> 1029 * 1030 * @param groupId the primary key of the web content article's group 1031 * @param userId the primary key of the user (optionally <code>0</code>) 1032 * @param rootFolderId the primary key of the root folder to begin the 1033 search 1034 * @param start the lower bound of the range of web content articles to 1035 return 1036 * @param end the upper bound of the range of web content articles to 1037 return (not inclusive) 1038 * @param orderByComparator the comparator to order the web content 1039 articles 1040 * @return the range of matching web content articles ordered by the 1041 comparator 1042 * @throws PortalException if the root folder could not be found, if the 1043 current user did not have permission to view the root folder, or 1044 if a portal exception occurred 1045 * @throws SystemException if a system exception occurred 1046 */ 1047 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 1048 long groupId, long userId, long rootFolderId, int start, int end, 1049 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1050 throws RemoteException { 1051 try { 1052 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1053 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 1054 rootFolderId, start, end, orderByComparator); 1055 1056 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1057 } 1058 catch (Exception e) { 1059 _log.error(e, e); 1060 1061 throw new RemoteException(e.getMessage()); 1062 } 1063 } 1064 1065 /** 1066 * Returns the number of web content articles matching the group, user, and 1067 * the root folder or any of its subfolders. 1068 * 1069 * @param groupId the primary key of the web content article's group 1070 * @param userId the primary key of the user (optionally <code>0</code>) 1071 * @param rootFolderId the primary key of the root folder to begin the 1072 search 1073 * @return the number of matching web content articles 1074 * @throws PortalException if the root folder could not be found, if the 1075 current user did not have permission to view the root folder, or 1076 if a portal exception occurred 1077 * @throws SystemException if a system exception occurred 1078 */ 1079 public static int getGroupArticlesCount(long groupId, long userId, 1080 long rootFolderId) throws RemoteException { 1081 try { 1082 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1083 userId, rootFolderId); 1084 1085 return returnValue; 1086 } 1087 catch (Exception e) { 1088 _log.error(e, e); 1089 1090 throw new RemoteException(e.getMessage()); 1091 } 1092 } 1093 1094 public static int getGroupArticlesCount(long groupId, long userId, 1095 long rootFolderId, int status) throws RemoteException { 1096 try { 1097 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1098 userId, rootFolderId, status); 1099 1100 return returnValue; 1101 } 1102 catch (Exception e) { 1103 _log.error(e, e); 1104 1105 throw new RemoteException(e.getMessage()); 1106 } 1107 } 1108 1109 /** 1110 * Returns the number of web content articles matching the group, user, 1111 * the root folder or any of its subfolders. 1112 * 1113 * @param groupId the primary key of the web content article's group 1114 * @param userId the primary key of the user (optionally <code>0</code>) 1115 * @param rootFolderId the primary key of the root folder to begin the 1116 search 1117 * @param status the web content article's workflow status. For more 1118 information see {@link WorkflowConstants} for constants starting 1119 with the "STATUS_" prefix. 1120 * @return the range of matching web content articles ordered by the 1121 comparator 1122 * @throws PortalException if the root folder could not be found, if the 1123 current user did not have permission to view the root folder, or 1124 if a portal exception occurred 1125 * @throws SystemException if a system exception occurred 1126 */ 1127 public static int getGroupArticlesCount(long groupId, long userId, 1128 long rootFolderId, int status, boolean includeOwner) 1129 throws RemoteException { 1130 try { 1131 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1132 userId, rootFolderId, status, includeOwner); 1133 1134 return returnValue; 1135 } 1136 catch (Exception e) { 1137 _log.error(e, e); 1138 1139 throw new RemoteException(e.getMessage()); 1140 } 1141 } 1142 1143 /** 1144 * Returns the latest web content article matching the resource primary key, 1145 * preferring articles with approved workflow status. 1146 * 1147 * @param resourcePrimKey the primary key of the resource instance 1148 * @return the latest web content article matching the resource primary key, 1149 preferring articles with approved workflow status 1150 * @throws PortalException if the user did not have permission to view the 1151 web content article or if a matching web content article could 1152 not be found 1153 * @throws SystemException if a system exception occurred 1154 */ 1155 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1156 long resourcePrimKey) throws RemoteException { 1157 try { 1158 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(resourcePrimKey); 1159 1160 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1161 } 1162 catch (Exception e) { 1163 _log.error(e, e); 1164 1165 throw new RemoteException(e.getMessage()); 1166 } 1167 } 1168 1169 /** 1170 * Returns the latest web content article matching the group, article ID, 1171 * and workflow status. 1172 * 1173 * @param groupId the primary key of the web content article's group 1174 * @param articleId the primary key of the web content article 1175 * @param status the web content article's workflow status. For more 1176 information see {@link WorkflowConstants} for constants starting 1177 with the "STATUS_" prefix. 1178 * @return the latest matching web content article 1179 * @throws PortalException if the user did not have permission to view the 1180 web content article or if a matching web content article could 1181 not be found 1182 * @throws SystemException if a system exception occurred 1183 */ 1184 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1185 long groupId, java.lang.String articleId, int status) 1186 throws RemoteException { 1187 try { 1188 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1189 articleId, status); 1190 1191 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1192 } 1193 catch (Exception e) { 1194 _log.error(e, e); 1195 1196 throw new RemoteException(e.getMessage()); 1197 } 1198 } 1199 1200 /** 1201 * Returns the latest web content article matching the group, class name ID, 1202 * and class PK. 1203 * 1204 * @param groupId the primary key of the web content article's group 1205 * @param className the DDMStructure class name if the web content article 1206 is related to a DDM structure, the class name associated with the 1207 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1208 otherwise 1209 * @param classPK the primary key of the DDM structure, if the DDMStructure 1210 class name is given as the <code>className</code> parameter, the 1211 primary key of the class associated with the web content article, 1212 or <code>0</code> otherwise 1213 * @return the latest matching web content article 1214 * @throws PortalException if a matching web content article could not be 1215 found or if the user did not have permission to view the web 1216 content article 1217 * @throws SystemException if a system exception occurred 1218 */ 1219 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1220 long groupId, java.lang.String className, long classPK) 1221 throws RemoteException { 1222 try { 1223 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1224 className, classPK); 1225 1226 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1227 } 1228 catch (Exception e) { 1229 _log.error(e, e); 1230 1231 throw new RemoteException(e.getMessage()); 1232 } 1233 } 1234 1235 /** 1236 * Moves all versions of the the web content article matching the group and 1237 * article ID to the folder. 1238 * 1239 * @param groupId the primary key of the web content article's group 1240 * @param articleId the primary key of the web content article 1241 * @param newFolderId the primary key of the web content article's new 1242 folder 1243 * @throws PortalException if the user did not have permission to update any 1244 one of the versions of the web content article or if any one of 1245 the versions of the web content article could not be moved to the 1246 folder 1247 * @throws SystemException if a system exception occurred 1248 */ 1249 public static void moveArticle(long groupId, java.lang.String articleId, 1250 long newFolderId) throws RemoteException { 1251 try { 1252 JournalArticleServiceUtil.moveArticle(groupId, articleId, 1253 newFolderId); 1254 } 1255 catch (Exception e) { 1256 _log.error(e, e); 1257 1258 throw new RemoteException(e.getMessage()); 1259 } 1260 } 1261 1262 /** 1263 * Moves the web content article from the Recycle Bin to the folder. 1264 * 1265 * @param groupId the primary key of the web content article's group 1266 * @param resourcePrimKey the primary key of the resource instance 1267 * @param newFolderId the primary key of the web content article's new 1268 folder 1269 * @param serviceContext the service context to be applied. Can set the 1270 modification date, portlet preferences, and can set whether to 1271 add the default command update for the web content article. With 1272 respect to social activities, by setting the service context's 1273 command to {@link 1274 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1275 is considered a web content update activity; otherwise it is 1276 considered a web content add activity. 1277 * @return the updated web content article, which was moved from the Recycle 1278 Bin to the folder 1279 * @throws PortalException if the user did not have permission to view or 1280 update the web content article, if a matching trashed web content 1281 article could not be found, or if a portal exception occurred 1282 * @throws SystemException if a system exception occurred 1283 */ 1284 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1285 long groupId, long resourcePrimKey, long newFolderId, 1286 com.liferay.portal.service.ServiceContext serviceContext) 1287 throws RemoteException { 1288 try { 1289 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1290 resourcePrimKey, newFolderId, serviceContext); 1291 1292 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1293 } 1294 catch (Exception e) { 1295 _log.error(e, e); 1296 1297 throw new RemoteException(e.getMessage()); 1298 } 1299 } 1300 1301 /** 1302 * Moves the web content article from the Recycle Bin to the folder. 1303 * 1304 * @param groupId the primary key of the web content article's group 1305 * @param articleId the primary key of the web content article 1306 * @param newFolderId the primary key of the web content article's new 1307 folder 1308 * @param serviceContext the service context to be applied. Can set the 1309 modification date, portlet preferences, and can set whether to 1310 add the default command update for the web content article. With 1311 respect to social activities, by setting the service context's 1312 command to {@link 1313 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1314 is considered a web content update activity; otherwise it is 1315 considered a web content add activity. 1316 * @return the updated web content article, which was moved from the Recycle 1317 Bin to the folder 1318 * @throws PortalException if the user did not have permission to view or 1319 update the web content article, if a trashed web content article 1320 with the primary key could not be found, or if a portal exception 1321 occurred 1322 * @throws SystemException if a system exception occurred 1323 */ 1324 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1325 long groupId, java.lang.String articleId, long newFolderId, 1326 com.liferay.portal.service.ServiceContext serviceContext) 1327 throws RemoteException { 1328 try { 1329 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1330 articleId, newFolderId, serviceContext); 1331 1332 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1333 } 1334 catch (Exception e) { 1335 _log.error(e, e); 1336 1337 throw new RemoteException(e.getMessage()); 1338 } 1339 } 1340 1341 /** 1342 * Moves the latest version of the web content article matching the group 1343 * and article ID to the recycle bin. 1344 * 1345 * @param groupId the primary key of the web content article's group 1346 * @param articleId the primary key of the web content article 1347 * @return the moved web content article or <code>null</code> if no matching 1348 article was found 1349 * @throws PortalException if the user did not have permission to move the 1350 article to the Recycle Bin or if a portal exception occurred 1351 * @throws SystemException if a system exception occurred 1352 */ 1353 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleToTrash( 1354 long groupId, java.lang.String articleId) throws RemoteException { 1355 try { 1356 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleToTrash(groupId, 1357 articleId); 1358 1359 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1360 } 1361 catch (Exception e) { 1362 _log.error(e, e); 1363 1364 throw new RemoteException(e.getMessage()); 1365 } 1366 } 1367 1368 /** 1369 * Removes the web content of all the company's web content articles 1370 * matching the language. 1371 * 1372 * @param companyId the primary key of the web content article's company 1373 * @param languageId the primary key of the language locale to remove 1374 * @throws PortalException if the user did not have permission to update any 1375 one of the the web content articles or if web content matching 1376 the language could not be found for any one of the articles 1377 * @throws SystemException if a system exception occurred 1378 */ 1379 public static void removeArticleLocale(long companyId, 1380 java.lang.String languageId) throws RemoteException { 1381 try { 1382 JournalArticleServiceUtil.removeArticleLocale(companyId, languageId); 1383 } 1384 catch (Exception e) { 1385 _log.error(e, e); 1386 1387 throw new RemoteException(e.getMessage()); 1388 } 1389 } 1390 1391 /** 1392 * Removes the web content of the web content article matching the group, 1393 * article ID, and version, and language. 1394 * 1395 * @param groupId the primary key of the web content article's group 1396 * @param articleId the primary key of the web content article 1397 * @param version the web content article's version 1398 * @param languageId the primary key of the language locale to remove 1399 * @return the updated web content article with the locale removed 1400 * @throws PortalException if the user did not have permission to update the 1401 web content article or if a matching web content article could 1402 not be found 1403 * @throws SystemException if a system exception occurred 1404 */ 1405 public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale( 1406 long groupId, java.lang.String articleId, double version, 1407 java.lang.String languageId) throws RemoteException { 1408 try { 1409 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId, 1410 articleId, version, languageId); 1411 1412 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1413 } 1414 catch (Exception e) { 1415 _log.error(e, e); 1416 1417 throw new RemoteException(e.getMessage()); 1418 } 1419 } 1420 1421 /** 1422 * Restores the web content article associated with the resource primary key 1423 * from the Recycle Bin. 1424 * 1425 * @param resourcePrimKey the primary key of the resource instance 1426 * @throws PortalException if a matching web content article could not be 1427 found in the Recycle Bin, if the user did not have permission to 1428 view or restore the article, or if a portal exception occurred 1429 * @throws SystemException if a system exception occurred 1430 */ 1431 public static void restoreArticleFromTrash(long resourcePrimKey) 1432 throws RemoteException { 1433 try { 1434 JournalArticleServiceUtil.restoreArticleFromTrash(resourcePrimKey); 1435 } 1436 catch (Exception e) { 1437 _log.error(e, e); 1438 1439 throw new RemoteException(e.getMessage()); 1440 } 1441 } 1442 1443 /** 1444 * Restores the web content article from the Recycle Bin. 1445 * 1446 * @param groupId the primary key of the web content article's group 1447 * @param articleId the primary key of the web content article 1448 * @throws PortalException if the web content article with the primary key 1449 could not be found in the Recycle Bin, if the user did not have 1450 permission to restore the article, or if a portal exception 1451 occurred 1452 * @throws SystemException if a system exception occurred 1453 */ 1454 public static void restoreArticleFromTrash(long groupId, 1455 java.lang.String articleId) throws RemoteException { 1456 try { 1457 JournalArticleServiceUtil.restoreArticleFromTrash(groupId, articleId); 1458 } 1459 catch (Exception e) { 1460 _log.error(e, e); 1461 1462 throw new RemoteException(e.getMessage()); 1463 } 1464 } 1465 1466 /** 1467 * Returns an ordered range of all the web content articles matching the 1468 * parameters, including a keywords parameter for matching with the 1469 * article's ID, title, description, and content, a DDM structure key 1470 * parameter, and a DDM template key parameter. 1471 * 1472 * <p> 1473 * Useful when paginating results. Returns a maximum of <code>end - 1474 * start</code> instances. <code>start</code> and <code>end</code> are not 1475 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1476 * refers to the first result in the set. Setting both <code>start</code> 1477 * and <code>end</code> to {@link 1478 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1479 * result set. 1480 * </p> 1481 * 1482 * @param companyId the primary key of the web content article's company 1483 * @param groupId the primary key of the group (optionally <code>0</code>) 1484 * @param folderIds the primary keys of the web content article folders 1485 (optionally {@link java.util.Collections#EMPTY_LIST}) 1486 * @param classNameId the primary key of the DDMStructure class if the web 1487 content article is related to a DDM structure, the primary key of 1488 the class name associated with the article, or {@link 1489 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1490 * @param keywords the keywords (space separated), which may occur in the 1491 web content article ID, title, description, or content 1492 (optionally <code>null</code>). If the keywords value is not 1493 <code>null</code>, the search uses the OR operator in connecting 1494 query criteria; otherwise it uses the AND operator. 1495 * @param version the web content article's version (optionally 1496 <code>null</code>) 1497 * @param type the web content article's type (optionally 1498 <code>null</code>) 1499 * @param ddmStructureKey the primary key of the web content article's DDM 1500 structure, if the article is related to a DDM structure, or 1501 <code>null</code> otherwise 1502 * @param ddmTemplateKey the primary key of the web content article's DDM 1503 template (optionally <code>null</code>). If the article is 1504 related to a DDM structure, the template's structure must match 1505 it. 1506 * @param displayDateGT the date after which a matching web content 1507 article's display date must be after (optionally 1508 <code>null</code>) 1509 * @param displayDateLT the date before which a matching web content 1510 article's display date must be before (optionally 1511 <code>null</code>) 1512 * @param status the web content article's workflow status. For more 1513 information see {@link WorkflowConstants} for constants starting 1514 with the "STATUS_" prefix. 1515 * @param reviewDate the web content article's scheduled review date 1516 (optionally <code>null</code>) 1517 * @param start the lower bound of the range of web content articles to 1518 return 1519 * @param end the upper bound of the range of web content articles to 1520 return (not inclusive) 1521 * @param obc the comparator to order the web content articles 1522 * @return the range of matching web content articles ordered by the 1523 comparator 1524 * @throws SystemException if a system exception occurred 1525 */ 1526 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1527 long companyId, long groupId, Long[] folderIds, long classNameId, 1528 java.lang.String keywords, java.lang.Double version, 1529 java.lang.String type, java.lang.String ddmStructureKey, 1530 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1531 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1532 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1533 throws RemoteException { 1534 try { 1535 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1536 JournalArticleServiceUtil.search(companyId, groupId, 1537 ListUtil.toList(folderIds), classNameId, keywords, version, 1538 type, ddmStructureKey, ddmTemplateKey, displayDateGT, 1539 displayDateLT, status, reviewDate, start, end, obc); 1540 1541 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1542 } 1543 catch (Exception e) { 1544 _log.error(e, e); 1545 1546 throw new RemoteException(e.getMessage()); 1547 } 1548 } 1549 1550 /** 1551 * Returns an ordered range of all the web content articles matching the 1552 * parameters, including keyword parameters for article ID, title, 1553 * description, and content, a DDM structure key parameter, a DDM template 1554 * key parameter, and an AND operator switch. 1555 * 1556 * <p> 1557 * Useful when paginating results. Returns a maximum of <code>end - 1558 * start</code> instances. <code>start</code> and <code>end</code> are not 1559 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1560 * refers to the first result in the set. Setting both <code>start</code> 1561 * and <code>end</code> to {@link 1562 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1563 * result set. 1564 * </p> 1565 * 1566 * @param companyId the primary key of the web content article's company 1567 * @param groupId the primary key of the group (optionally <code>0</code>) 1568 * @param folderIds the primary keys of the web content article folders 1569 (optionally {@link java.util.Collections#EMPTY_LIST}) 1570 * @param classNameId the primary key of the DDMStructure class if the web 1571 content article is related to a DDM structure, the primary key of 1572 the class name associated with the article, or {@link 1573 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1574 * @param articleId the article ID keywords (space separated, optionally 1575 <code>null</code>) 1576 * @param version the web content article's version (optionally 1577 <code>null</code>) 1578 * @param title the title keywords (space separated, optionally 1579 <code>null</code>) 1580 * @param description the description keywords (space separated, optionally 1581 <code>null</code>) 1582 * @param content the content keywords (space separated, optionally 1583 <code>null</code>) 1584 * @param type the web content article's type (optionally 1585 <code>null</code>) 1586 * @param ddmStructureKey the primary key of the web content article's DDM 1587 structure, if the article is related to a DDM structure, or 1588 <code>null</code> otherwise 1589 * @param ddmTemplateKey the primary key of the web content article's DDM 1590 template (optionally <code>null</code>). If the article is 1591 related to a DDM structure, the template's structure must match 1592 it. 1593 * @param displayDateGT the date after which a matching web content 1594 article's display date must be after (optionally 1595 <code>null</code>) 1596 * @param displayDateLT the date before which a matching web content 1597 article's display date must be before (optionally 1598 <code>null</code>) 1599 * @param status the web content article's workflow status. For more 1600 information see {@link WorkflowConstants} for constants starting 1601 with the "STATUS_" prefix. 1602 * @param reviewDate the web content article's scheduled review date 1603 (optionally <code>null</code>) 1604 * @param andOperator whether every field must match its value or keywords, 1605 or just one field must match. Company, group, folder IDs, class 1606 name ID, and status must all match their values. 1607 * @param start the lower bound of the range of web content articles to 1608 return 1609 * @param end the upper bound of the range of web content articles to 1610 return (not inclusive) 1611 * @param obc the comparator to order the web content articles 1612 * @return the range of matching web content articles ordered by the 1613 comparator 1614 * @throws SystemException if a system exception occurred 1615 */ 1616 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1617 long companyId, long groupId, Long[] folderIds, long classNameId, 1618 java.lang.String articleId, java.lang.Double version, 1619 java.lang.String title, java.lang.String description, 1620 java.lang.String content, java.lang.String type, 1621 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1622 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1623 java.util.Date reviewDate, boolean andOperator, int start, int end, 1624 com.liferay.portal.kernel.util.OrderByComparator obc) 1625 throws RemoteException { 1626 try { 1627 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1628 JournalArticleServiceUtil.search(companyId, groupId, 1629 ListUtil.toList(folderIds), classNameId, articleId, 1630 version, title, description, content, type, 1631 ddmStructureKey, ddmTemplateKey, displayDateGT, 1632 displayDateLT, status, reviewDate, andOperator, start, end, 1633 obc); 1634 1635 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1636 } 1637 catch (Exception e) { 1638 _log.error(e, e); 1639 1640 throw new RemoteException(e.getMessage()); 1641 } 1642 } 1643 1644 /** 1645 * Returns an ordered range of all the web content articles matching the 1646 * parameters, including keyword parameters for article ID, title, 1647 * description, and content, a DDM structure keys (plural) parameter, a DDM 1648 * template keys (plural) parameter, and an AND operator switch. 1649 * 1650 * <p> 1651 * Useful when paginating results. Returns a maximum of <code>end - 1652 * start</code> instances. <code>start</code> and <code>end</code> are not 1653 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1654 * refers to the first result in the set. Setting both <code>start</code> 1655 * and <code>end</code> to {@link 1656 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1657 * result set. 1658 * </p> 1659 * 1660 * @param companyId the primary key of the web content article's company 1661 * @param groupId the primary key of the group (optionally <code>0</code>) 1662 * @param folderIds the primary keys of the web content article folders 1663 (optionally {@link java.util.Collections#EMPTY_LIST}) 1664 * @param classNameId the primary key of the DDMStructure class if the web 1665 content article is related to a DDM structure, the primary key of 1666 the class name associated with the article, or {@link 1667 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1668 * @param articleId the article ID keywords (space separated, optionally 1669 <code>null</code>) 1670 * @param version the web content article's version (optionally 1671 <code>null</code>) 1672 * @param title the title keywords (space separated, optionally 1673 <code>null</code>) 1674 * @param description the description keywords (space separated, optionally 1675 <code>null</code>) 1676 * @param content the content keywords (space separated, optionally 1677 <code>null</code>) 1678 * @param type the web content article's type (optionally 1679 <code>null</code>) 1680 * @param ddmStructureKeys the primary keys of the web content article's 1681 DDM structures, if the article is related to a DDM structure, or 1682 <code>null</code> otherwise 1683 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1684 templates (originally <code>null</code>). If the articles are 1685 related to a DDM structure, the template's structure must match 1686 it. 1687 * @param displayDateGT the date after which a matching web content 1688 article's display date must be after (optionally 1689 <code>null</code>) 1690 * @param displayDateLT the date before which a matching web content 1691 article's display date must be before (optionally 1692 <code>null</code>) 1693 * @param status the web content article's workflow status. For more 1694 information see {@link WorkflowConstants} for constants starting 1695 with the "STATUS_" prefix. 1696 * @param reviewDate the web content article's scheduled review date 1697 (optionally <code>null</code>) 1698 * @param andOperator whether every field must match its value or keywords, 1699 or just one field must match. Company, group, folder IDs, class 1700 name ID, and status must all match their values. 1701 * @param start the lower bound of the range of web content articles to 1702 return 1703 * @param end the upper bound of the range of web content articles to 1704 return (not inclusive) 1705 * @param obc the comparator to order the web content articles 1706 * @return the range of matching web content articles ordered by the 1707 comparator 1708 * @throws SystemException if a system exception occurred 1709 */ 1710 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1711 long companyId, long groupId, Long[] folderIds, long classNameId, 1712 java.lang.String articleId, java.lang.Double version, 1713 java.lang.String title, java.lang.String description, 1714 java.lang.String content, java.lang.String type, 1715 java.lang.String[] ddmStructureKeys, 1716 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1717 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1718 boolean andOperator, int start, int end, 1719 com.liferay.portal.kernel.util.OrderByComparator obc) 1720 throws RemoteException { 1721 try { 1722 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1723 JournalArticleServiceUtil.search(companyId, groupId, 1724 ListUtil.toList(folderIds), classNameId, articleId, 1725 version, title, description, content, type, 1726 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1727 displayDateLT, status, reviewDate, andOperator, start, end, 1728 obc); 1729 1730 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1731 } 1732 catch (Exception e) { 1733 _log.error(e, e); 1734 1735 throw new RemoteException(e.getMessage()); 1736 } 1737 } 1738 1739 /** 1740 * Returns the number of web content articles matching the parameters, 1741 * including a keywords parameter for matching with the article's ID, title, 1742 * description, and content, a DDM structure key parameter, and a DDM 1743 * template key parameter. 1744 * 1745 * @param companyId the primary key of the web content article's company 1746 * @param groupId the primary key of the group (optionally <code>0</code>) 1747 * @param folderIds the primary keys of the web content article folders 1748 (optionally {@link java.util.Collections#EMPTY_LIST}) 1749 * @param classNameId the primary key of the DDMStructure class if the web 1750 content article is related to a DDM structure, the primary key of 1751 the class name associated with the article, or {@link 1752 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1753 * @param keywords the keywords (space separated), which may occur in the 1754 web content article ID, title, description, or content 1755 (optionally <code>null</code>). If the keywords value is not 1756 <code>null</code>, the search uses the OR operator in connecting 1757 query criteria; otherwise it uses the AND operator. 1758 * @param version the web content article's version (optionally 1759 <code>null</code>) 1760 * @param type the web content article's type (optionally 1761 <code>null</code>) 1762 * @param ddmStructureKey the primary key of the web content article's DDM 1763 structure, if the article is related to a DDM structure, or 1764 <code>null</code> otherwise 1765 * @param ddmTemplateKey the primary key of the web content article's DDM 1766 template (optionally <code>null</code>). If the article is 1767 related to a DDM structure, the template's structure must match 1768 it. 1769 * @param displayDateGT the date after which a matching web content 1770 article's display date must be after (optionally 1771 <code>null</code>) 1772 * @param displayDateLT the date before which a matching web content 1773 article's display date must be before (optionally 1774 <code>null</code>) 1775 * @param status the web content article's workflow status. For more 1776 information see {@link WorkflowConstants} for constants starting 1777 with the "STATUS_" prefix. 1778 * @param reviewDate the web content article's scheduled review date 1779 (optionally <code>null</code>) 1780 * @return the number of matching web content articles 1781 * @throws SystemException if a system exception occurred 1782 */ 1783 public static int searchCount(long companyId, long groupId, 1784 Long[] folderIds, long classNameId, java.lang.String keywords, 1785 java.lang.Double version, java.lang.String type, 1786 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1787 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1788 java.util.Date reviewDate) throws RemoteException { 1789 try { 1790 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1791 groupId, ListUtil.toList(folderIds), classNameId, keywords, 1792 version, type, ddmStructureKey, ddmTemplateKey, 1793 displayDateGT, displayDateLT, status, reviewDate); 1794 1795 return returnValue; 1796 } 1797 catch (Exception e) { 1798 _log.error(e, e); 1799 1800 throw new RemoteException(e.getMessage()); 1801 } 1802 } 1803 1804 /** 1805 * Returns the number of web content articles matching the parameters, 1806 * including keyword parameters for article ID, title, description, and 1807 * content, a DDM structure key parameter, a DDM template key parameter, and 1808 * an AND operator switch. 1809 * 1810 * @param companyId the primary key of the web content article's company 1811 * @param groupId the primary key of the group (optionally <code>0</code>) 1812 * @param folderIds the primary keys of the web content article folders 1813 (optionally {@link java.util.Collections#EMPTY_LIST}) 1814 * @param classNameId the primary key of the DDMStructure class if the web 1815 content article is related to a DDM structure, the primary key of 1816 the class name associated with the article, or {@link 1817 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1818 * @param articleId the article ID keywords (space separated, optionally 1819 <code>null</code>) 1820 * @param version the web content article's version (optionally 1821 <code>null</code>) 1822 * @param title the title keywords (space separated, optionally 1823 <code>null</code>) 1824 * @param description the description keywords (space separated, optionally 1825 <code>null</code>) 1826 * @param content the content keywords (space separated, optionally 1827 <code>null</code>) 1828 * @param type the web content article's type (optionally 1829 <code>null</code>) 1830 * @param ddmStructureKey the primary key of the web content article's DDM 1831 structure, if the article is related to a DDM structure, or 1832 <code>null</code> otherwise 1833 * @param ddmTemplateKey the primary key of the web content article's DDM 1834 template (optionally <code>null</code>). If the article is 1835 related to a DDM structure, the template's structure must match 1836 it. 1837 * @param displayDateGT the date after which a matching web content 1838 article's display date must be after (optionally 1839 <code>null</code>) 1840 * @param displayDateLT the date before which a matching web content 1841 article's display date must be before (optionally 1842 <code>null</code>) 1843 * @param status the web content article's workflow status. For more 1844 information see {@link WorkflowConstants} for constants starting 1845 with the "STATUS_" prefix. 1846 * @param reviewDate the web content article's scheduled review date 1847 (optionally <code>null</code>) 1848 * @param andOperator whether every field must match its value or keywords, 1849 or just one field must match. Group, folder IDs, class name ID, 1850 and status must all match their values. 1851 * @return the number of matching web content articles 1852 * @throws SystemException if a system exception occurred 1853 */ 1854 public static int searchCount(long companyId, long groupId, 1855 Long[] folderIds, long classNameId, java.lang.String articleId, 1856 java.lang.Double version, java.lang.String title, 1857 java.lang.String description, java.lang.String content, 1858 java.lang.String type, java.lang.String ddmStructureKey, 1859 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1860 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1861 boolean andOperator) throws RemoteException { 1862 try { 1863 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1864 groupId, ListUtil.toList(folderIds), classNameId, 1865 articleId, version, title, description, content, type, 1866 ddmStructureKey, ddmTemplateKey, displayDateGT, 1867 displayDateLT, status, reviewDate, andOperator); 1868 1869 return returnValue; 1870 } 1871 catch (Exception e) { 1872 _log.error(e, e); 1873 1874 throw new RemoteException(e.getMessage()); 1875 } 1876 } 1877 1878 /** 1879 * Returns the number of web content articles matching the parameters, 1880 * including keyword parameters for article ID, title, description, and 1881 * content, a DDM structure keys (plural) parameter, a DDM template keys 1882 * (plural) parameter, and an AND operator switch. 1883 * 1884 * @param companyId the primary key of the web content article's company 1885 * @param groupId the primary key of the group (optionally <code>0</code>) 1886 * @param folderIds the primary keys of the web content article folders 1887 (optionally {@link java.util.Collections#EMPTY_LIST}) 1888 * @param classNameId the primary key of the DDMStructure class if the web 1889 content article is related to a DDM structure, the primary key of 1890 the class name associated with the article, or {@link 1891 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1892 * @param articleId the article ID keywords (space separated, optionally 1893 <code>null</code>) 1894 * @param version the web content article's version (optionally 1895 <code>null</code>) 1896 * @param title the title keywords (space separated, optionally 1897 <code>null</code>) 1898 * @param description the description keywords (space separated, optionally 1899 <code>null</code>) 1900 * @param content the content keywords (space separated, optionally 1901 <code>null</code>) 1902 * @param type the web content article's type (optionally 1903 <code>null</code>) 1904 * @param ddmStructureKeys the primary keys of the web content article's 1905 DDM structures, if the article is related to a DDM structure, or 1906 <code>null</code> otherwise 1907 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1908 templates (originally <code>null</code>). If the articles are 1909 related to a DDM structure, the template's structure must match 1910 it. 1911 * @param displayDateGT the date after which a matching web content 1912 article's display date must be after (optionally 1913 <code>null</code>) 1914 * @param displayDateLT the date before which a matching web content 1915 article's display date must be before (optionally 1916 <code>null</code>) 1917 * @param status the web content article's workflow status. For more 1918 information see {@link WorkflowConstants} for constants starting 1919 with the "STATUS_" prefix. 1920 * @param reviewDate the web content article's scheduled review date 1921 (optionally <code>null</code>) 1922 * @param andOperator whether every field must match its value or keywords, 1923 or just one field must match. Group, folder IDs, class name ID, 1924 and status must all match their values. 1925 * @return the number of matching web content articles 1926 * @throws SystemException if a system exception occurred 1927 */ 1928 public static int searchCount(long companyId, long groupId, 1929 Long[] folderIds, long classNameId, java.lang.String articleId, 1930 java.lang.Double version, java.lang.String title, 1931 java.lang.String description, java.lang.String content, 1932 java.lang.String type, java.lang.String[] ddmStructureKeys, 1933 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1934 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1935 boolean andOperator) throws RemoteException { 1936 try { 1937 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1938 groupId, ListUtil.toList(folderIds), classNameId, 1939 articleId, version, title, description, content, type, 1940 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1941 displayDateLT, status, reviewDate, andOperator); 1942 1943 return returnValue; 1944 } 1945 catch (Exception e) { 1946 _log.error(e, e); 1947 1948 throw new RemoteException(e.getMessage()); 1949 } 1950 } 1951 1952 /** 1953 * Subscribes the user to notifications for the web content article matching 1954 * the group, notifying him the instant versions of the article are created, 1955 * deleted, or modified. 1956 * 1957 * @param groupId the primary key of the group 1958 * @throws PortalException if the user did not have permission to subscribe 1959 to the web content article or if a matching user or group could 1960 not be found 1961 * @throws SystemException if a system exception occurred 1962 */ 1963 public static void subscribe(long groupId) throws RemoteException { 1964 try { 1965 JournalArticleServiceUtil.subscribe(groupId); 1966 } 1967 catch (Exception e) { 1968 _log.error(e, e); 1969 1970 throw new RemoteException(e.getMessage()); 1971 } 1972 } 1973 1974 /** 1975 * Unsubscribes the user from notifications for the web content article 1976 * matching the group. 1977 * 1978 * @param groupId the primary key of the group 1979 * @throws PortalException if the user did not have permission to subscribe 1980 to the web content article or if a matching user or subscription 1981 could not be found 1982 * @throws SystemException if a system exception occurred 1983 */ 1984 public static void unsubscribe(long groupId) throws RemoteException { 1985 try { 1986 JournalArticleServiceUtil.unsubscribe(groupId); 1987 } 1988 catch (Exception e) { 1989 _log.error(e, e); 1990 1991 throw new RemoteException(e.getMessage()); 1992 } 1993 } 1994 1995 /** 1996 * Updates the web content article matching the version, replacing its 1997 * folder, title, description, content, and layout UUID. 1998 * 1999 * @param userId the primary key of the user updating the web content 2000 article 2001 * @param groupId the primary key of the web content article's group 2002 * @param folderId the primary key of the web content article folder 2003 * @param articleId the primary key of the web content article 2004 * @param version the web content article's version 2005 * @param titleMap the web content article's locales and localized titles 2006 * @param descriptionMap the web content article's locales and localized 2007 descriptions 2008 * @param content the HTML content wrapped in XML. For more information, 2009 see the content example in the class description for {@link 2010 JournalArticleLocalServiceImpl}. 2011 * @param layoutUuid the unique string identifying the web content 2012 article's display page 2013 * @param serviceContext the service context to be applied. Can set the 2014 modification date, expando bridge attributes, asset category IDs, 2015 asset tag names, asset link entry IDs, workflow actions, the 2016 "defaultLanguageId" and "urlTitle" attributes, and can set 2017 whether to add the default command update for the web content 2018 article. With respect to social activities, by setting the 2019 service context's command to {@link 2020 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2021 is considered a web content update activity; otherwise it is 2022 considered a web content add activity. 2023 * @return the updated web content article 2024 * @throws PortalException if a user with the primary key or a matching web 2025 content article could not be found, or if a portal exception 2026 occurred 2027 * @throws SystemException if a system exception occurred 2028 */ 2029 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 2030 long userId, long groupId, long folderId, java.lang.String articleId, 2031 double version, java.lang.String[] titleMapLanguageIds, 2032 java.lang.String[] titleMapValues, 2033 java.lang.String[] descriptionMapLanguageIds, 2034 java.lang.String[] descriptionMapValues, java.lang.String content, 2035 java.lang.String layoutUuid, 2036 com.liferay.portal.service.ServiceContext serviceContext) 2037 throws RemoteException { 2038 try { 2039 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, 2040 titleMapValues); 2041 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 2042 descriptionMapValues); 2043 2044 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(userId, 2045 groupId, folderId, articleId, version, titleMap, 2046 descriptionMap, content, layoutUuid, serviceContext); 2047 2048 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2049 } 2050 catch (Exception e) { 2051 _log.error(e, e); 2052 2053 throw new RemoteException(e.getMessage()); 2054 } 2055 } 2056 2057 /** 2058 * Updates the web content article matching the version, replacing its 2059 * folder and content. 2060 * 2061 * @param groupId the primary key of the web content article's group 2062 * @param folderId the primary key of the web content article folder 2063 * @param articleId the primary key of the web content article 2064 * @param version the web content article's version 2065 * @param content the HTML content wrapped in XML. For more information, 2066 see the content example in the class description for {@link 2067 JournalArticleLocalServiceImpl}. 2068 * @param serviceContext the service context to be applied. Can set the 2069 modification date, expando bridge attributes, asset category IDs, 2070 asset tag names, asset link entry IDs, workflow actions, the 2071 "defaultLanguageId" and "urlTitle" attributes, and can set 2072 whether to add the default command update for the web content 2073 article. With respect to social activities, by setting the 2074 service context's command to {@link 2075 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2076 is considered a web content update activity; otherwise it is 2077 considered a web content add activity. 2078 * @return the updated web content article 2079 * @throws PortalException if the user did not have permission to update the 2080 web content article, if a user with the primary key or a matching 2081 web content article could not be found, or if a portal exception 2082 occurred 2083 * @throws SystemException if a system exception occurred 2084 */ 2085 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 2086 long groupId, long folderId, java.lang.String articleId, 2087 double version, java.lang.String content, 2088 com.liferay.portal.service.ServiceContext serviceContext) 2089 throws RemoteException { 2090 try { 2091 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId, 2092 folderId, articleId, version, content, serviceContext); 2093 2094 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2095 } 2096 catch (Exception e) { 2097 _log.error(e, e); 2098 2099 throw new RemoteException(e.getMessage()); 2100 } 2101 } 2102 2103 /** 2104 * Updates the web content article matching the group, article ID, and 2105 * version, replacing its content. 2106 * 2107 * @param groupId the primary key of the web content article's group 2108 * @param articleId the primary key of the web content article 2109 * @param version the web content article's version 2110 * @param content the HTML content wrapped in XML. For more information, 2111 see the content example in the class description for {@link 2112 JournalArticleLocalServiceImpl}. 2113 * @return the updated web content article 2114 * @throws PortalException if the user did not have permission to update the 2115 web content article or if a matching web content article could 2116 not be found 2117 * @throws SystemException if a system exception occurred 2118 */ 2119 public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent( 2120 long groupId, java.lang.String articleId, double version, 2121 java.lang.String content) throws RemoteException { 2122 try { 2123 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId, 2124 articleId, version, content); 2125 2126 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2127 } 2128 catch (Exception e) { 2129 _log.error(e, e); 2130 2131 throw new RemoteException(e.getMessage()); 2132 } 2133 } 2134 2135 /** 2136 * Updates the workflow status of the web content article matching the 2137 * group, article ID, and version. 2138 * 2139 * @param groupId the primary key of the web content article's group 2140 * @param articleId the primary key of the web content article 2141 * @param version the web content article's version 2142 * @param status the web content article's workflow status. For more 2143 information see {@link WorkflowConstants} for constants starting 2144 with the "STATUS_" prefix. 2145 * @param articleURL the web content article's accessible URL 2146 * @param serviceContext the service context to be applied. Can set the 2147 modification date, portlet preferences, and can set whether to 2148 add the default command update for the web content article. 2149 * @return the updated web content article 2150 * @throws PortalException if the user did not have permission to update the 2151 web content article, if a matching web content article could not 2152 be found, or if a portal exception occurred 2153 * @throws SystemException if a system exception occurred 2154 */ 2155 public static com.liferay.portlet.journal.model.JournalArticleSoap updateStatus( 2156 long groupId, java.lang.String articleId, double version, int status, 2157 java.lang.String articleURL, 2158 com.liferay.portal.service.ServiceContext serviceContext) 2159 throws RemoteException { 2160 try { 2161 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateStatus(groupId, 2162 articleId, version, status, articleURL, serviceContext); 2163 2164 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2165 } 2166 catch (Exception e) { 2167 _log.error(e, e); 2168 2169 throw new RemoteException(e.getMessage()); 2170 } 2171 } 2172 2173 private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class); 2174 }