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