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 /** 369 * Returns the web content article with the ID. 370 * 371 * @param id the primary key of the web content article 372 * @return the web content article with the ID 373 * @throws PortalException if a matching web content article could not be 374 found or if the user did not have permission to view the web 375 content article 376 * @throws SystemException if a system exception occurred 377 */ 378 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 379 long id) throws RemoteException { 380 try { 381 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(id); 382 383 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 384 } 385 catch (Exception e) { 386 _log.error(e, e); 387 388 throw new RemoteException(e.getMessage()); 389 } 390 } 391 392 /** 393 * Returns the latest approved web content article, or the latest unapproved 394 * article if none are approved. Both approved and unapproved articles must 395 * match the group and article ID. 396 * 397 * @param groupId the primary key of the web content article's group 398 * @param articleId the primary key of the web content article 399 * @return the matching web content article 400 * @throws PortalException if the user did not have permission to view the 401 web content article or if a matching web content article could 402 not be found 403 * @throws SystemException if a system exception occurred 404 */ 405 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 406 long groupId, java.lang.String articleId) throws RemoteException { 407 try { 408 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 409 articleId); 410 411 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 412 } 413 catch (Exception e) { 414 _log.error(e, e); 415 416 throw new RemoteException(e.getMessage()); 417 } 418 } 419 420 /** 421 * Returns the web content article matching the group, article ID, and 422 * version. 423 * 424 * @param groupId the primary key of the web content article's group 425 * @param articleId the primary key of the web content article 426 * @param version the web content article's version 427 * @return the matching web content article 428 * @throws PortalException if the user did not have permission to view the 429 web content article or if a matching web content article could 430 not be found 431 * @throws SystemException if a system exception occurred 432 */ 433 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 434 long groupId, java.lang.String articleId, double version) 435 throws RemoteException { 436 try { 437 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 438 articleId, version); 439 440 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 441 } 442 catch (Exception e) { 443 _log.error(e, e); 444 445 throw new RemoteException(e.getMessage()); 446 } 447 } 448 449 /** 450 * Returns the web content article matching the group, class name, and class 451 * PK. 452 * 453 * @param groupId the primary key of the web content article's group 454 * @param className the DDMStructure class name if the web content article 455 is related to a DDM structure, the primary key of the class name 456 associated with the article, or {@link 457 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 458 * @param classPK the primary key of the DDM structure, if the the 459 DDMStructure class name is given as the <code>className</code> 460 parameter, the primary key of the class associated with the web 461 content article, or <code>0</code> otherwise 462 * @return the matching web content article 463 * @throws PortalException if a matching web content article could not be 464 found or if the user did not have permission to view the web 465 content article 466 * @throws SystemException if a system exception occurred 467 */ 468 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticle( 469 long groupId, java.lang.String className, long classPK) 470 throws RemoteException { 471 try { 472 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticle(groupId, 473 className, classPK); 474 475 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 476 } 477 catch (Exception e) { 478 _log.error(e, e); 479 480 throw new RemoteException(e.getMessage()); 481 } 482 } 483 484 /** 485 * Returns the latest web content article that is approved, or the latest 486 * unapproved article if none are approved. Both approved and unapproved 487 * articles must match the group and URL title. 488 * 489 * @param groupId the primary key of the web content article's group 490 * @param urlTitle the web content article's accessible URL title 491 * @return the matching web content article 492 * @throws PortalException if the user did not have permission to view the 493 web content article or if a portal exception occurred 494 * @throws SystemException if a system exception occurred 495 */ 496 public static com.liferay.portlet.journal.model.JournalArticleSoap getArticleByUrlTitle( 497 long groupId, java.lang.String urlTitle) throws RemoteException { 498 try { 499 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getArticleByUrlTitle(groupId, 500 urlTitle); 501 502 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 503 } 504 catch (Exception e) { 505 _log.error(e, e); 506 507 throw new RemoteException(e.getMessage()); 508 } 509 } 510 511 /** 512 * Returns all the web content articles matching the group and folder. 513 * 514 * @param groupId the primary key of the web content article's group 515 * @param folderId the primary key of the web content article folder 516 * @return the matching web content articles 517 * @throws SystemException if a system exception occurred 518 */ 519 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticles( 520 long groupId, long folderId) throws RemoteException { 521 try { 522 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 523 JournalArticleServiceUtil.getArticles(groupId, folderId); 524 525 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 526 } 527 catch (Exception e) { 528 _log.error(e, e); 529 530 throw new RemoteException(e.getMessage()); 531 } 532 } 533 534 /** 535 * Returns an ordered range of all the web content articles matching the 536 * group and folder. 537 * 538 * <p> 539 * Useful when paginating results. Returns a maximum of <code>end - 540 * start</code> instances. <code>start</code> and <code>end</code> are not 541 * primary keys, they are indexes in the result set. Thus, <code>0</code> 542 * refers to the first result in the set. Setting both <code>start</code> 543 * and <code>end</code> to {@link 544 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 545 * result set. 546 * </p> 547 * 548 * @param groupId the primary key of the web content article's group 549 * @param folderId the primary key of the web content article folder 550 * @param start the lower bound of the range of web content articles to 551 return 552 * @param end the upper bound of the range of web content articles to 553 return (not inclusive) 554 * @param obc the comparator to order the web content articles 555 * @return the matching web content articles 556 * @throws SystemException if a system exception occurred 557 */ 558 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticles( 559 long groupId, long folderId, int start, int end, 560 com.liferay.portal.kernel.util.OrderByComparator obc) 561 throws RemoteException { 562 try { 563 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 564 JournalArticleServiceUtil.getArticles(groupId, folderId, start, 565 end, obc); 566 567 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 568 } 569 catch (Exception e) { 570 _log.error(e, e); 571 572 throw new RemoteException(e.getMessage()); 573 } 574 } 575 576 /** 577 * Returns an ordered range of all the web content articles matching the 578 * group and article ID. 579 * 580 * <p> 581 * Useful when paginating results. Returns a maximum of <code>end - 582 * start</code> instances. <code>start</code> and <code>end</code> are not 583 * primary keys, they are indexes in the result set. Thus, <code>0</code> 584 * refers to the first result in the set. Setting both <code>start</code> 585 * and <code>end</code> to {@link 586 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 587 * result set. 588 * </p> 589 * 590 * @param groupId the primary key of the web content article's group 591 * @param articleId the primary key of the web content article 592 * @param start the lower bound of the range of web content articles to 593 return 594 * @param end the upper bound of the range of web content articles to 595 return (not inclusive) 596 * @param obc the comparator to order the web content articles 597 * @return the range of matching web content articles ordered by the 598 comparator 599 * @throws SystemException if a system exception occurred 600 */ 601 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByArticleId( 602 long groupId, java.lang.String articleId, int start, int end, 603 com.liferay.portal.kernel.util.OrderByComparator obc) 604 throws RemoteException { 605 try { 606 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 607 JournalArticleServiceUtil.getArticlesByArticleId(groupId, 608 articleId, start, end, obc); 609 610 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 611 } 612 catch (Exception e) { 613 _log.error(e, e); 614 615 throw new RemoteException(e.getMessage()); 616 } 617 } 618 619 /** 620 * Returns all the web content articles matching the group and layout UUID. 621 * 622 * @param groupId the primary key of the web content article's group 623 * @param layoutUuid the unique string identifying the web content 624 article's display page 625 * @return the matching web content articles 626 * @throws SystemException if a system exception occurred 627 */ 628 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByLayoutUuid( 629 long groupId, java.lang.String layoutUuid) throws RemoteException { 630 try { 631 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 632 JournalArticleServiceUtil.getArticlesByLayoutUuid(groupId, 633 layoutUuid); 634 635 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 636 } 637 catch (Exception e) { 638 _log.error(e, e); 639 640 throw new RemoteException(e.getMessage()); 641 } 642 } 643 644 /** 645 * Returns an ordered range of all the web content articles matching the 646 * group, class name ID, DDM structure key, and workflow status. 647 * 648 * <p> 649 * Useful when paginating results. Returns a maximum of <code>end - 650 * start</code> instances. <code>start</code> and <code>end</code> are not 651 * primary keys, they are indexes in the result set. Thus, <code>0</code> 652 * refers to the first result in the set. Setting both <code>start</code> 653 * and <code>end</code> to {@link 654 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 655 * result set. 656 * </p> 657 * 658 * @param groupId the primary key of the web content article's group 659 * @param classNameId the primary key of the DDMStructure class if the web 660 content article is related to a DDM structure, the primary key of 661 the class name associated with the article, or {@link 662 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 663 * @param ddmStructureKey the primary key of the web content article's DDM 664 structure 665 * @param status the web content article's workflow status. For more 666 information see {@link WorkflowConstants} for constants starting 667 with the "STATUS_" prefix. 668 * @param start the lower bound of the range of web content articles to 669 return 670 * @param end the upper bound of the range of web content articles to 671 return (not inclusive) 672 * @param obc the comparator to order the web content articles 673 * @return the range of matching web content articles ordered by the 674 comparator 675 * @throws SystemException if a system exception occurred 676 */ 677 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByStructureId( 678 long groupId, long classNameId, java.lang.String ddmStructureKey, 679 int status, int start, int end, 680 com.liferay.portal.kernel.util.OrderByComparator obc) 681 throws RemoteException { 682 try { 683 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 684 JournalArticleServiceUtil.getArticlesByStructureId(groupId, 685 classNameId, ddmStructureKey, status, start, end, obc); 686 687 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 688 } 689 catch (Exception e) { 690 _log.error(e, e); 691 692 throw new RemoteException(e.getMessage()); 693 } 694 } 695 696 /** 697 * Returns an ordered range of all the web content articles matching the 698 * group, default class name ID, and DDM structure key. 699 * 700 * <p> 701 * Useful when paginating results. Returns a maximum of <code>end - 702 * start</code> instances. <code>start</code> and <code>end</code> are not 703 * primary keys, they are indexes in the result set. Thus, <code>0</code> 704 * refers to the first result in the set. Setting both <code>start</code> 705 * and <code>end</code> to {@link 706 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 707 * result set. 708 * </p> 709 * 710 * @param groupId the primary key of the web content article's group 711 * @param ddmStructureKey the primary key of the web content article's DDM 712 structure 713 * @param start the lower bound of the range of web content articles to 714 return 715 * @param end the upper bound of the range of web content articles to 716 return (not inclusive) 717 * @param obc the comparator to order the web content articles 718 * @return the range of matching web content articles ordered by the 719 comparator 720 * @throws SystemException if a system exception occurred 721 */ 722 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getArticlesByStructureId( 723 long groupId, java.lang.String ddmStructureKey, int start, int end, 724 com.liferay.portal.kernel.util.OrderByComparator obc) 725 throws RemoteException { 726 try { 727 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 728 JournalArticleServiceUtil.getArticlesByStructureId(groupId, 729 ddmStructureKey, start, end, obc); 730 731 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 732 } 733 catch (Exception e) { 734 _log.error(e, e); 735 736 throw new RemoteException(e.getMessage()); 737 } 738 } 739 740 /** 741 * Returns the number of web content articles matching the group and folder. 742 * 743 * @param groupId the primary key of the web content article's group 744 * @param folderId the primary key of the web content article folder 745 * @return the number of matching web content articles 746 * @throws SystemException if a system exception occurred 747 */ 748 public static int getArticlesCount(long groupId, long folderId) 749 throws RemoteException { 750 try { 751 int returnValue = JournalArticleServiceUtil.getArticlesCount(groupId, 752 folderId); 753 754 return returnValue; 755 } 756 catch (Exception e) { 757 _log.error(e, e); 758 759 throw new RemoteException(e.getMessage()); 760 } 761 } 762 763 public static int getArticlesCount(long groupId, long folderId, int status) 764 throws RemoteException { 765 try { 766 int returnValue = JournalArticleServiceUtil.getArticlesCount(groupId, 767 folderId, status); 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 /** 779 * Returns the number of web content articles matching the group and article 780 * ID. 781 * 782 * @param groupId the primary key of the web content article's group 783 * @param articleId the primary key of the web content article 784 * @return the number of matching web content articles 785 * @throws SystemException if a system exception occurred 786 */ 787 public static int getArticlesCountByArticleId(long groupId, 788 java.lang.String articleId) throws RemoteException { 789 try { 790 int returnValue = JournalArticleServiceUtil.getArticlesCountByArticleId(groupId, 791 articleId); 792 793 return returnValue; 794 } 795 catch (Exception e) { 796 _log.error(e, e); 797 798 throw new RemoteException(e.getMessage()); 799 } 800 } 801 802 /** 803 * Returns the number of web content articles matching the group, class name 804 * ID, DDM structure key, and workflow status. 805 * 806 * @param groupId the primary key of the web content article's group 807 * @param classNameId the primary key of the DDMStructure class if the web 808 content article is related to a DDM structure, the primary key of 809 the class name associated with the article, or {@link 810 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 811 * @param ddmStructureKey the primary key of the web content article's DDM 812 structure 813 * @param status the web content article's workflow status. For more 814 information see {@link WorkflowConstants} for constants starting 815 with the "STATUS_" prefix. 816 * @return the number of matching web content articles 817 * @throws SystemException if a system exception occurred 818 */ 819 public static int getArticlesCountByStructureId(long groupId, 820 long classNameId, java.lang.String ddmStructureKey, int status) 821 throws RemoteException { 822 try { 823 int returnValue = JournalArticleServiceUtil.getArticlesCountByStructureId(groupId, 824 classNameId, ddmStructureKey, status); 825 826 return returnValue; 827 } 828 catch (Exception e) { 829 _log.error(e, e); 830 831 throw new RemoteException(e.getMessage()); 832 } 833 } 834 835 /** 836 * Returns the number of web content articles matching the group, default 837 * class name ID, and DDM structure key. 838 * 839 * @param groupId the primary key of the web content article's group 840 * @param ddmStructureKey the primary key of the web content article's DDM 841 structure 842 * @return the number of matching web content articles 843 * @throws SystemException if a system exception occurred 844 */ 845 public static int getArticlesCountByStructureId(long groupId, 846 java.lang.String ddmStructureKey) throws RemoteException { 847 try { 848 int returnValue = JournalArticleServiceUtil.getArticlesCountByStructureId(groupId, 849 ddmStructureKey); 850 851 return returnValue; 852 } 853 catch (Exception e) { 854 _log.error(e, e); 855 856 throw new RemoteException(e.getMessage()); 857 } 858 } 859 860 /** 861 * Returns the web content article matching the URL title that is currently 862 * displayed or next to be displayed if no article is currently displayed. 863 * 864 * @param groupId the primary key of the web content article's group 865 * @param urlTitle the web content article's accessible URL title 866 * @return the web content article matching the URL title that is currently 867 displayed, or next one to be displayed if no version of the 868 article is currently displayed 869 * @throws PortalException if the user did not have permission to view the 870 web content article or if no approved matching web content 871 articles could be found 872 * @throws SystemException if a system exception occurred 873 */ 874 public static com.liferay.portlet.journal.model.JournalArticleSoap getDisplayArticleByUrlTitle( 875 long groupId, java.lang.String urlTitle) throws RemoteException { 876 try { 877 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getDisplayArticleByUrlTitle(groupId, 878 urlTitle); 879 880 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 881 } 882 catch (Exception e) { 883 _log.error(e, e); 884 885 throw new RemoteException(e.getMessage()); 886 } 887 } 888 889 /** 890 * Returns the number of folders containing web content articles belonging 891 * to the group. 892 * 893 * @param groupId the primary key of the web content article's group 894 * @param folderIds the primary keys of the web content article folders 895 (optionally {@link java.util.Collections#EMPTY_LIST}) 896 * @return the number of matching folders containing web content articles 897 * @throws SystemException if a system exception occurred 898 */ 899 public static int getFoldersAndArticlesCount(long groupId, Long[] folderIds) 900 throws RemoteException { 901 try { 902 int returnValue = JournalArticleServiceUtil.getFoldersAndArticlesCount(groupId, 903 ListUtil.toList(folderIds)); 904 905 return returnValue; 906 } 907 catch (Exception e) { 908 _log.error(e, e); 909 910 throw new RemoteException(e.getMessage()); 911 } 912 } 913 914 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 915 long groupId, long userId, long rootFolderId, int status, int start, 916 int end, 917 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 918 throws RemoteException { 919 try { 920 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 921 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 922 rootFolderId, status, start, end, orderByComparator); 923 924 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 925 } 926 catch (Exception e) { 927 _log.error(e, e); 928 929 throw new RemoteException(e.getMessage()); 930 } 931 } 932 933 /** 934 * Returns an ordered range of all the web content articles matching the 935 * group, user, the root folder or any of its subfolders. 936 * 937 * @param groupId the primary key of the web content article's group 938 * @param userId the primary key of the user (optionally <code>0</code>) 939 * @param rootFolderId the primary key of the root folder to begin the 940 search 941 * @param start the lower bound of the range of web content articles to 942 return 943 * @param end the upper bound of the range of web content articles to 944 return (not inclusive) 945 * @param orderByComparator the comparator to order the web content 946 articles 947 * @return the range of matching web content articles ordered by the 948 comparator 949 * @throws PortalException if the root folder could not be found, if the 950 current user did not have permission to view the root folder, or 951 if a portal exception occurred 952 * @throws SystemException if a system exception occurred 953 */ 954 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 955 long groupId, long userId, long rootFolderId, 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, start, end, orderByComparator); 962 963 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 964 } 965 catch (Exception e) { 966 _log.error(e, e); 967 968 throw new RemoteException(e.getMessage()); 969 } 970 } 971 972 /** 973 * Returns the number of web content articles matching the group, user, and 974 * the root folder or any of its subfolders. 975 * 976 * @param groupId the primary key of the web content article's group 977 * @param userId the primary key of the user (optionally <code>0</code>) 978 * @param rootFolderId the primary key of the root folder to begin the 979 search 980 * @return the number of matching web content articles 981 * @throws PortalException if the root folder could not be found, if the 982 current user did not have permission to view the root folder, or 983 if a portal exception occurred 984 * @throws SystemException if a system exception occurred 985 */ 986 public static int getGroupArticlesCount(long groupId, long userId, 987 long rootFolderId) throws RemoteException { 988 try { 989 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 990 userId, rootFolderId); 991 992 return returnValue; 993 } 994 catch (Exception e) { 995 _log.error(e, e); 996 997 throw new RemoteException(e.getMessage()); 998 } 999 } 1000 1001 public static int getGroupArticlesCount(long groupId, long userId, 1002 long rootFolderId, int status) throws RemoteException { 1003 try { 1004 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1005 userId, rootFolderId, status); 1006 1007 return returnValue; 1008 } 1009 catch (Exception e) { 1010 _log.error(e, e); 1011 1012 throw new RemoteException(e.getMessage()); 1013 } 1014 } 1015 1016 /** 1017 * Returns the latest web content article matching the resource primary key, 1018 * preferring articles with approved workflow status. 1019 * 1020 * @param resourcePrimKey the primary key of the resource instance 1021 * @return the latest web content article matching the resource primary key, 1022 preferring articles with approved workflow status 1023 * @throws PortalException if the user did not have permission to view the 1024 web content article or if a matching web content article could 1025 not be found 1026 * @throws SystemException if a system exception occurred 1027 */ 1028 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1029 long resourcePrimKey) throws RemoteException { 1030 try { 1031 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(resourcePrimKey); 1032 1033 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1034 } 1035 catch (Exception e) { 1036 _log.error(e, e); 1037 1038 throw new RemoteException(e.getMessage()); 1039 } 1040 } 1041 1042 /** 1043 * Returns the latest web content article matching the group, article ID, 1044 * and workflow status. 1045 * 1046 * @param groupId the primary key of the web content article's group 1047 * @param articleId the primary key of the web content article 1048 * @param status the web content article's workflow status. For more 1049 information see {@link WorkflowConstants} for constants starting 1050 with the "STATUS_" prefix. 1051 * @return the latest matching web content article 1052 * @throws PortalException if the user did not have permission to view the 1053 web content article or if a matching web content article could 1054 not be found 1055 * @throws SystemException if a system exception occurred 1056 */ 1057 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1058 long groupId, java.lang.String articleId, int status) 1059 throws RemoteException { 1060 try { 1061 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1062 articleId, status); 1063 1064 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1065 } 1066 catch (Exception e) { 1067 _log.error(e, e); 1068 1069 throw new RemoteException(e.getMessage()); 1070 } 1071 } 1072 1073 /** 1074 * Returns the latest web content article matching the group, class name ID, 1075 * and class PK. 1076 * 1077 * @param groupId the primary key of the web content article's group 1078 * @param className the DDMStructure class name if the web content article 1079 is related to a DDM structure, the class name associated with the 1080 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1081 otherwise 1082 * @param classPK the primary key of the DDM structure, if the DDMStructure 1083 class name is given as the <code>className</code> parameter, the 1084 primary key of the class associated with the web content article, 1085 or <code>0</code> otherwise 1086 * @return the latest matching web content article 1087 * @throws PortalException if a matching web content article could not be 1088 found or if the user did not have permission to view the web 1089 content article 1090 * @throws SystemException if a system exception occurred 1091 */ 1092 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1093 long groupId, java.lang.String className, long classPK) 1094 throws RemoteException { 1095 try { 1096 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1097 className, classPK); 1098 1099 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1100 } 1101 catch (Exception e) { 1102 _log.error(e, e); 1103 1104 throw new RemoteException(e.getMessage()); 1105 } 1106 } 1107 1108 /** 1109 * Moves all versions of the the web content article matching the group and 1110 * article ID to the folder. 1111 * 1112 * @param groupId the primary key of the web content article's group 1113 * @param articleId the primary key of the web content article 1114 * @param newFolderId the primary key of the web content article's new 1115 folder 1116 * @throws PortalException if the user did not have permission to update any 1117 one of the versions of the web content article or if any one of 1118 the versions of the web content article could not be moved to the 1119 folder 1120 * @throws SystemException if a system exception occurred 1121 */ 1122 public static void moveArticle(long groupId, java.lang.String articleId, 1123 long newFolderId) throws RemoteException { 1124 try { 1125 JournalArticleServiceUtil.moveArticle(groupId, articleId, 1126 newFolderId); 1127 } 1128 catch (Exception e) { 1129 _log.error(e, e); 1130 1131 throw new RemoteException(e.getMessage()); 1132 } 1133 } 1134 1135 /** 1136 * Moves the web content article from the Recycle Bin to the folder. 1137 * 1138 * @param groupId the primary key of the web content article's group 1139 * @param resourcePrimKey the primary key of the resource instance 1140 * @param newFolderId the primary key of the web content article's new 1141 folder 1142 * @param serviceContext the service context to be applied. Can set the 1143 modification date, portlet preferences, and can set whether to 1144 add the default command update for the web content article. With 1145 respect to social activities, by setting the service context's 1146 command to {@link 1147 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1148 is considered a web content update activity; otherwise it is 1149 considered a web content add activity. 1150 * @return the updated web content article, which was moved from the Recycle 1151 Bin to the folder 1152 * @throws PortalException if the user did not have permission to view or 1153 update the web content article, if a matching trashed web content 1154 article could not be found, or if a portal exception occurred 1155 * @throws SystemException if a system exception occurred 1156 */ 1157 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1158 long groupId, long resourcePrimKey, long newFolderId, 1159 com.liferay.portal.service.ServiceContext serviceContext) 1160 throws RemoteException { 1161 try { 1162 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1163 resourcePrimKey, newFolderId, serviceContext); 1164 1165 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1166 } 1167 catch (Exception e) { 1168 _log.error(e, e); 1169 1170 throw new RemoteException(e.getMessage()); 1171 } 1172 } 1173 1174 /** 1175 * Moves the web content article from the Recycle Bin to the folder. 1176 * 1177 * @param groupId the primary key of the web content article's group 1178 * @param articleId the primary key of the web content article 1179 * @param newFolderId the primary key of the web content article's new 1180 folder 1181 * @param serviceContext the service context to be applied. Can set the 1182 modification date, portlet preferences, and can set whether to 1183 add the default command update for the web content article. With 1184 respect to social activities, by setting the service context's 1185 command to {@link 1186 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1187 is considered a web content update activity; otherwise it is 1188 considered a web content add activity. 1189 * @return the updated web content article, which was moved from the Recycle 1190 Bin to the folder 1191 * @throws PortalException if the user did not have permission to view or 1192 update the web content article, if a trashed web content article 1193 with the primary key could not be found, or if a portal exception 1194 occurred 1195 * @throws SystemException if a system exception occurred 1196 */ 1197 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1198 long groupId, java.lang.String articleId, long newFolderId, 1199 com.liferay.portal.service.ServiceContext serviceContext) 1200 throws RemoteException { 1201 try { 1202 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1203 articleId, newFolderId, serviceContext); 1204 1205 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1206 } 1207 catch (Exception e) { 1208 _log.error(e, e); 1209 1210 throw new RemoteException(e.getMessage()); 1211 } 1212 } 1213 1214 /** 1215 * Moves the latest version of the web content article matching the group 1216 * and article ID to the recycle bin. 1217 * 1218 * @param groupId the primary key of the web content article's group 1219 * @param articleId the primary key of the web content article 1220 * @return the moved web content article or <code>null</code> if no matching 1221 article was found 1222 * @throws PortalException if the user did not have permission to move the 1223 article to the Recycle Bin or if a portal exception occurred 1224 * @throws SystemException if a system exception occurred 1225 */ 1226 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleToTrash( 1227 long groupId, java.lang.String articleId) throws RemoteException { 1228 try { 1229 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleToTrash(groupId, 1230 articleId); 1231 1232 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1233 } 1234 catch (Exception e) { 1235 _log.error(e, e); 1236 1237 throw new RemoteException(e.getMessage()); 1238 } 1239 } 1240 1241 /** 1242 * Removes the web content of all the company's web content articles 1243 * matching the language. 1244 * 1245 * @param companyId the primary key of the web content article's company 1246 * @param languageId the primary key of the language locale to remove 1247 * @throws PortalException if the user did not have permission to update any 1248 one of the the web content articles or if web content matching 1249 the language could not be found for any one of the articles 1250 * @throws SystemException if a system exception occurred 1251 */ 1252 public static void removeArticleLocale(long companyId, 1253 java.lang.String languageId) throws RemoteException { 1254 try { 1255 JournalArticleServiceUtil.removeArticleLocale(companyId, languageId); 1256 } 1257 catch (Exception e) { 1258 _log.error(e, e); 1259 1260 throw new RemoteException(e.getMessage()); 1261 } 1262 } 1263 1264 /** 1265 * Removes the web content of the web content article matching the group, 1266 * article ID, and version, and language. 1267 * 1268 * @param groupId the primary key of the web content article's group 1269 * @param articleId the primary key of the web content article 1270 * @param version the web content article's version 1271 * @param languageId the primary key of the language locale to remove 1272 * @return the updated web content article with the locale removed 1273 * @throws PortalException if the user did not have permission to update the 1274 web content article or if a matching web content article could 1275 not be found 1276 * @throws SystemException if a system exception occurred 1277 */ 1278 public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale( 1279 long groupId, java.lang.String articleId, double version, 1280 java.lang.String languageId) throws RemoteException { 1281 try { 1282 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId, 1283 articleId, version, languageId); 1284 1285 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1286 } 1287 catch (Exception e) { 1288 _log.error(e, e); 1289 1290 throw new RemoteException(e.getMessage()); 1291 } 1292 } 1293 1294 /** 1295 * Restores the web content article associated with the resource primary key 1296 * from the Recycle Bin. 1297 * 1298 * @param resourcePrimKey the primary key of the resource instance 1299 * @throws PortalException if a matching web content article could not be 1300 found in the Recycle Bin, if the user did not have permission to 1301 view or restore the article, or if a portal exception occurred 1302 * @throws SystemException if a system exception occurred 1303 */ 1304 public static void restoreArticleFromTrash(long resourcePrimKey) 1305 throws RemoteException { 1306 try { 1307 JournalArticleServiceUtil.restoreArticleFromTrash(resourcePrimKey); 1308 } 1309 catch (Exception e) { 1310 _log.error(e, e); 1311 1312 throw new RemoteException(e.getMessage()); 1313 } 1314 } 1315 1316 /** 1317 * Restores the web content article from the Recycle Bin. 1318 * 1319 * @param groupId the primary key of the web content article's group 1320 * @param articleId the primary key of the web content article 1321 * @throws PortalException if the web content article with the primary key 1322 could not be found in the Recycle Bin, if the user did not have 1323 permission to restore the article, or if a portal exception 1324 occurred 1325 * @throws SystemException if a system exception occurred 1326 */ 1327 public static void restoreArticleFromTrash(long groupId, 1328 java.lang.String articleId) throws RemoteException { 1329 try { 1330 JournalArticleServiceUtil.restoreArticleFromTrash(groupId, articleId); 1331 } 1332 catch (Exception e) { 1333 _log.error(e, e); 1334 1335 throw new RemoteException(e.getMessage()); 1336 } 1337 } 1338 1339 /** 1340 * Returns an ordered range of all the web content articles matching the 1341 * parameters, including a keywords parameter for matching with the 1342 * article's ID, title, description, and content, a DDM structure key 1343 * parameter, and a DDM template key parameter. 1344 * 1345 * <p> 1346 * Useful when paginating results. Returns a maximum of <code>end - 1347 * start</code> instances. <code>start</code> and <code>end</code> are not 1348 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1349 * refers to the first result in the set. Setting both <code>start</code> 1350 * and <code>end</code> to {@link 1351 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1352 * result set. 1353 * </p> 1354 * 1355 * @param companyId the primary key of the web content article's company 1356 * @param groupId the primary key of the group (optionally <code>0</code>) 1357 * @param folderIds the primary keys of the web content article folders 1358 (optionally {@link java.util.Collections#EMPTY_LIST}) 1359 * @param classNameId the primary key of the DDMStructure class if the web 1360 content article is related to a DDM structure, the primary key of 1361 the class name associated with the article, or {@link 1362 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1363 * @param keywords the keywords (space separated), which may occur in the 1364 web content article ID, title, description, or content 1365 (optionally <code>null</code>). If the keywords value is not 1366 <code>null</code>, the search uses the OR operator in connecting 1367 query criteria; otherwise it uses the AND operator. 1368 * @param version the web content article's version (optionally 1369 <code>null</code>) 1370 * @param type the web content article's type (optionally 1371 <code>null</code>) 1372 * @param ddmStructureKey the primary key of the web content article's DDM 1373 structure, if the article is related to a DDM structure, or 1374 <code>null</code> otherwise 1375 * @param ddmTemplateKey the primary key of the web content article's DDM 1376 template (optionally <code>null</code>). If the article is 1377 related to a DDM structure, the template's structure must match 1378 it. 1379 * @param displayDateGT the date after which a matching web content 1380 article's display date must be after (optionally 1381 <code>null</code>) 1382 * @param displayDateLT the date before which a matching web content 1383 article's display date must be before (optionally 1384 <code>null</code>) 1385 * @param status the web content article's workflow status. For more 1386 information see {@link WorkflowConstants} for constants starting 1387 with the "STATUS_" prefix. 1388 * @param reviewDate the web content article's scheduled review date 1389 (optionally <code>null</code>) 1390 * @param start the lower bound of the range of web content articles to 1391 return 1392 * @param end the upper bound of the range of web content articles to 1393 return (not inclusive) 1394 * @param obc the comparator to order the web content articles 1395 * @return the range of matching web content articles ordered by the 1396 comparator 1397 * @throws SystemException if a system exception occurred 1398 */ 1399 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1400 long companyId, long groupId, Long[] folderIds, long classNameId, 1401 java.lang.String keywords, java.lang.Double version, 1402 java.lang.String type, java.lang.String ddmStructureKey, 1403 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1404 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1405 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1406 throws RemoteException { 1407 try { 1408 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1409 JournalArticleServiceUtil.search(companyId, groupId, 1410 ListUtil.toList(folderIds), classNameId, keywords, version, 1411 type, ddmStructureKey, ddmTemplateKey, displayDateGT, 1412 displayDateLT, status, reviewDate, start, end, obc); 1413 1414 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1415 } 1416 catch (Exception e) { 1417 _log.error(e, e); 1418 1419 throw new RemoteException(e.getMessage()); 1420 } 1421 } 1422 1423 /** 1424 * Returns an ordered range of all the web content articles matching the 1425 * parameters, including keyword parameters for article ID, title, 1426 * description, and content, a DDM structure key parameter, a DDM template 1427 * key parameter, and an AND operator switch. 1428 * 1429 * <p> 1430 * Useful when paginating results. Returns a maximum of <code>end - 1431 * start</code> instances. <code>start</code> and <code>end</code> are not 1432 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1433 * refers to the first result in the set. Setting both <code>start</code> 1434 * and <code>end</code> to {@link 1435 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1436 * result set. 1437 * </p> 1438 * 1439 * @param companyId the primary key of the web content article's company 1440 * @param groupId the primary key of the group (optionally <code>0</code>) 1441 * @param folderIds the primary keys of the web content article folders 1442 (optionally {@link java.util.Collections#EMPTY_LIST}) 1443 * @param classNameId the primary key of the DDMStructure class if the web 1444 content article is related to a DDM structure, the primary key of 1445 the class name associated with the article, or {@link 1446 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1447 * @param articleId the article ID keywords (space separated, optionally 1448 <code>null</code>) 1449 * @param version the web content article's version (optionally 1450 <code>null</code>) 1451 * @param title the title keywords (space separated, optionally 1452 <code>null</code>) 1453 * @param description the description keywords (space separated, optionally 1454 <code>null</code>) 1455 * @param content the content keywords (space separated, optionally 1456 <code>null</code>) 1457 * @param type the web content article's type (optionally 1458 <code>null</code>) 1459 * @param ddmStructureKey the primary key of the web content article's DDM 1460 structure, if the article is related to a DDM structure, or 1461 <code>null</code> otherwise 1462 * @param ddmTemplateKey the primary key of the web content article's DDM 1463 template (optionally <code>null</code>). If the article is 1464 related to a DDM structure, the template's structure must match 1465 it. 1466 * @param displayDateGT the date after which a matching web content 1467 article's display date must be after (optionally 1468 <code>null</code>) 1469 * @param displayDateLT the date before which a matching web content 1470 article's display date must be before (optionally 1471 <code>null</code>) 1472 * @param status the web content article's workflow status. For more 1473 information see {@link WorkflowConstants} for constants starting 1474 with the "STATUS_" prefix. 1475 * @param reviewDate the web content article's scheduled review date 1476 (optionally <code>null</code>) 1477 * @param andOperator whether every field must match its value or keywords, 1478 or just one field must match. Company, group, folder IDs, class 1479 name ID, and status must all match their values. 1480 * @param start the lower bound of the range of web content articles to 1481 return 1482 * @param end the upper bound of the range of web content articles to 1483 return (not inclusive) 1484 * @param obc the comparator to order the web content articles 1485 * @return the range of matching web content articles ordered by the 1486 comparator 1487 * @throws SystemException if a system exception occurred 1488 */ 1489 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1490 long companyId, long groupId, Long[] folderIds, long classNameId, 1491 java.lang.String articleId, java.lang.Double version, 1492 java.lang.String title, java.lang.String description, 1493 java.lang.String content, java.lang.String type, 1494 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1495 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1496 java.util.Date reviewDate, boolean andOperator, int start, int end, 1497 com.liferay.portal.kernel.util.OrderByComparator obc) 1498 throws RemoteException { 1499 try { 1500 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1501 JournalArticleServiceUtil.search(companyId, groupId, 1502 ListUtil.toList(folderIds), classNameId, articleId, 1503 version, title, description, content, type, 1504 ddmStructureKey, ddmTemplateKey, displayDateGT, 1505 displayDateLT, status, reviewDate, andOperator, start, end, 1506 obc); 1507 1508 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1509 } 1510 catch (Exception e) { 1511 _log.error(e, e); 1512 1513 throw new RemoteException(e.getMessage()); 1514 } 1515 } 1516 1517 /** 1518 * Returns an ordered range of all the web content articles matching the 1519 * parameters, including keyword parameters for article ID, title, 1520 * description, and content, a DDM structure keys (plural) parameter, a DDM 1521 * template keys (plural) parameter, and an AND operator switch. 1522 * 1523 * <p> 1524 * Useful when paginating results. Returns a maximum of <code>end - 1525 * start</code> instances. <code>start</code> and <code>end</code> are not 1526 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1527 * refers to the first result in the set. Setting both <code>start</code> 1528 * and <code>end</code> to {@link 1529 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1530 * result set. 1531 * </p> 1532 * 1533 * @param companyId the primary key of the web content article's company 1534 * @param groupId the primary key of the group (optionally <code>0</code>) 1535 * @param folderIds the primary keys of the web content article folders 1536 (optionally {@link java.util.Collections#EMPTY_LIST}) 1537 * @param classNameId the primary key of the DDMStructure class if the web 1538 content article is related to a DDM structure, the primary key of 1539 the class name associated with the article, or {@link 1540 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1541 * @param articleId the article ID keywords (space separated, optionally 1542 <code>null</code>) 1543 * @param version the web content article's version (optionally 1544 <code>null</code>) 1545 * @param title the title keywords (space separated, optionally 1546 <code>null</code>) 1547 * @param description the description keywords (space separated, optionally 1548 <code>null</code>) 1549 * @param content the content keywords (space separated, optionally 1550 <code>null</code>) 1551 * @param type the web content article's type (optionally 1552 <code>null</code>) 1553 * @param ddmStructureKeys the primary keys of the web content article's 1554 DDM structures, if the article is related to a DDM structure, or 1555 <code>null</code> otherwise 1556 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1557 templates (originally <code>null</code>). If the articles are 1558 related to a DDM structure, the template's structure must match 1559 it. 1560 * @param displayDateGT the date after which a matching web content 1561 article's display date must be after (optionally 1562 <code>null</code>) 1563 * @param displayDateLT the date before which a matching web content 1564 article's display date must be before (optionally 1565 <code>null</code>) 1566 * @param status the web content article's workflow status. For more 1567 information see {@link WorkflowConstants} for constants starting 1568 with the "STATUS_" prefix. 1569 * @param reviewDate the web content article's scheduled review date 1570 (optionally <code>null</code>) 1571 * @param andOperator whether every field must match its value or keywords, 1572 or just one field must match. Company, group, folder IDs, class 1573 name ID, and status must all match their values. 1574 * @param start the lower bound of the range of web content articles to 1575 return 1576 * @param end the upper bound of the range of web content articles to 1577 return (not inclusive) 1578 * @param obc the comparator to order the web content articles 1579 * @return the range of matching web content articles ordered by the 1580 comparator 1581 * @throws SystemException if a system exception occurred 1582 */ 1583 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1584 long companyId, long groupId, Long[] folderIds, long classNameId, 1585 java.lang.String articleId, java.lang.Double version, 1586 java.lang.String title, java.lang.String description, 1587 java.lang.String content, java.lang.String type, 1588 java.lang.String[] ddmStructureKeys, 1589 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1590 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1591 boolean andOperator, int start, int end, 1592 com.liferay.portal.kernel.util.OrderByComparator obc) 1593 throws RemoteException { 1594 try { 1595 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1596 JournalArticleServiceUtil.search(companyId, groupId, 1597 ListUtil.toList(folderIds), classNameId, articleId, 1598 version, title, description, content, type, 1599 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1600 displayDateLT, status, reviewDate, andOperator, start, end, 1601 obc); 1602 1603 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1604 } 1605 catch (Exception e) { 1606 _log.error(e, e); 1607 1608 throw new RemoteException(e.getMessage()); 1609 } 1610 } 1611 1612 /** 1613 * Returns the number of web content articles matching the parameters, 1614 * including a keywords parameter for matching with the article's ID, title, 1615 * description, and content, a DDM structure key parameter, and a DDM 1616 * template key parameter. 1617 * 1618 * @param companyId the primary key of the web content article's company 1619 * @param groupId the primary key of the group (optionally <code>0</code>) 1620 * @param folderIds the primary keys of the web content article folders 1621 (optionally {@link java.util.Collections#EMPTY_LIST}) 1622 * @param classNameId the primary key of the DDMStructure class if the web 1623 content article is related to a DDM structure, the primary key of 1624 the class name associated with the article, or {@link 1625 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1626 * @param keywords the keywords (space separated), which may occur in the 1627 web content article ID, title, description, or content 1628 (optionally <code>null</code>). If the keywords value is not 1629 <code>null</code>, the search uses the OR operator in connecting 1630 query criteria; otherwise it uses the AND operator. 1631 * @param version the web content article's version (optionally 1632 <code>null</code>) 1633 * @param type the web content article's type (optionally 1634 <code>null</code>) 1635 * @param ddmStructureKey the primary key of the web content article's DDM 1636 structure, if the article is related to a DDM structure, or 1637 <code>null</code> otherwise 1638 * @param ddmTemplateKey the primary key of the web content article's DDM 1639 template (optionally <code>null</code>). If the article is 1640 related to a DDM structure, the template's structure must match 1641 it. 1642 * @param displayDateGT the date after which a matching web content 1643 article's display date must be after (optionally 1644 <code>null</code>) 1645 * @param displayDateLT the date before which a matching web content 1646 article's display date must be before (optionally 1647 <code>null</code>) 1648 * @param status the web content article's workflow status. For more 1649 information see {@link WorkflowConstants} for constants starting 1650 with the "STATUS_" prefix. 1651 * @param reviewDate the web content article's scheduled review date 1652 (optionally <code>null</code>) 1653 * @return the number of matching web content articles 1654 * @throws SystemException if a system exception occurred 1655 */ 1656 public static int searchCount(long companyId, long groupId, 1657 Long[] folderIds, long classNameId, java.lang.String keywords, 1658 java.lang.Double version, java.lang.String type, 1659 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1660 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1661 java.util.Date reviewDate) throws RemoteException { 1662 try { 1663 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1664 groupId, ListUtil.toList(folderIds), classNameId, keywords, 1665 version, type, ddmStructureKey, ddmTemplateKey, 1666 displayDateGT, displayDateLT, status, reviewDate); 1667 1668 return returnValue; 1669 } 1670 catch (Exception e) { 1671 _log.error(e, e); 1672 1673 throw new RemoteException(e.getMessage()); 1674 } 1675 } 1676 1677 /** 1678 * Returns the number of web content articles matching the parameters, 1679 * including keyword parameters for article ID, title, description, and 1680 * content, a DDM structure key parameter, a DDM template key parameter, and 1681 * an AND operator switch. 1682 * 1683 * @param companyId the primary key of the web content article's company 1684 * @param groupId the primary key of the group (optionally <code>0</code>) 1685 * @param folderIds the primary keys of the web content article folders 1686 (optionally {@link java.util.Collections#EMPTY_LIST}) 1687 * @param classNameId the primary key of the DDMStructure class if the web 1688 content article is related to a DDM structure, the primary key of 1689 the class name associated with the article, or {@link 1690 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1691 * @param articleId the article ID keywords (space separated, optionally 1692 <code>null</code>) 1693 * @param version the web content article's version (optionally 1694 <code>null</code>) 1695 * @param title the title keywords (space separated, optionally 1696 <code>null</code>) 1697 * @param description the description keywords (space separated, optionally 1698 <code>null</code>) 1699 * @param content the content keywords (space separated, optionally 1700 <code>null</code>) 1701 * @param type the web content article's type (optionally 1702 <code>null</code>) 1703 * @param ddmStructureKey the primary key of the web content article's DDM 1704 structure, if the article is related to a DDM structure, or 1705 <code>null</code> otherwise 1706 * @param ddmTemplateKey the primary key of the web content article's DDM 1707 template (optionally <code>null</code>). If the article is 1708 related to a DDM structure, the template's structure must match 1709 it. 1710 * @param displayDateGT the date after which a matching web content 1711 article's display date must be after (optionally 1712 <code>null</code>) 1713 * @param displayDateLT the date before which a matching web content 1714 article's display date must be before (optionally 1715 <code>null</code>) 1716 * @param status the web content article's workflow status. For more 1717 information see {@link WorkflowConstants} for constants starting 1718 with the "STATUS_" prefix. 1719 * @param reviewDate the web content article's scheduled review date 1720 (optionally <code>null</code>) 1721 * @param andOperator whether every field must match its value or keywords, 1722 or just one field must match. Group, folder IDs, class name ID, 1723 and status must all match their values. 1724 * @return the number of matching web content articles 1725 * @throws SystemException if a system exception occurred 1726 */ 1727 public static int searchCount(long companyId, long groupId, 1728 Long[] folderIds, long classNameId, java.lang.String articleId, 1729 java.lang.Double version, java.lang.String title, 1730 java.lang.String description, java.lang.String content, 1731 java.lang.String type, java.lang.String ddmStructureKey, 1732 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1733 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1734 boolean andOperator) throws RemoteException { 1735 try { 1736 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1737 groupId, ListUtil.toList(folderIds), classNameId, 1738 articleId, version, title, description, content, type, 1739 ddmStructureKey, ddmTemplateKey, displayDateGT, 1740 displayDateLT, status, reviewDate, andOperator); 1741 1742 return returnValue; 1743 } 1744 catch (Exception e) { 1745 _log.error(e, e); 1746 1747 throw new RemoteException(e.getMessage()); 1748 } 1749 } 1750 1751 /** 1752 * Returns the number of web content articles matching the parameters, 1753 * including keyword parameters for article ID, title, description, and 1754 * content, a DDM structure keys (plural) parameter, a DDM template keys 1755 * (plural) parameter, and an AND operator switch. 1756 * 1757 * @param companyId the primary key of the web content article's company 1758 * @param groupId the primary key of the group (optionally <code>0</code>) 1759 * @param folderIds the primary keys of the web content article folders 1760 (optionally {@link java.util.Collections#EMPTY_LIST}) 1761 * @param classNameId the primary key of the DDMStructure class if the web 1762 content article is related to a DDM structure, the primary key of 1763 the class name associated with the article, or {@link 1764 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1765 * @param articleId the article ID keywords (space separated, optionally 1766 <code>null</code>) 1767 * @param version the web content article's version (optionally 1768 <code>null</code>) 1769 * @param title the title keywords (space separated, optionally 1770 <code>null</code>) 1771 * @param description the description keywords (space separated, optionally 1772 <code>null</code>) 1773 * @param content the content keywords (space separated, optionally 1774 <code>null</code>) 1775 * @param type the web content article's type (optionally 1776 <code>null</code>) 1777 * @param ddmStructureKeys the primary keys of the web content article's 1778 DDM structures, if the article is related to a DDM structure, or 1779 <code>null</code> otherwise 1780 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1781 templates (originally <code>null</code>). If the articles are 1782 related to a DDM structure, the template's structure must match 1783 it. 1784 * @param displayDateGT the date after which a matching web content 1785 article's display date must be after (optionally 1786 <code>null</code>) 1787 * @param displayDateLT the date before which a matching web content 1788 article's display date must be before (optionally 1789 <code>null</code>) 1790 * @param status the web content article's workflow status. For more 1791 information see {@link WorkflowConstants} for constants starting 1792 with the "STATUS_" prefix. 1793 * @param reviewDate the web content article's scheduled review date 1794 (optionally <code>null</code>) 1795 * @param andOperator whether every field must match its value or keywords, 1796 or just one field must match. Group, folder IDs, class name ID, 1797 and status must all match their values. 1798 * @return the number of matching web content articles 1799 * @throws SystemException if a system exception occurred 1800 */ 1801 public static int searchCount(long companyId, long groupId, 1802 Long[] folderIds, long classNameId, java.lang.String articleId, 1803 java.lang.Double version, java.lang.String title, 1804 java.lang.String description, java.lang.String content, 1805 java.lang.String type, java.lang.String[] ddmStructureKeys, 1806 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1807 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1808 boolean andOperator) throws RemoteException { 1809 try { 1810 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1811 groupId, ListUtil.toList(folderIds), classNameId, 1812 articleId, version, title, description, content, type, 1813 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1814 displayDateLT, status, reviewDate, andOperator); 1815 1816 return returnValue; 1817 } 1818 catch (Exception e) { 1819 _log.error(e, e); 1820 1821 throw new RemoteException(e.getMessage()); 1822 } 1823 } 1824 1825 /** 1826 * Subscribes the user to notifications for the web content article matching 1827 * the group, notifying him the instant versions of the article are created, 1828 * deleted, or modified. 1829 * 1830 * @param groupId the primary key of the group 1831 * @throws PortalException if the user did not have permission to subscribe 1832 to the web content article or if a matching user or group could 1833 not be found 1834 * @throws SystemException if a system exception occurred 1835 */ 1836 public static void subscribe(long groupId) throws RemoteException { 1837 try { 1838 JournalArticleServiceUtil.subscribe(groupId); 1839 } 1840 catch (Exception e) { 1841 _log.error(e, e); 1842 1843 throw new RemoteException(e.getMessage()); 1844 } 1845 } 1846 1847 /** 1848 * Unsubscribes the user from notifications for the web content article 1849 * matching the group. 1850 * 1851 * @param groupId the primary key of the group 1852 * @throws PortalException if the user did not have permission to subscribe 1853 to the web content article or if a matching user or subscription 1854 could not be found 1855 * @throws SystemException if a system exception occurred 1856 */ 1857 public static void unsubscribe(long groupId) throws RemoteException { 1858 try { 1859 JournalArticleServiceUtil.unsubscribe(groupId); 1860 } 1861 catch (Exception e) { 1862 _log.error(e, e); 1863 1864 throw new RemoteException(e.getMessage()); 1865 } 1866 } 1867 1868 /** 1869 * Updates the web content article matching the version, replacing its 1870 * folder, title, description, content, and layout UUID. 1871 * 1872 * @param userId the primary key of the user updating the web content 1873 article 1874 * @param groupId the primary key of the web content article's group 1875 * @param folderId the primary key of the web content article folder 1876 * @param articleId the primary key of the web content article 1877 * @param version the web content article's version 1878 * @param titleMap the web content article's locales and localized titles 1879 * @param descriptionMap the web content article's locales and localized 1880 descriptions 1881 * @param content the HTML content wrapped in XML. For more information, 1882 see the content example in the class description for {@link 1883 JournalArticleLocalServiceImpl}. 1884 * @param layoutUuid the unique string identifying the web content 1885 article's display page 1886 * @param serviceContext the service context to be applied. Can set the 1887 modification date, expando bridge attributes, asset category IDs, 1888 asset tag names, asset link entry IDs, workflow actions, the 1889 "defaultLanguageId" and "urlTitle" attributes, and can set 1890 whether to add the default command update for the web content 1891 article. With respect to social activities, by setting the 1892 service context's command to {@link 1893 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1894 is considered a web content update activity; otherwise it is 1895 considered a web content add activity. 1896 * @return the updated web content article 1897 * @throws PortalException if a user with the primary key or a matching web 1898 content article could not be found, or if a portal exception 1899 occurred 1900 * @throws SystemException if a system exception occurred 1901 */ 1902 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 1903 long userId, long groupId, long folderId, java.lang.String articleId, 1904 double version, java.lang.String[] titleMapLanguageIds, 1905 java.lang.String[] titleMapValues, 1906 java.lang.String[] descriptionMapLanguageIds, 1907 java.lang.String[] descriptionMapValues, java.lang.String content, 1908 java.lang.String layoutUuid, 1909 com.liferay.portal.service.ServiceContext serviceContext) 1910 throws RemoteException { 1911 try { 1912 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, 1913 titleMapValues); 1914 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 1915 descriptionMapValues); 1916 1917 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(userId, 1918 groupId, folderId, articleId, version, titleMap, 1919 descriptionMap, content, layoutUuid, serviceContext); 1920 1921 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1922 } 1923 catch (Exception e) { 1924 _log.error(e, e); 1925 1926 throw new RemoteException(e.getMessage()); 1927 } 1928 } 1929 1930 /** 1931 * Updates the web content article matching the version, replacing its 1932 * folder and content. 1933 * 1934 * @param groupId the primary key of the web content article's group 1935 * @param folderId the primary key of the web content article folder 1936 * @param articleId the primary key of the web content article 1937 * @param version the web content article's version 1938 * @param content the HTML content wrapped in XML. For more information, 1939 see the content example in the class description for {@link 1940 JournalArticleLocalServiceImpl}. 1941 * @param serviceContext the service context to be applied. Can set the 1942 modification date, expando bridge attributes, asset category IDs, 1943 asset tag names, asset link entry IDs, workflow actions, the 1944 "defaultLanguageId" and "urlTitle" attributes, and can set 1945 whether to add the default command update for the web content 1946 article. With respect to social activities, by setting the 1947 service context's command to {@link 1948 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1949 is considered a web content update activity; otherwise it is 1950 considered a web content add activity. 1951 * @return the updated web content article 1952 * @throws PortalException if the user did not have permission to update the 1953 web content article, if a user with the primary key or a matching 1954 web content article could not be found, or if a portal exception 1955 occurred 1956 * @throws SystemException if a system exception occurred 1957 */ 1958 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 1959 long groupId, long folderId, java.lang.String articleId, 1960 double version, java.lang.String content, 1961 com.liferay.portal.service.ServiceContext serviceContext) 1962 throws RemoteException { 1963 try { 1964 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId, 1965 folderId, articleId, version, content, serviceContext); 1966 1967 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1968 } 1969 catch (Exception e) { 1970 _log.error(e, e); 1971 1972 throw new RemoteException(e.getMessage()); 1973 } 1974 } 1975 1976 /** 1977 * Updates the web content article matching the group, article ID, and 1978 * version, replacing its content. 1979 * 1980 * @param groupId the primary key of the web content article's group 1981 * @param articleId the primary key of the web content article 1982 * @param version the web content article's version 1983 * @param content the HTML content wrapped in XML. For more information, 1984 see the content example in the class description for {@link 1985 JournalArticleLocalServiceImpl}. 1986 * @return the updated web content article 1987 * @throws PortalException if the user did not have permission to update the 1988 web content article or if a matching web content article could 1989 not be found 1990 * @throws SystemException if a system exception occurred 1991 */ 1992 public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent( 1993 long groupId, java.lang.String articleId, double version, 1994 java.lang.String content) throws RemoteException { 1995 try { 1996 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId, 1997 articleId, version, content); 1998 1999 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2000 } 2001 catch (Exception e) { 2002 _log.error(e, e); 2003 2004 throw new RemoteException(e.getMessage()); 2005 } 2006 } 2007 2008 /** 2009 * Updates the workflow status of the web content article matching the 2010 * group, article ID, and version. 2011 * 2012 * @param groupId the primary key of the web content article's group 2013 * @param articleId the primary key of the web content article 2014 * @param version the web content article's version 2015 * @param status the web content article's workflow status. For more 2016 information see {@link WorkflowConstants} for constants starting 2017 with the "STATUS_" prefix. 2018 * @param articleURL the web content article's accessible URL 2019 * @param serviceContext the service context to be applied. Can set the 2020 modification date, portlet preferences, and can set whether to 2021 add the default command update for the web content article. 2022 * @return the updated web content article 2023 * @throws PortalException if the user did not have permission to update the 2024 web content article, if a matching web content article could not 2025 be found, or if a portal exception occurred 2026 * @throws SystemException if a system exception occurred 2027 */ 2028 public static com.liferay.portlet.journal.model.JournalArticleSoap updateStatus( 2029 long groupId, java.lang.String articleId, double version, int status, 2030 java.lang.String articleURL, 2031 com.liferay.portal.service.ServiceContext serviceContext) 2032 throws RemoteException { 2033 try { 2034 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateStatus(groupId, 2035 articleId, version, status, articleURL, serviceContext); 2036 2037 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2038 } 2039 catch (Exception e) { 2040 _log.error(e, e); 2041 2042 throw new RemoteException(e.getMessage()); 2043 } 2044 } 2045 2046 private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class); 2047 }