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