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