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 /** 930 * Returns an ordered range of all the web content articles matching the 931 * group, user, the root folder or any of its subfolders. 932 * 933 * @param groupId the primary key of the web content article's group 934 * @param userId the primary key of the user (optionally <code>0</code>) 935 * @param rootFolderId the primary key of the root folder to begin the 936 search 937 * @param status the web content article's workflow status. For more 938 information see {@link WorkflowConstants} for constants starting 939 with the "STATUS_" prefix. 940 * @param start the lower bound of the range of web content articles to 941 return 942 * @param end the upper bound of the range of web content articles to 943 return (not inclusive) 944 * @param orderByComparator the comparator to order the web content 945 articles 946 * @return the range of matching web content articles ordered by the 947 comparator 948 * @throws PortalException if the root folder could not be found, if the 949 current user did not have permission to view the root folder, or 950 if a portal exception occurred 951 * @throws SystemException if a system exception occurred 952 */ 953 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 954 long groupId, long userId, long rootFolderId, int status, 955 boolean includeOwner, int start, int end, 956 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 957 throws RemoteException { 958 try { 959 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 960 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 961 rootFolderId, status, includeOwner, start, end, 962 orderByComparator); 963 964 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 965 } 966 catch (Exception e) { 967 _log.error(e, e); 968 969 throw new RemoteException(e.getMessage()); 970 } 971 } 972 973 /** 974 * Returns an ordered range of all the web content articles matching the 975 * group, user, the root folder or any of its subfolders. 976 * 977 * @param groupId the primary key of the web content article's group 978 * @param userId the primary key of the user (optionally <code>0</code>) 979 * @param rootFolderId the primary key of the root folder to begin the 980 search 981 * @param status the web content article's workflow status. For more 982 information see {@link WorkflowConstants} for constants starting 983 with the "STATUS_" prefix. 984 * @param start the lower bound of the range of web content articles to 985 return 986 * @param end the upper bound of the range of web content articles to 987 return (not inclusive) 988 * @param orderByComparator the comparator to order the web content 989 articles 990 * @return the range of matching web content articles ordered by the 991 comparator 992 * @throws PortalException if the root folder could not be found, if the 993 current user did not have permission to view the root folder, or 994 if a portal exception occurred 995 * @throws SystemException if a system exception occurred 996 */ 997 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 998 long groupId, long userId, long rootFolderId, int status, int start, 999 int end, 1000 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1001 throws RemoteException { 1002 try { 1003 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1004 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 1005 rootFolderId, status, start, end, orderByComparator); 1006 1007 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1008 } 1009 catch (Exception e) { 1010 _log.error(e, e); 1011 1012 throw new RemoteException(e.getMessage()); 1013 } 1014 } 1015 1016 /** 1017 * Returns an ordered range of all the web content articles matching the 1018 * group, user, the root folder or any of its subfolders. 1019 * 1020 * <p> 1021 * Useful when paginating results. Returns a maximum of <code>end - 1022 * start</code> instances. <code>start</code> and <code>end</code> are not 1023 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1024 * refers to the first result in the set. Setting both <code>start</code> 1025 * and <code>end</code> to {@link 1026 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1027 * result set. 1028 * </p> 1029 * 1030 * @param groupId the primary key of the web content article's group 1031 * @param userId the primary key of the user (optionally <code>0</code>) 1032 * @param rootFolderId the primary key of the root folder to begin the 1033 search 1034 * @param start the lower bound of the range of web content articles to 1035 return 1036 * @param end the upper bound of the range of web content articles to 1037 return (not inclusive) 1038 * @param orderByComparator the comparator to order the web content 1039 articles 1040 * @return the range of matching web content articles ordered by the 1041 comparator 1042 * @throws PortalException if the root folder could not be found, if the 1043 current user did not have permission to view the root folder, or 1044 if a portal exception occurred 1045 * @throws SystemException if a system exception occurred 1046 */ 1047 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getGroupArticles( 1048 long groupId, long userId, long rootFolderId, int start, int end, 1049 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 1050 throws RemoteException { 1051 try { 1052 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1053 JournalArticleServiceUtil.getGroupArticles(groupId, userId, 1054 rootFolderId, start, end, orderByComparator); 1055 1056 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1057 } 1058 catch (Exception e) { 1059 _log.error(e, e); 1060 1061 throw new RemoteException(e.getMessage()); 1062 } 1063 } 1064 1065 /** 1066 * Returns the number of web content articles matching the group, user, and 1067 * the root folder or any of its subfolders. 1068 * 1069 * @param groupId the primary key of the web content article's group 1070 * @param userId the primary key of the user (optionally <code>0</code>) 1071 * @param rootFolderId the primary key of the root folder to begin the 1072 search 1073 * @return the number of matching web content articles 1074 * @throws PortalException if the root folder could not be found, if the 1075 current user did not have permission to view the root folder, or 1076 if a portal exception occurred 1077 * @throws SystemException if a system exception occurred 1078 */ 1079 public static int getGroupArticlesCount(long groupId, long userId, 1080 long rootFolderId) throws RemoteException { 1081 try { 1082 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1083 userId, rootFolderId); 1084 1085 return returnValue; 1086 } 1087 catch (Exception e) { 1088 _log.error(e, e); 1089 1090 throw new RemoteException(e.getMessage()); 1091 } 1092 } 1093 1094 public static int getGroupArticlesCount(long groupId, long userId, 1095 long rootFolderId, int status) throws RemoteException { 1096 try { 1097 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1098 userId, rootFolderId, status); 1099 1100 return returnValue; 1101 } 1102 catch (Exception e) { 1103 _log.error(e, e); 1104 1105 throw new RemoteException(e.getMessage()); 1106 } 1107 } 1108 1109 /** 1110 * Returns the number of web content articles matching the group, user, 1111 * the root folder or any of its subfolders. 1112 * 1113 * @param groupId the primary key of the web content article's group 1114 * @param userId the primary key of the user (optionally <code>0</code>) 1115 * @param rootFolderId the primary key of the root folder to begin the 1116 search 1117 * @param status the web content article's workflow status. For more 1118 information see {@link WorkflowConstants} for constants starting 1119 with the "STATUS_" prefix. 1120 * @return the range of matching web content articles ordered by the 1121 comparator 1122 * @throws PortalException if the root folder could not be found, if the 1123 current user did not have permission to view the root folder, or 1124 if a portal exception occurred 1125 * @throws SystemException if a system exception occurred 1126 */ 1127 public static int getGroupArticlesCount(long groupId, long userId, 1128 long rootFolderId, int status, boolean includeOwner) 1129 throws RemoteException { 1130 try { 1131 int returnValue = JournalArticleServiceUtil.getGroupArticlesCount(groupId, 1132 userId, rootFolderId, status, includeOwner); 1133 1134 return returnValue; 1135 } 1136 catch (Exception e) { 1137 _log.error(e, e); 1138 1139 throw new RemoteException(e.getMessage()); 1140 } 1141 } 1142 1143 /** 1144 * Returns the latest web content article matching the resource primary key, 1145 * preferring articles with approved workflow status. 1146 * 1147 * @param resourcePrimKey the primary key of the resource instance 1148 * @return the latest web content article matching the resource primary key, 1149 preferring articles with approved workflow status 1150 * @throws PortalException if the user did not have permission to view the 1151 web content article or if a matching web content article could 1152 not be found 1153 * @throws SystemException if a system exception occurred 1154 */ 1155 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1156 long resourcePrimKey) throws RemoteException { 1157 try { 1158 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(resourcePrimKey); 1159 1160 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1161 } 1162 catch (Exception e) { 1163 _log.error(e, e); 1164 1165 throw new RemoteException(e.getMessage()); 1166 } 1167 } 1168 1169 /** 1170 * Returns the latest web content article matching the group, article ID, 1171 * and workflow status. 1172 * 1173 * @param groupId the primary key of the web content article's group 1174 * @param articleId the primary key of the web content article 1175 * @param status the web content article's workflow status. For more 1176 information see {@link WorkflowConstants} for constants starting 1177 with the "STATUS_" prefix. 1178 * @return the latest matching web content article 1179 * @throws PortalException if the user did not have permission to view the 1180 web content article or if a matching web content article could 1181 not be found 1182 * @throws SystemException if a system exception occurred 1183 */ 1184 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1185 long groupId, java.lang.String articleId, int status) 1186 throws RemoteException { 1187 try { 1188 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1189 articleId, status); 1190 1191 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1192 } 1193 catch (Exception e) { 1194 _log.error(e, e); 1195 1196 throw new RemoteException(e.getMessage()); 1197 } 1198 } 1199 1200 /** 1201 * Returns the latest web content article matching the group, class name ID, 1202 * and class PK. 1203 * 1204 * @param groupId the primary key of the web content article's group 1205 * @param className the DDMStructure class name if the web content article 1206 is related to a DDM structure, the class name associated with the 1207 article, or {@link JournalArticleConstants#CLASSNAME_ID_DEFAULT} 1208 otherwise 1209 * @param classPK the primary key of the DDM structure, if the DDMStructure 1210 class name is given as the <code>className</code> parameter, the 1211 primary key of the class associated with the web content article, 1212 or <code>0</code> otherwise 1213 * @return the latest matching web content article 1214 * @throws PortalException if a matching web content article could not be 1215 found or if the user did not have permission to view the web 1216 content article 1217 * @throws SystemException if a system exception occurred 1218 */ 1219 public static com.liferay.portlet.journal.model.JournalArticleSoap getLatestArticle( 1220 long groupId, java.lang.String className, long classPK) 1221 throws RemoteException { 1222 try { 1223 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.getLatestArticle(groupId, 1224 className, classPK); 1225 1226 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1227 } 1228 catch (Exception e) { 1229 _log.error(e, e); 1230 1231 throw new RemoteException(e.getMessage()); 1232 } 1233 } 1234 1235 public static com.liferay.portlet.journal.model.JournalArticleSoap[] getLayoutArticles( 1236 long groupId) throws RemoteException { 1237 try { 1238 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1239 JournalArticleServiceUtil.getLayoutArticles(groupId); 1240 1241 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1242 } 1243 catch (Exception e) { 1244 _log.error(e, e); 1245 1246 throw new RemoteException(e.getMessage()); 1247 } 1248 } 1249 1250 /** 1251 * Moves all versions of the the web content article matching the group and 1252 * article ID to the folder. 1253 * 1254 * @param groupId the primary key of the web content article's group 1255 * @param articleId the primary key of the web content article 1256 * @param newFolderId the primary key of the web content article's new 1257 folder 1258 * @throws PortalException if the user did not have permission to update any 1259 one of the versions of the web content article or if any one of 1260 the versions of the web content article could not be moved to the 1261 folder 1262 * @throws SystemException if a system exception occurred 1263 */ 1264 public static void moveArticle(long groupId, java.lang.String articleId, 1265 long newFolderId) throws RemoteException { 1266 try { 1267 JournalArticleServiceUtil.moveArticle(groupId, articleId, 1268 newFolderId); 1269 } 1270 catch (Exception e) { 1271 _log.error(e, e); 1272 1273 throw new RemoteException(e.getMessage()); 1274 } 1275 } 1276 1277 /** 1278 * Moves the web content article from the Recycle Bin to the folder. 1279 * 1280 * @param groupId the primary key of the web content article's group 1281 * @param resourcePrimKey the primary key of the resource instance 1282 * @param newFolderId the primary key of the web content article's new 1283 folder 1284 * @param serviceContext the service context to be applied. Can set the 1285 modification date, portlet preferences, and can set whether to 1286 add the default command update for the web content article. With 1287 respect to social activities, by setting the service context's 1288 command to {@link 1289 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1290 is considered a web content update activity; otherwise it is 1291 considered a web content add activity. 1292 * @return the updated web content article, which was moved from the Recycle 1293 Bin to the folder 1294 * @throws PortalException if the user did not have permission to view or 1295 update the web content article, if a matching trashed web content 1296 article could not be found, or if a portal exception occurred 1297 * @throws SystemException if a system exception occurred 1298 */ 1299 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1300 long groupId, long resourcePrimKey, long newFolderId, 1301 com.liferay.portal.service.ServiceContext serviceContext) 1302 throws RemoteException { 1303 try { 1304 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1305 resourcePrimKey, newFolderId, serviceContext); 1306 1307 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1308 } 1309 catch (Exception e) { 1310 _log.error(e, e); 1311 1312 throw new RemoteException(e.getMessage()); 1313 } 1314 } 1315 1316 /** 1317 * Moves the web content article from the Recycle Bin to the folder. 1318 * 1319 * @param groupId the primary key of the web content article's group 1320 * @param articleId the primary key of the web content article 1321 * @param newFolderId the primary key of the web content article's new 1322 folder 1323 * @param serviceContext the service context to be applied. Can set the 1324 modification date, portlet preferences, and can set whether to 1325 add the default command update for the web content article. With 1326 respect to social activities, by setting the service context's 1327 command to {@link 1328 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 1329 is considered a web content update activity; otherwise it is 1330 considered a web content add activity. 1331 * @return the updated web content article, which was moved from the Recycle 1332 Bin to the folder 1333 * @throws PortalException if the user did not have permission to view or 1334 update the web content article, if a trashed web content article 1335 with the primary key could not be found, or if a portal exception 1336 occurred 1337 * @throws SystemException if a system exception occurred 1338 */ 1339 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleFromTrash( 1340 long groupId, java.lang.String articleId, long newFolderId, 1341 com.liferay.portal.service.ServiceContext serviceContext) 1342 throws RemoteException { 1343 try { 1344 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleFromTrash(groupId, 1345 articleId, newFolderId, serviceContext); 1346 1347 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1348 } 1349 catch (Exception e) { 1350 _log.error(e, e); 1351 1352 throw new RemoteException(e.getMessage()); 1353 } 1354 } 1355 1356 /** 1357 * Moves the latest version of the web content article matching the group 1358 * and article ID to the recycle bin. 1359 * 1360 * @param groupId the primary key of the web content article's group 1361 * @param articleId the primary key of the web content article 1362 * @return the moved web content article or <code>null</code> if no matching 1363 article was found 1364 * @throws PortalException if the user did not have permission to move the 1365 article to the Recycle Bin or if a portal exception occurred 1366 * @throws SystemException if a system exception occurred 1367 */ 1368 public static com.liferay.portlet.journal.model.JournalArticleSoap moveArticleToTrash( 1369 long groupId, java.lang.String articleId) throws RemoteException { 1370 try { 1371 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.moveArticleToTrash(groupId, 1372 articleId); 1373 1374 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1375 } 1376 catch (Exception e) { 1377 _log.error(e, e); 1378 1379 throw new RemoteException(e.getMessage()); 1380 } 1381 } 1382 1383 /** 1384 * Removes the web content of all the company's web content articles 1385 * matching the language. 1386 * 1387 * @param companyId the primary key of the web content article's company 1388 * @param languageId the primary key of the language locale to remove 1389 * @throws PortalException if the user did not have permission to update any 1390 one of the the web content articles or if web content matching 1391 the language could not be found for any one of the articles 1392 * @throws SystemException if a system exception occurred 1393 */ 1394 public static void removeArticleLocale(long companyId, 1395 java.lang.String languageId) throws RemoteException { 1396 try { 1397 JournalArticleServiceUtil.removeArticleLocale(companyId, languageId); 1398 } 1399 catch (Exception e) { 1400 _log.error(e, e); 1401 1402 throw new RemoteException(e.getMessage()); 1403 } 1404 } 1405 1406 /** 1407 * Removes the web content of the web content article matching the group, 1408 * article ID, and version, and language. 1409 * 1410 * @param groupId the primary key of the web content article's group 1411 * @param articleId the primary key of the web content article 1412 * @param version the web content article's version 1413 * @param languageId the primary key of the language locale to remove 1414 * @return the updated web content article with the locale removed 1415 * @throws PortalException if the user did not have permission to update the 1416 web content article or if a matching web content article could 1417 not be found 1418 * @throws SystemException if a system exception occurred 1419 */ 1420 public static com.liferay.portlet.journal.model.JournalArticleSoap removeArticleLocale( 1421 long groupId, java.lang.String articleId, double version, 1422 java.lang.String languageId) throws RemoteException { 1423 try { 1424 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.removeArticleLocale(groupId, 1425 articleId, version, languageId); 1426 1427 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 1428 } 1429 catch (Exception e) { 1430 _log.error(e, e); 1431 1432 throw new RemoteException(e.getMessage()); 1433 } 1434 } 1435 1436 /** 1437 * Restores the web content article associated with the resource primary key 1438 * from the Recycle Bin. 1439 * 1440 * @param resourcePrimKey the primary key of the resource instance 1441 * @throws PortalException if a matching web content article could not be 1442 found in the Recycle Bin, if the user did not have permission to 1443 view or restore the article, or if a portal exception occurred 1444 * @throws SystemException if a system exception occurred 1445 */ 1446 public static void restoreArticleFromTrash(long resourcePrimKey) 1447 throws RemoteException { 1448 try { 1449 JournalArticleServiceUtil.restoreArticleFromTrash(resourcePrimKey); 1450 } 1451 catch (Exception e) { 1452 _log.error(e, e); 1453 1454 throw new RemoteException(e.getMessage()); 1455 } 1456 } 1457 1458 /** 1459 * Restores the web content article from the Recycle Bin. 1460 * 1461 * @param groupId the primary key of the web content article's group 1462 * @param articleId the primary key of the web content article 1463 * @throws PortalException if the web content article with the primary key 1464 could not be found in the Recycle Bin, if the user did not have 1465 permission to restore the article, or if a portal exception 1466 occurred 1467 * @throws SystemException if a system exception occurred 1468 */ 1469 public static void restoreArticleFromTrash(long groupId, 1470 java.lang.String articleId) throws RemoteException { 1471 try { 1472 JournalArticleServiceUtil.restoreArticleFromTrash(groupId, articleId); 1473 } 1474 catch (Exception e) { 1475 _log.error(e, e); 1476 1477 throw new RemoteException(e.getMessage()); 1478 } 1479 } 1480 1481 /** 1482 * Returns an ordered range of all the web content articles matching the 1483 * parameters, including a keywords parameter for matching with the 1484 * article's ID, title, description, and content, a DDM structure key 1485 * parameter, and a DDM template key parameter. 1486 * 1487 * <p> 1488 * Useful when paginating results. Returns a maximum of <code>end - 1489 * start</code> instances. <code>start</code> and <code>end</code> are not 1490 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1491 * refers to the first result in the set. Setting both <code>start</code> 1492 * and <code>end</code> to {@link 1493 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1494 * result set. 1495 * </p> 1496 * 1497 * @param companyId the primary key of the web content article's company 1498 * @param groupId the primary key of the group (optionally <code>0</code>) 1499 * @param folderIds the primary keys of the web content article folders 1500 (optionally {@link java.util.Collections#EMPTY_LIST}) 1501 * @param classNameId the primary key of the DDMStructure class if the web 1502 content article is related to a DDM structure, the primary key of 1503 the class name associated with the article, or {@link 1504 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1505 * @param keywords the keywords (space separated), which may occur in the 1506 web content article ID, title, description, or content 1507 (optionally <code>null</code>). If the keywords value is not 1508 <code>null</code>, the search uses the OR operator in connecting 1509 query criteria; otherwise it uses the AND operator. 1510 * @param version the web content article's version (optionally 1511 <code>null</code>) 1512 * @param type the web content article's type (optionally 1513 <code>null</code>) 1514 * @param ddmStructureKey the primary key of the web content article's DDM 1515 structure, if the article is related to a DDM structure, or 1516 <code>null</code> otherwise 1517 * @param ddmTemplateKey the primary key of the web content article's DDM 1518 template (optionally <code>null</code>). If the article is 1519 related to a DDM structure, the template's structure must match 1520 it. 1521 * @param displayDateGT the date after which a matching web content 1522 article's display date must be after (optionally 1523 <code>null</code>) 1524 * @param displayDateLT the date before which a matching web content 1525 article's display date must be before (optionally 1526 <code>null</code>) 1527 * @param status the web content article's workflow status. For more 1528 information see {@link WorkflowConstants} for constants starting 1529 with the "STATUS_" prefix. 1530 * @param reviewDate the web content article's scheduled review date 1531 (optionally <code>null</code>) 1532 * @param start the lower bound of the range of web content articles to 1533 return 1534 * @param end the upper bound of the range of web content articles to 1535 return (not inclusive) 1536 * @param obc the comparator to order the web content articles 1537 * @return the range of matching web content articles ordered by the 1538 comparator 1539 * @throws SystemException if a system exception occurred 1540 */ 1541 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1542 long companyId, long groupId, Long[] folderIds, long classNameId, 1543 java.lang.String keywords, java.lang.Double version, 1544 java.lang.String type, java.lang.String ddmStructureKey, 1545 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1546 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1547 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc) 1548 throws RemoteException { 1549 try { 1550 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1551 JournalArticleServiceUtil.search(companyId, groupId, 1552 ListUtil.toList(folderIds), classNameId, keywords, version, 1553 type, ddmStructureKey, ddmTemplateKey, displayDateGT, 1554 displayDateLT, status, reviewDate, start, end, obc); 1555 1556 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1557 } 1558 catch (Exception e) { 1559 _log.error(e, e); 1560 1561 throw new RemoteException(e.getMessage()); 1562 } 1563 } 1564 1565 /** 1566 * Returns an ordered range of all the web content articles matching the 1567 * parameters, including keyword parameters for article ID, title, 1568 * description, and content, a DDM structure key parameter, a DDM template 1569 * key parameter, and an AND operator switch. 1570 * 1571 * <p> 1572 * Useful when paginating results. Returns a maximum of <code>end - 1573 * start</code> instances. <code>start</code> and <code>end</code> are not 1574 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1575 * refers to the first result in the set. Setting both <code>start</code> 1576 * and <code>end</code> to {@link 1577 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1578 * result set. 1579 * </p> 1580 * 1581 * @param companyId the primary key of the web content article's company 1582 * @param groupId the primary key of the group (optionally <code>0</code>) 1583 * @param folderIds the primary keys of the web content article folders 1584 (optionally {@link java.util.Collections#EMPTY_LIST}) 1585 * @param classNameId the primary key of the DDMStructure class if the web 1586 content article is related to a DDM structure, the primary key of 1587 the class name associated with the article, or {@link 1588 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1589 * @param articleId the article ID keywords (space separated, optionally 1590 <code>null</code>) 1591 * @param version the web content article's version (optionally 1592 <code>null</code>) 1593 * @param title the title keywords (space separated, optionally 1594 <code>null</code>) 1595 * @param description the description keywords (space separated, optionally 1596 <code>null</code>) 1597 * @param content the content keywords (space separated, optionally 1598 <code>null</code>) 1599 * @param type the web content article's type (optionally 1600 <code>null</code>) 1601 * @param ddmStructureKey the primary key of the web content article's DDM 1602 structure, if the article is related to a DDM structure, or 1603 <code>null</code> otherwise 1604 * @param ddmTemplateKey the primary key of the web content article's DDM 1605 template (optionally <code>null</code>). If the article is 1606 related to a DDM structure, the template's structure must match 1607 it. 1608 * @param displayDateGT the date after which a matching web content 1609 article's display date must be after (optionally 1610 <code>null</code>) 1611 * @param displayDateLT the date before which a matching web content 1612 article's display date must be before (optionally 1613 <code>null</code>) 1614 * @param status the web content article's workflow status. For more 1615 information see {@link WorkflowConstants} for constants starting 1616 with the "STATUS_" prefix. 1617 * @param reviewDate the web content article's scheduled review date 1618 (optionally <code>null</code>) 1619 * @param andOperator whether every field must match its value or keywords, 1620 or just one field must match. Company, group, folder IDs, class 1621 name ID, and status must all match their values. 1622 * @param start the lower bound of the range of web content articles to 1623 return 1624 * @param end the upper bound of the range of web content articles to 1625 return (not inclusive) 1626 * @param obc the comparator to order the web content articles 1627 * @return the range of matching web content articles ordered by the 1628 comparator 1629 * @throws SystemException if a system exception occurred 1630 */ 1631 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1632 long companyId, long groupId, Long[] folderIds, long classNameId, 1633 java.lang.String articleId, java.lang.Double version, 1634 java.lang.String title, java.lang.String description, 1635 java.lang.String content, java.lang.String type, 1636 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1637 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1638 java.util.Date reviewDate, boolean andOperator, int start, int end, 1639 com.liferay.portal.kernel.util.OrderByComparator obc) 1640 throws RemoteException { 1641 try { 1642 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1643 JournalArticleServiceUtil.search(companyId, groupId, 1644 ListUtil.toList(folderIds), classNameId, articleId, 1645 version, title, description, content, type, 1646 ddmStructureKey, ddmTemplateKey, displayDateGT, 1647 displayDateLT, status, reviewDate, andOperator, start, end, 1648 obc); 1649 1650 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1651 } 1652 catch (Exception e) { 1653 _log.error(e, e); 1654 1655 throw new RemoteException(e.getMessage()); 1656 } 1657 } 1658 1659 /** 1660 * Returns an ordered range of all the web content articles matching the 1661 * parameters, including keyword parameters for article ID, title, 1662 * description, and content, a DDM structure keys (plural) parameter, a DDM 1663 * template keys (plural) parameter, and an AND operator switch. 1664 * 1665 * <p> 1666 * Useful when paginating results. Returns a maximum of <code>end - 1667 * start</code> instances. <code>start</code> and <code>end</code> are not 1668 * primary keys, they are indexes in the result set. Thus, <code>0</code> 1669 * refers to the first result in the set. Setting both <code>start</code> 1670 * and <code>end</code> to {@link 1671 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 1672 * result set. 1673 * </p> 1674 * 1675 * @param companyId the primary key of the web content article's company 1676 * @param groupId the primary key of the group (optionally <code>0</code>) 1677 * @param folderIds the primary keys of the web content article folders 1678 (optionally {@link java.util.Collections#EMPTY_LIST}) 1679 * @param classNameId the primary key of the DDMStructure class if the web 1680 content article is related to a DDM structure, the primary key of 1681 the class name associated with the article, or {@link 1682 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1683 * @param articleId the article ID keywords (space separated, optionally 1684 <code>null</code>) 1685 * @param version the web content article's version (optionally 1686 <code>null</code>) 1687 * @param title the title keywords (space separated, optionally 1688 <code>null</code>) 1689 * @param description the description keywords (space separated, optionally 1690 <code>null</code>) 1691 * @param content the content keywords (space separated, optionally 1692 <code>null</code>) 1693 * @param type the web content article's type (optionally 1694 <code>null</code>) 1695 * @param ddmStructureKeys the primary keys of the web content article's 1696 DDM structures, if the article is related to a DDM structure, or 1697 <code>null</code> otherwise 1698 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1699 templates (originally <code>null</code>). If the articles are 1700 related to a DDM structure, the template's structure must match 1701 it. 1702 * @param displayDateGT the date after which a matching web content 1703 article's display date must be after (optionally 1704 <code>null</code>) 1705 * @param displayDateLT the date before which a matching web content 1706 article's display date must be before (optionally 1707 <code>null</code>) 1708 * @param status the web content article's workflow status. For more 1709 information see {@link WorkflowConstants} for constants starting 1710 with the "STATUS_" prefix. 1711 * @param reviewDate the web content article's scheduled review date 1712 (optionally <code>null</code>) 1713 * @param andOperator whether every field must match its value or keywords, 1714 or just one field must match. Company, group, folder IDs, class 1715 name ID, and status must all match their values. 1716 * @param start the lower bound of the range of web content articles to 1717 return 1718 * @param end the upper bound of the range of web content articles to 1719 return (not inclusive) 1720 * @param obc the comparator to order the web content articles 1721 * @return the range of matching web content articles ordered by the 1722 comparator 1723 * @throws SystemException if a system exception occurred 1724 */ 1725 public static com.liferay.portlet.journal.model.JournalArticleSoap[] search( 1726 long companyId, long groupId, Long[] folderIds, long classNameId, 1727 java.lang.String articleId, java.lang.Double version, 1728 java.lang.String title, java.lang.String description, 1729 java.lang.String content, java.lang.String type, 1730 java.lang.String[] ddmStructureKeys, 1731 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1732 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1733 boolean andOperator, int start, int end, 1734 com.liferay.portal.kernel.util.OrderByComparator obc) 1735 throws RemoteException { 1736 try { 1737 java.util.List<com.liferay.portlet.journal.model.JournalArticle> returnValue = 1738 JournalArticleServiceUtil.search(companyId, groupId, 1739 ListUtil.toList(folderIds), classNameId, articleId, 1740 version, title, description, content, type, 1741 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1742 displayDateLT, status, reviewDate, andOperator, start, end, 1743 obc); 1744 1745 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModels(returnValue); 1746 } 1747 catch (Exception e) { 1748 _log.error(e, e); 1749 1750 throw new RemoteException(e.getMessage()); 1751 } 1752 } 1753 1754 /** 1755 * Returns the number of web content articles matching the parameters, 1756 * including a keywords parameter for matching with the article's ID, title, 1757 * description, and content, a DDM structure key parameter, and a DDM 1758 * template key parameter. 1759 * 1760 * @param companyId the primary key of the web content article's company 1761 * @param groupId the primary key of the group (optionally <code>0</code>) 1762 * @param folderIds the primary keys of the web content article folders 1763 (optionally {@link java.util.Collections#EMPTY_LIST}) 1764 * @param classNameId the primary key of the DDMStructure class if the web 1765 content article is related to a DDM structure, the primary key of 1766 the class name associated with the article, or {@link 1767 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1768 * @param keywords the keywords (space separated), which may occur in the 1769 web content article ID, title, description, or content 1770 (optionally <code>null</code>). If the keywords value is not 1771 <code>null</code>, the search uses the OR operator in connecting 1772 query criteria; otherwise it uses the AND operator. 1773 * @param version the web content article's version (optionally 1774 <code>null</code>) 1775 * @param type the web content article's type (optionally 1776 <code>null</code>) 1777 * @param ddmStructureKey the primary key of the web content article's DDM 1778 structure, if the article is related to a DDM structure, or 1779 <code>null</code> otherwise 1780 * @param ddmTemplateKey the primary key of the web content article's DDM 1781 template (optionally <code>null</code>). If the article is 1782 related to a DDM structure, the template's structure must match 1783 it. 1784 * @param displayDateGT the date after which a matching web content 1785 article's display date must be after (optionally 1786 <code>null</code>) 1787 * @param displayDateLT the date before which a matching web content 1788 article's display date must be before (optionally 1789 <code>null</code>) 1790 * @param status the web content article's workflow status. For more 1791 information see {@link WorkflowConstants} for constants starting 1792 with the "STATUS_" prefix. 1793 * @param reviewDate the web content article's scheduled review date 1794 (optionally <code>null</code>) 1795 * @return the number of matching web content articles 1796 * @throws SystemException if a system exception occurred 1797 */ 1798 public static int searchCount(long companyId, long groupId, 1799 Long[] folderIds, long classNameId, java.lang.String keywords, 1800 java.lang.Double version, java.lang.String type, 1801 java.lang.String ddmStructureKey, java.lang.String ddmTemplateKey, 1802 java.util.Date displayDateGT, java.util.Date displayDateLT, int status, 1803 java.util.Date reviewDate) throws RemoteException { 1804 try { 1805 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1806 groupId, ListUtil.toList(folderIds), classNameId, keywords, 1807 version, type, ddmStructureKey, ddmTemplateKey, 1808 displayDateGT, displayDateLT, status, reviewDate); 1809 1810 return returnValue; 1811 } 1812 catch (Exception e) { 1813 _log.error(e, e); 1814 1815 throw new RemoteException(e.getMessage()); 1816 } 1817 } 1818 1819 /** 1820 * Returns the number of web content articles matching the parameters, 1821 * including keyword parameters for article ID, title, description, and 1822 * content, a DDM structure key parameter, a DDM template key parameter, and 1823 * an AND operator switch. 1824 * 1825 * @param companyId the primary key of the web content article's company 1826 * @param groupId the primary key of the group (optionally <code>0</code>) 1827 * @param folderIds the primary keys of the web content article folders 1828 (optionally {@link java.util.Collections#EMPTY_LIST}) 1829 * @param classNameId the primary key of the DDMStructure class if the web 1830 content article is related to a DDM structure, the primary key of 1831 the class name associated with the article, or {@link 1832 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1833 * @param articleId the article ID keywords (space separated, optionally 1834 <code>null</code>) 1835 * @param version the web content article's version (optionally 1836 <code>null</code>) 1837 * @param title the title keywords (space separated, optionally 1838 <code>null</code>) 1839 * @param description the description keywords (space separated, optionally 1840 <code>null</code>) 1841 * @param content the content keywords (space separated, optionally 1842 <code>null</code>) 1843 * @param type the web content article's type (optionally 1844 <code>null</code>) 1845 * @param ddmStructureKey the primary key of the web content article's DDM 1846 structure, if the article is related to a DDM structure, or 1847 <code>null</code> otherwise 1848 * @param ddmTemplateKey the primary key of the web content article's DDM 1849 template (optionally <code>null</code>). If the article is 1850 related to a DDM structure, the template's structure must match 1851 it. 1852 * @param displayDateGT the date after which a matching web content 1853 article's display date must be after (optionally 1854 <code>null</code>) 1855 * @param displayDateLT the date before which a matching web content 1856 article's display date must be before (optionally 1857 <code>null</code>) 1858 * @param status the web content article's workflow status. For more 1859 information see {@link WorkflowConstants} for constants starting 1860 with the "STATUS_" prefix. 1861 * @param reviewDate the web content article's scheduled review date 1862 (optionally <code>null</code>) 1863 * @param andOperator whether every field must match its value or keywords, 1864 or just one field must match. Group, folder IDs, class name ID, 1865 and status must all match their values. 1866 * @return the number of matching web content articles 1867 * @throws SystemException if a system exception occurred 1868 */ 1869 public static int searchCount(long companyId, long groupId, 1870 Long[] folderIds, long classNameId, java.lang.String articleId, 1871 java.lang.Double version, java.lang.String title, 1872 java.lang.String description, java.lang.String content, 1873 java.lang.String type, java.lang.String ddmStructureKey, 1874 java.lang.String ddmTemplateKey, java.util.Date displayDateGT, 1875 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1876 boolean andOperator) throws RemoteException { 1877 try { 1878 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1879 groupId, ListUtil.toList(folderIds), classNameId, 1880 articleId, version, title, description, content, type, 1881 ddmStructureKey, ddmTemplateKey, displayDateGT, 1882 displayDateLT, status, reviewDate, andOperator); 1883 1884 return returnValue; 1885 } 1886 catch (Exception e) { 1887 _log.error(e, e); 1888 1889 throw new RemoteException(e.getMessage()); 1890 } 1891 } 1892 1893 /** 1894 * Returns the number of web content articles matching the parameters, 1895 * including keyword parameters for article ID, title, description, and 1896 * content, a DDM structure keys (plural) parameter, a DDM template keys 1897 * (plural) parameter, and an AND operator switch. 1898 * 1899 * @param companyId the primary key of the web content article's company 1900 * @param groupId the primary key of the group (optionally <code>0</code>) 1901 * @param folderIds the primary keys of the web content article folders 1902 (optionally {@link java.util.Collections#EMPTY_LIST}) 1903 * @param classNameId the primary key of the DDMStructure class if the web 1904 content article is related to a DDM structure, the primary key of 1905 the class name associated with the article, or {@link 1906 JournalArticleConstants#CLASSNAME_ID_DEFAULT} otherwise 1907 * @param articleId the article ID keywords (space separated, optionally 1908 <code>null</code>) 1909 * @param version the web content article's version (optionally 1910 <code>null</code>) 1911 * @param title the title keywords (space separated, optionally 1912 <code>null</code>) 1913 * @param description the description keywords (space separated, optionally 1914 <code>null</code>) 1915 * @param content the content keywords (space separated, optionally 1916 <code>null</code>) 1917 * @param type the web content article's type (optionally 1918 <code>null</code>) 1919 * @param ddmStructureKeys the primary keys of the web content article's 1920 DDM structures, if the article is related to a DDM structure, or 1921 <code>null</code> otherwise 1922 * @param ddmTemplateKeys the primary keys of the web content article's DDM 1923 templates (originally <code>null</code>). If the articles are 1924 related to a DDM structure, the template's structure must match 1925 it. 1926 * @param displayDateGT the date after which a matching web content 1927 article's display date must be after (optionally 1928 <code>null</code>) 1929 * @param displayDateLT the date before which a matching web content 1930 article's display date must be before (optionally 1931 <code>null</code>) 1932 * @param status the web content article's workflow status. For more 1933 information see {@link WorkflowConstants} for constants starting 1934 with the "STATUS_" prefix. 1935 * @param reviewDate the web content article's scheduled review date 1936 (optionally <code>null</code>) 1937 * @param andOperator whether every field must match its value or keywords, 1938 or just one field must match. Group, folder IDs, class name ID, 1939 and status must all match their values. 1940 * @return the number of matching web content articles 1941 * @throws SystemException if a system exception occurred 1942 */ 1943 public static int searchCount(long companyId, long groupId, 1944 Long[] folderIds, long classNameId, java.lang.String articleId, 1945 java.lang.Double version, java.lang.String title, 1946 java.lang.String description, java.lang.String content, 1947 java.lang.String type, java.lang.String[] ddmStructureKeys, 1948 java.lang.String[] ddmTemplateKeys, java.util.Date displayDateGT, 1949 java.util.Date displayDateLT, int status, java.util.Date reviewDate, 1950 boolean andOperator) throws RemoteException { 1951 try { 1952 int returnValue = JournalArticleServiceUtil.searchCount(companyId, 1953 groupId, ListUtil.toList(folderIds), classNameId, 1954 articleId, version, title, description, content, type, 1955 ddmStructureKeys, ddmTemplateKeys, displayDateGT, 1956 displayDateLT, status, reviewDate, andOperator); 1957 1958 return returnValue; 1959 } 1960 catch (Exception e) { 1961 _log.error(e, e); 1962 1963 throw new RemoteException(e.getMessage()); 1964 } 1965 } 1966 1967 /** 1968 * Subscribes the user to notifications for the web content article matching 1969 * the group, notifying him the instant versions of the article are created, 1970 * deleted, or modified. 1971 * 1972 * @param groupId the primary key of the group 1973 * @throws PortalException if the user did not have permission to subscribe 1974 to the web content article or if a matching user or group could 1975 not be found 1976 * @throws SystemException if a system exception occurred 1977 */ 1978 public static void subscribe(long groupId) throws RemoteException { 1979 try { 1980 JournalArticleServiceUtil.subscribe(groupId); 1981 } 1982 catch (Exception e) { 1983 _log.error(e, e); 1984 1985 throw new RemoteException(e.getMessage()); 1986 } 1987 } 1988 1989 /** 1990 * Unsubscribes the user from notifications for the web content article 1991 * matching the group. 1992 * 1993 * @param groupId the primary key of the group 1994 * @throws PortalException if the user did not have permission to subscribe 1995 to the web content article or if a matching user or subscription 1996 could not be found 1997 * @throws SystemException if a system exception occurred 1998 */ 1999 public static void unsubscribe(long groupId) throws RemoteException { 2000 try { 2001 JournalArticleServiceUtil.unsubscribe(groupId); 2002 } 2003 catch (Exception e) { 2004 _log.error(e, e); 2005 2006 throw new RemoteException(e.getMessage()); 2007 } 2008 } 2009 2010 /** 2011 * Updates the web content article matching the version, replacing its 2012 * folder, title, description, content, and layout UUID. 2013 * 2014 * @param userId the primary key of the user updating the web content 2015 article 2016 * @param groupId the primary key of the web content article's group 2017 * @param folderId the primary key of the web content article folder 2018 * @param articleId the primary key of the web content article 2019 * @param version the web content article's version 2020 * @param titleMap the web content article's locales and localized titles 2021 * @param descriptionMap the web content article's locales and localized 2022 descriptions 2023 * @param content the HTML content wrapped in XML. For more information, 2024 see the content example in the class description for {@link 2025 JournalArticleLocalServiceImpl}. 2026 * @param layoutUuid the unique string identifying the web content 2027 article's display page 2028 * @param serviceContext the service context to be applied. Can set the 2029 modification date, expando bridge attributes, asset category IDs, 2030 asset tag names, asset link entry IDs, workflow actions, the 2031 "defaultLanguageId" and "urlTitle" attributes, and can set 2032 whether to add the default command update for the web content 2033 article. With respect to social activities, by setting the 2034 service context's command to {@link 2035 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2036 is considered a web content update activity; otherwise it is 2037 considered a web content add activity. 2038 * @return the updated web content article 2039 * @throws PortalException if a user with the primary key or a matching web 2040 content article could not be found, or if a portal exception 2041 occurred 2042 * @throws SystemException if a system exception occurred 2043 */ 2044 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 2045 long userId, long groupId, long folderId, java.lang.String articleId, 2046 double version, java.lang.String[] titleMapLanguageIds, 2047 java.lang.String[] titleMapValues, 2048 java.lang.String[] descriptionMapLanguageIds, 2049 java.lang.String[] descriptionMapValues, java.lang.String content, 2050 java.lang.String layoutUuid, 2051 com.liferay.portal.service.ServiceContext serviceContext) 2052 throws RemoteException { 2053 try { 2054 Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(titleMapLanguageIds, 2055 titleMapValues); 2056 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 2057 descriptionMapValues); 2058 2059 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(userId, 2060 groupId, folderId, articleId, version, titleMap, 2061 descriptionMap, content, layoutUuid, serviceContext); 2062 2063 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2064 } 2065 catch (Exception e) { 2066 _log.error(e, e); 2067 2068 throw new RemoteException(e.getMessage()); 2069 } 2070 } 2071 2072 /** 2073 * Updates the web content article matching the version, replacing its 2074 * folder and content. 2075 * 2076 * @param groupId the primary key of the web content article's group 2077 * @param folderId the primary key of the web content article folder 2078 * @param articleId the primary key of the web content article 2079 * @param version the web content article's version 2080 * @param content the HTML content wrapped in XML. For more information, 2081 see the content example in the class description for {@link 2082 JournalArticleLocalServiceImpl}. 2083 * @param serviceContext the service context to be applied. Can set the 2084 modification date, expando bridge attributes, asset category IDs, 2085 asset tag names, asset link entry IDs, workflow actions, the 2086 "defaultLanguageId" and "urlTitle" attributes, and can set 2087 whether to add the default command update for the web content 2088 article. With respect to social activities, by setting the 2089 service context's command to {@link 2090 com.liferay.portal.kernel.util.Constants#UPDATE}, the invocation 2091 is considered a web content update activity; otherwise it is 2092 considered a web content add activity. 2093 * @return the updated web content article 2094 * @throws PortalException if the user did not have permission to update the 2095 web content article, if a user with the primary key or a matching 2096 web content article could not be found, or if a portal exception 2097 occurred 2098 * @throws SystemException if a system exception occurred 2099 */ 2100 public static com.liferay.portlet.journal.model.JournalArticleSoap updateArticle( 2101 long groupId, long folderId, java.lang.String articleId, 2102 double version, java.lang.String content, 2103 com.liferay.portal.service.ServiceContext serviceContext) 2104 throws RemoteException { 2105 try { 2106 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateArticle(groupId, 2107 folderId, articleId, version, content, serviceContext); 2108 2109 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2110 } 2111 catch (Exception e) { 2112 _log.error(e, e); 2113 2114 throw new RemoteException(e.getMessage()); 2115 } 2116 } 2117 2118 /** 2119 * Updates the web content article matching the group, article ID, and 2120 * version, replacing its content. 2121 * 2122 * @param groupId the primary key of the web content article's group 2123 * @param articleId the primary key of the web content article 2124 * @param version the web content article's version 2125 * @param content the HTML content wrapped in XML. For more information, 2126 see the content example in the class description for {@link 2127 JournalArticleLocalServiceImpl}. 2128 * @return the updated web content article 2129 * @throws PortalException if the user did not have permission to update the 2130 web content article or if a matching web content article could 2131 not be found 2132 * @throws SystemException if a system exception occurred 2133 */ 2134 public static com.liferay.portlet.journal.model.JournalArticleSoap updateContent( 2135 long groupId, java.lang.String articleId, double version, 2136 java.lang.String content) throws RemoteException { 2137 try { 2138 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateContent(groupId, 2139 articleId, version, content); 2140 2141 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2142 } 2143 catch (Exception e) { 2144 _log.error(e, e); 2145 2146 throw new RemoteException(e.getMessage()); 2147 } 2148 } 2149 2150 /** 2151 * Updates the workflow status of the web content article matching the 2152 * group, article ID, and version. 2153 * 2154 * @param groupId the primary key of the web content article's group 2155 * @param articleId the primary key of the web content article 2156 * @param version the web content article's version 2157 * @param status the web content article's workflow status. For more 2158 information see {@link WorkflowConstants} for constants starting 2159 with the "STATUS_" prefix. 2160 * @param articleURL the web content article's accessible URL 2161 * @param serviceContext the service context to be applied. Can set the 2162 modification date, portlet preferences, and can set whether to 2163 add the default command update for the web content article. 2164 * @return the updated web content article 2165 * @throws PortalException if the user did not have permission to update the 2166 web content article, if a matching web content article could not 2167 be found, or if a portal exception occurred 2168 * @throws SystemException if a system exception occurred 2169 */ 2170 public static com.liferay.portlet.journal.model.JournalArticleSoap updateStatus( 2171 long groupId, java.lang.String articleId, double version, int status, 2172 java.lang.String articleURL, 2173 com.liferay.portal.service.ServiceContext serviceContext) 2174 throws RemoteException { 2175 try { 2176 com.liferay.portlet.journal.model.JournalArticle returnValue = JournalArticleServiceUtil.updateStatus(groupId, 2177 articleId, version, status, articleURL, serviceContext); 2178 2179 return com.liferay.portlet.journal.model.JournalArticleSoap.toSoapModel(returnValue); 2180 } 2181 catch (Exception e) { 2182 _log.error(e, e); 2183 2184 throw new RemoteException(e.getMessage()); 2185 } 2186 } 2187 2188 private static Log _log = LogFactoryUtil.getLog(JournalArticleServiceSoap.class); 2189 }