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