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