001 /** 002 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.dynamicdatamapping.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.LocalizationUtil; 022 023 import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil; 024 025 import java.rmi.RemoteException; 026 027 import java.util.Locale; 028 import java.util.Map; 029 030 /** 031 * Provides the SOAP utility for the 032 * {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil} service utility. The 033 * static methods of this class calls the same methods of the service utility. 034 * However, the signatures are different because it is difficult for SOAP to 035 * support certain types. 036 * 037 * <p> 038 * ServiceBuilder follows certain rules in translating the methods. For example, 039 * if the method in the service utility returns a {@link java.util.List}, that 040 * is translated to an array of {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap}. 041 * If the method in the service utility returns a 042 * {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplate}, that is translated to a 043 * {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap}. Methods that SOAP cannot 044 * safely wire are skipped. 045 * </p> 046 * 047 * <p> 048 * The benefits of using the SOAP utility is that it is cross platform 049 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 050 * even Perl, to call the generated services. One drawback of SOAP is that it is 051 * slow because it needs to serialize all calls into a text format (XML). 052 * </p> 053 * 054 * <p> 055 * You can see a list of services at http://localhost:8080/api/axis. Set the 056 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 057 * security. 058 * </p> 059 * 060 * <p> 061 * The SOAP utility is only generated for remote services. 062 * </p> 063 * 064 * @author Brian Wing Shun Chan 065 * @see DDMTemplateServiceHttp 066 * @see com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap 067 * @see com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil 068 * @generated 069 */ 070 @ProviderType 071 public class DDMTemplateServiceSoap { 072 /** 073 * Adds a template. 074 * 075 * @param groupId the primary key of the group 076 * @param classNameId the primary key of the class name for template's 077 related model 078 * @param classPK the primary key of the template's related entity 079 * @param nameMap the template's locales and localized names 080 * @param descriptionMap the template's locales and localized descriptions 081 * @param type the template's type. For more information, see {@link 082 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 083 * @param mode the template's mode. For more information, see {@link 084 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 085 * @param language the template's script language. For more information, 086 see {@link 087 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 088 * @param script the template's script 089 * @param serviceContext the service context to be applied. Must have the 090 <code>ddmResource</code> attribute to check permissions. Can set 091 the UUID, creation date, modification date, guest permissions, 092 and group permissions for the template. 093 * @return the template 094 * @throws PortalException if the user did not have permission to add the 095 template or if a portal exception occurred 096 * @throws SystemException if a system exception occurred 097 */ 098 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap addTemplate( 099 long groupId, long classNameId, long classPK, 100 java.lang.String[] nameMapLanguageIds, 101 java.lang.String[] nameMapValues, 102 java.lang.String[] descriptionMapLanguageIds, 103 java.lang.String[] descriptionMapValues, java.lang.String type, 104 java.lang.String mode, java.lang.String language, 105 java.lang.String script, 106 com.liferay.portal.service.ServiceContext serviceContext) 107 throws RemoteException { 108 try { 109 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, 110 nameMapValues); 111 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 112 descriptionMapValues); 113 114 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 115 DDMTemplateServiceUtil.addTemplate(groupId, classNameId, 116 classPK, nameMap, descriptionMap, type, mode, language, 117 script, serviceContext); 118 119 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 120 } 121 catch (Exception e) { 122 _log.error(e, e); 123 124 throw new RemoteException(e.getMessage()); 125 } 126 } 127 128 /** 129 * Copies the template, creating a new template with all the values 130 * extracted from the original one. This method supports defining a new name 131 * and description. 132 * 133 * @param templateId the primary key of the template to be copied 134 * @param nameMap the new template's locales and localized names 135 * @param descriptionMap the new template's locales and localized 136 descriptions 137 * @param serviceContext the service context to be applied. Must have the 138 <code>ddmResource</code> attribute to check permissions. Can set 139 the UUID, creation date, modification date, guest permissions, 140 and group permissions for the template. 141 * @return the new template 142 * @throws PortalException if the user did not have permission to add the 143 template or if a portal exception occurred 144 * @throws SystemException if a system exception occurred 145 */ 146 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( 147 long templateId, java.lang.String[] nameMapLanguageIds, 148 java.lang.String[] nameMapValues, 149 java.lang.String[] descriptionMapLanguageIds, 150 java.lang.String[] descriptionMapValues, 151 com.liferay.portal.service.ServiceContext serviceContext) 152 throws RemoteException { 153 try { 154 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, 155 nameMapValues); 156 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 157 descriptionMapValues); 158 159 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 160 DDMTemplateServiceUtil.copyTemplate(templateId, nameMap, 161 descriptionMap, serviceContext); 162 163 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 164 } 165 catch (Exception e) { 166 _log.error(e, e); 167 168 throw new RemoteException(e.getMessage()); 169 } 170 } 171 172 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( 173 long templateId, 174 com.liferay.portal.service.ServiceContext serviceContext) 175 throws RemoteException { 176 try { 177 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 178 DDMTemplateServiceUtil.copyTemplate(templateId, serviceContext); 179 180 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 181 } 182 catch (Exception e) { 183 _log.error(e, e); 184 185 throw new RemoteException(e.getMessage()); 186 } 187 } 188 189 /** 190 * Copies all the templates matching the class name ID, class PK, and type. 191 * This method creates new templates, extracting all the values from the old 192 * ones and updating their class PKs. 193 * 194 * @param classNameId the primary key of the class name for template's 195 related model 196 * @param classPK the primary key of the original template's related entity 197 * @param newClassPK the primary key of the new template's related entity 198 * @param type the template's type. For more information, see {@link 199 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 200 * @param serviceContext the service context to be applied. Must have the 201 <code>ddmResource</code> attribute to check permissions. Can set 202 the UUID, creation date, modification date, guest permissions, 203 and group permissions for the template. 204 * @return the new template 205 * @throws PortalException if the user did not have permission to add the 206 template or if a portal exception occurred 207 * @throws SystemException if a system exception occurred 208 */ 209 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] copyTemplates( 210 long classNameId, long classPK, long newClassPK, java.lang.String type, 211 com.liferay.portal.service.ServiceContext serviceContext) 212 throws RemoteException { 213 try { 214 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 215 DDMTemplateServiceUtil.copyTemplates(classNameId, classPK, 216 newClassPK, type, serviceContext); 217 218 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 219 } 220 catch (Exception e) { 221 _log.error(e, e); 222 223 throw new RemoteException(e.getMessage()); 224 } 225 } 226 227 /** 228 * Deletes the template and its resources. 229 * 230 * @param templateId the primary key of the template to be deleted 231 * @throws PortalException if the user did not have permission to delete the 232 template or if a portal exception occurred 233 * @throws SystemException if a system exception occurred 234 */ 235 public static void deleteTemplate(long templateId) 236 throws RemoteException { 237 try { 238 DDMTemplateServiceUtil.deleteTemplate(templateId); 239 } 240 catch (Exception e) { 241 _log.error(e, e); 242 243 throw new RemoteException(e.getMessage()); 244 } 245 } 246 247 /** 248 * Returns the template matching the group and template key. 249 * 250 * @param groupId the primary key of the group 251 * @param classNameId the primary key of the class name for template's 252 related model 253 * @param templateKey the unique string identifying the template 254 * @return the matching template, or <code>null</code> if a matching 255 template could not be found 256 * @throws PortalException if the user did not have permission to view the 257 template 258 * @throws SystemException if a system exception occurred 259 */ 260 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap fetchTemplate( 261 long groupId, long classNameId, java.lang.String templateKey) 262 throws RemoteException { 263 try { 264 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 265 DDMTemplateServiceUtil.fetchTemplate(groupId, classNameId, 266 templateKey); 267 268 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 269 } 270 catch (Exception e) { 271 _log.error(e, e); 272 273 throw new RemoteException(e.getMessage()); 274 } 275 } 276 277 /** 278 * Returns the template with the ID. 279 * 280 * @param templateId the primary key of the template 281 * @return the template with the ID 282 * @throws PortalException if the user did not have permission to view the 283 template or if a matching template could not be found 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 287 long templateId) throws RemoteException { 288 try { 289 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 290 DDMTemplateServiceUtil.getTemplate(templateId); 291 292 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 293 } 294 catch (Exception e) { 295 _log.error(e, e); 296 297 throw new RemoteException(e.getMessage()); 298 } 299 } 300 301 /** 302 * Returns the template matching the group and template key. 303 * 304 * @param groupId the primary key of the group 305 * @param classNameId the primary key of the class name for template's 306 related model 307 * @param templateKey the unique string identifying the template 308 * @return the matching template 309 * @throws PortalException if a matching template could not be found 310 * @throws SystemException if a system exception occurred 311 */ 312 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 313 long groupId, long classNameId, java.lang.String templateKey) 314 throws RemoteException { 315 try { 316 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 317 DDMTemplateServiceUtil.getTemplate(groupId, classNameId, 318 templateKey); 319 320 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 321 } 322 catch (Exception e) { 323 _log.error(e, e); 324 325 throw new RemoteException(e.getMessage()); 326 } 327 } 328 329 /** 330 * Returns the template matching the group and template key, optionally in 331 * the global scope. 332 * 333 * <p> 334 * This method first searches in the group. If the template is still not 335 * found and <code>includeGlobalTemplates</code> is set to 336 * <code>true</code>, this method searches the global group. 337 * </p> 338 * 339 * @param groupId the primary key of the group 340 * @param classNameId the primary key of the class name for template's 341 related model 342 * @param templateKey the unique string identifying the template 343 * @param includeGlobalTemplates whether to include the global scope in the 344 search 345 * @return the matching template 346 * @throws PortalException if a matching template could not be found 347 * @throws SystemException if a system exception occurred 348 */ 349 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 350 long groupId, long classNameId, java.lang.String templateKey, 351 boolean includeGlobalTemplates) throws RemoteException { 352 try { 353 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 354 DDMTemplateServiceUtil.getTemplate(groupId, classNameId, 355 templateKey, includeGlobalTemplates); 356 357 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 358 } 359 catch (Exception e) { 360 _log.error(e, e); 361 362 throw new RemoteException(e.getMessage()); 363 } 364 } 365 366 /** 367 * Returns all the templates matching the group and class name ID. 368 * 369 * @param groupId the primary key of the group 370 * @param classNameId the primary key of the class name for template's 371 related model 372 * @return the matching templates 373 * @throws SystemException if a system exception occurred 374 */ 375 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 376 long groupId, long classNameId) throws RemoteException { 377 try { 378 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 379 DDMTemplateServiceUtil.getTemplates(groupId, classNameId); 380 381 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 382 } 383 catch (Exception e) { 384 _log.error(e, e); 385 386 throw new RemoteException(e.getMessage()); 387 } 388 } 389 390 /** 391 * Returns all the templates matching the group, class name ID, and class 392 * PK. 393 * 394 * @param groupId the primary key of the group 395 * @param classNameId the primary key of the class name for template's 396 related model 397 * @param classPK the primary key of the template's related entity 398 * @return the matching templates 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 402 long groupId, long classNameId, long classPK) throws RemoteException { 403 try { 404 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 405 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 406 classPK); 407 408 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 409 } 410 catch (Exception e) { 411 _log.error(e, e); 412 413 throw new RemoteException(e.getMessage()); 414 } 415 } 416 417 /** 418 * Returns all the templates matching the class name ID, class PK, type, and 419 * mode. 420 * 421 * @param groupId the primary key of the group 422 * @param classNameId the primary key of the class name for template's 423 related model 424 * @param classPK the primary key of the template's related entity 425 * @param type the template's type. For more information, see {@link 426 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 427 * @return the matching templates 428 * @throws SystemException if a system exception occurred 429 */ 430 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 431 long groupId, long classNameId, long classPK, java.lang.String type) 432 throws RemoteException { 433 try { 434 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 435 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 436 classPK, type); 437 438 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 439 } 440 catch (Exception e) { 441 _log.error(e, e); 442 443 throw new RemoteException(e.getMessage()); 444 } 445 } 446 447 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 448 long groupId, long classNameId, long classPK, java.lang.String type, 449 java.lang.String mode) throws RemoteException { 450 try { 451 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 452 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 453 classPK, type, mode); 454 455 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 456 } 457 catch (Exception e) { 458 _log.error(e, e); 459 460 throw new RemoteException(e.getMessage()); 461 } 462 } 463 464 /** 465 * Returns all the templates matching the group and class PK. 466 * 467 * @param groupId the primary key of the group 468 * @param classPK the primary key of the template's related entity 469 * @return the matching templates 470 * @throws SystemException if a system exception occurred 471 */ 472 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByClassPK( 473 long groupId, long classPK) throws RemoteException { 474 try { 475 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 476 DDMTemplateServiceUtil.getTemplatesByClassPK(groupId, classPK); 477 478 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 479 } 480 catch (Exception e) { 481 _log.error(e, e); 482 483 throw new RemoteException(e.getMessage()); 484 } 485 } 486 487 /** 488 * Returns an ordered range of all the templates matching the group and 489 * structure class name ID and all the generic templates matching the group. 490 * 491 * <p> 492 * Useful when paginating results. Returns a maximum of <code>end - 493 * start</code> instances. <code>start</code> and <code>end</code> are not 494 * primary keys, they are indexes in the result set. Thus, <code>0</code> 495 * refers to the first result in the set. Setting both <code>start</code> 496 * and <code>end</code> to {@link 497 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 498 * result set. 499 * </p> 500 * 501 * @param groupId the primary key of the group 502 * @param structureClassNameId the primary key of the class name for the 503 template's related structure (optionally <code>0</code>). Specify 504 <code>0</code> to return generic templates only. 505 * @param start the lower bound of the range of templates to return 506 * @param end the upper bound of the range of templates to return (not 507 inclusive) 508 * @param orderByComparator the comparator to order the templates 509 (optionally <code>null</code>) 510 * @return the range of matching templates ordered by the comparator 511 * @throws SystemException if a system exception occurred 512 */ 513 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByStructureClassNameId( 514 long groupId, long structureClassNameId, int start, int end, 515 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 516 throws RemoteException { 517 try { 518 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 519 DDMTemplateServiceUtil.getTemplatesByStructureClassNameId(groupId, 520 structureClassNameId, start, end, orderByComparator); 521 522 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 523 } 524 catch (Exception e) { 525 _log.error(e, e); 526 527 throw new RemoteException(e.getMessage()); 528 } 529 } 530 531 /** 532 * Returns the number of templates matching the group and structure class 533 * name ID plus the number of generic templates matching the group. 534 * 535 * @param groupId the primary key of the group 536 * @param structureClassNameId the primary key of the class name for the 537 template's related structure (optionally <code>0</code>). Specify 538 <code>0</code> to count generic templates only. 539 * @return the number of matching templates plus the number of matching 540 generic templates 541 * @throws SystemException if a system exception occurred 542 */ 543 public static int getTemplatesByStructureClassNameIdCount(long groupId, 544 long structureClassNameId) throws RemoteException { 545 try { 546 int returnValue = DDMTemplateServiceUtil.getTemplatesByStructureClassNameIdCount(groupId, 547 structureClassNameId); 548 549 return returnValue; 550 } 551 catch (Exception e) { 552 _log.error(e, e); 553 554 throw new RemoteException(e.getMessage()); 555 } 556 } 557 558 /** 559 * Returns an ordered range of all the templates matching the group, class 560 * name ID, class PK, type, and mode, and matching the keywords in the 561 * template names and descriptions. 562 * 563 * <p> 564 * Useful when paginating results. Returns a maximum of <code>end - 565 * start</code> instances. <code>start</code> and <code>end</code> are not 566 * primary keys, they are indexes in the result set. Thus, <code>0</code> 567 * refers to the first result in the set. Setting both <code>start</code> 568 * and <code>end</code> to {@link 569 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 570 * result set. 571 * </p> 572 * 573 * @param companyId the primary key of the template's company 574 * @param groupId the primary key of the group 575 * @param classNameId the primary key of the class name for template's 576 related model 577 * @param classPK the primary key of the template's related entity 578 * @param keywords the keywords (space separated), which may occur in the 579 template's name or description (optionally <code>null</code>) 580 * @param type the template's type (optionally <code>null</code>). For more 581 information, see {@link 582 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 583 * @param mode the template's mode (optionally <code>null</code>) For more 584 information, see {@link 585 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 586 * @param start the lower bound of the range of templates to return 587 * @param end the upper bound of the range of templates to return (not 588 inclusive) 589 * @param orderByComparator the comparator to order the templates 590 (optionally <code>null</code>) 591 * @return the matching templates ordered by the comparator 592 * @throws SystemException if a system exception occurred 593 */ 594 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 595 long companyId, long groupId, long classNameId, long classPK, 596 java.lang.String keywords, java.lang.String type, 597 java.lang.String mode, int start, int end, 598 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 599 throws RemoteException { 600 try { 601 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 602 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 603 classPK, keywords, type, mode, start, end, orderByComparator); 604 605 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 606 } 607 catch (Exception e) { 608 _log.error(e, e); 609 610 throw new RemoteException(e.getMessage()); 611 } 612 } 613 614 /** 615 * Returns an ordered range of all the templates matching the group, class 616 * name ID, class PK, name keyword, description keyword, type, mode, and 617 * language. 618 * 619 * <p> 620 * Useful when paginating results. Returns a maximum of <code>end - 621 * start</code> instances. <code>start</code> and <code>end</code> are not 622 * primary keys, they are indexes in the result set. Thus, <code>0</code> 623 * refers to the first result in the set. Setting both <code>start</code> 624 * and <code>end</code> to {@link 625 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 626 * result set. 627 * </p> 628 * 629 * @param companyId the primary key of the template's company 630 * @param groupId the primary key of the group 631 * @param classNameId the primary key of the class name for template's 632 related model 633 * @param classPK the primary key of the template's related entity 634 * @param name the name keywords (optionally <code>null</code>) 635 * @param description the description keywords (optionally 636 <code>null</code>) 637 * @param type the template's type (optionally <code>null</code>). For more 638 information, see {@link 639 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 640 * @param mode the template's mode (optionally <code>null</code>). For more 641 information, see {@link 642 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 643 * @param language the template's script language (optionally 644 <code>null</code>). For more information, see {@link 645 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 646 * @param andOperator whether every field must match its keywords, or just 647 one field. 648 * @param start the lower bound of the range of templates to return 649 * @param end the upper bound of the range of templates to return (not 650 inclusive) 651 * @param orderByComparator the comparator to order the templates 652 (optionally <code>null</code>) 653 * @return the matching templates ordered by the comparator 654 * @throws SystemException if a system exception occurred 655 */ 656 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 657 long companyId, long groupId, long classNameId, long classPK, 658 java.lang.String name, java.lang.String description, 659 java.lang.String type, java.lang.String mode, 660 java.lang.String language, boolean andOperator, int start, int end, 661 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 662 throws RemoteException { 663 try { 664 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 665 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 666 classPK, name, description, type, mode, language, 667 andOperator, start, end, orderByComparator); 668 669 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 670 } 671 catch (Exception e) { 672 _log.error(e, e); 673 674 throw new RemoteException(e.getMessage()); 675 } 676 } 677 678 /** 679 * Returns an ordered range of all the templates matching the group IDs, 680 * class name IDs, class PK, type, and mode, and matching the keywords in 681 * the template names and descriptions. 682 * 683 * <p> 684 * Useful when paginating results. Returns a maximum of <code>end - 685 * start</code> instances. <code>start</code> and <code>end</code> are not 686 * primary keys, they are indexes in the result set. Thus, <code>0</code> 687 * refers to the first result in the set. Setting both <code>start</code> 688 * and <code>end</code> to {@link 689 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 690 * result set. 691 * </p> 692 * 693 * @param companyId the primary key of the template's company 694 * @param groupIds the primary keys of the groups 695 * @param classNameIds the primary keys of the entity's instances the 696 templates are related to 697 * @param classPKs the primary keys of the template's related entities 698 * @param keywords the keywords (space separated), which may occur in the 699 template's name or description (optionally <code>null</code>) 700 * @param type the template's type (optionally <code>null</code>). For more 701 information, see {@link 702 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 703 * @param mode the template's mode (optionally <code>null</code>). For more 704 information, see {@link 705 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 706 * @param start the lower bound of the range of templates to return 707 * @param end the upper bound of the range of templates to return (not 708 inclusive) 709 * @param orderByComparator the comparator to order the templates 710 (optionally <code>null</code>) 711 * @return the matching templates ordered by the comparator 712 * @throws SystemException if a system exception occurred 713 */ 714 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 715 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 716 java.lang.String keywords, java.lang.String type, 717 java.lang.String mode, int start, int end, 718 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 719 throws RemoteException { 720 try { 721 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 722 DDMTemplateServiceUtil.search(companyId, groupIds, 723 classNameIds, classPKs, keywords, type, mode, start, end, 724 orderByComparator); 725 726 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 727 } 728 catch (Exception e) { 729 _log.error(e, e); 730 731 throw new RemoteException(e.getMessage()); 732 } 733 } 734 735 /** 736 * Returns an ordered range of all the templates matching the group IDs, 737 * class name IDs, class PK, name keyword, description keyword, type, mode, 738 * and language. 739 * 740 * <p> 741 * Useful when paginating results. Returns a maximum of <code>end - 742 * start</code> instances. <code>start</code> and <code>end</code> are not 743 * primary keys, they are indexes in the result set. Thus, <code>0</code> 744 * refers to the first result in the set. Setting both <code>start</code> 745 * and <code>end</code> to {@link 746 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 747 * result set. 748 * </p> 749 * 750 * @param companyId the primary key of the template's company 751 * @param groupIds the primary keys of the groups 752 * @param classNameIds the primary keys of the entity's instances the 753 templates are related to 754 * @param classPKs the primary keys of the template's related entities 755 * @param name the name keywords (optionally <code>null</code>) 756 * @param description the description keywords (optionally 757 <code>null</code>) 758 * @param type the template's type (optionally <code>null</code>). For more 759 information, see {@link 760 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 761 * @param mode the template's mode (optionally <code>null</code>). For more 762 information, see {@link 763 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 764 * @param language the template's script language (optionally 765 <code>null</code>). For more information, see {@link 766 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 767 * @param andOperator whether every field must match its keywords, or just 768 one field. 769 * @param start the lower bound of the range of templates to return 770 * @param end the upper bound of the range of templates to return (not 771 inclusive) 772 * @param orderByComparator the comparator to order the templates 773 (optionally <code>null</code>) 774 * @return the matching templates ordered by the comparator 775 * @throws SystemException if a system exception occurred 776 */ 777 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 778 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 779 java.lang.String name, java.lang.String description, 780 java.lang.String type, java.lang.String mode, 781 java.lang.String language, boolean andOperator, int start, int end, 782 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 783 throws RemoteException { 784 try { 785 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 786 DDMTemplateServiceUtil.search(companyId, groupIds, 787 classNameIds, classPKs, name, description, type, mode, 788 language, andOperator, start, end, orderByComparator); 789 790 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 791 } 792 catch (Exception e) { 793 _log.error(e, e); 794 795 throw new RemoteException(e.getMessage()); 796 } 797 } 798 799 /** 800 * Returns the number of templates matching the group, class name ID, class 801 * PK, type, and mode, and matching the keywords in the template names and 802 * descriptions. 803 * 804 * @param companyId the primary key of the template's company 805 * @param groupId the primary key of the group 806 * @param classNameId the primary key of the class name for template's 807 related model 808 * @param classPK the primary key of the template's related entity 809 * @param keywords the keywords (space separated), which may occur in the 810 template's name or description (optionally <code>null</code>) 811 * @param type the template's type (optionally <code>null</code>). For more 812 information, see {@link 813 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 814 * @param mode the template's mode (optionally <code>null</code>). For more 815 information, see {@link 816 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 817 * @return the number of matching templates 818 * @throws SystemException if a system exception occurred 819 */ 820 public static int searchCount(long companyId, long groupId, 821 long classNameId, long classPK, java.lang.String keywords, 822 java.lang.String type, java.lang.String mode) throws RemoteException { 823 try { 824 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 825 groupId, classNameId, classPK, keywords, type, mode); 826 827 return returnValue; 828 } 829 catch (Exception e) { 830 _log.error(e, e); 831 832 throw new RemoteException(e.getMessage()); 833 } 834 } 835 836 /** 837 * Returns the number of templates matching the group, class name ID, class 838 * PK, name keyword, description keyword, type, mode, and language. 839 * 840 * @param companyId the primary key of the template's company 841 * @param groupId the primary key of the group 842 * @param classNameId the primary key of the class name for template's 843 related model 844 * @param classPK the primary key of the template's related entity 845 * @param name the name keywords (optionally <code>null</code>) 846 * @param description the description keywords (optionally 847 <code>null</code>) 848 * @param type the template's type (optionally <code>null</code>). For more 849 information, see {@link 850 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 851 * @param mode the template's mode (optionally <code>null</code>). For more 852 information, see {@link 853 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 854 * @param language the template's script language (optionally 855 <code>null</code>). For more information, see {@link 856 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 857 * @param andOperator whether every field must match its keywords, or just 858 one field. 859 * @return the number of matching templates 860 * @throws SystemException if a system exception occurred 861 */ 862 public static int searchCount(long companyId, long groupId, 863 long classNameId, long classPK, java.lang.String name, 864 java.lang.String description, java.lang.String type, 865 java.lang.String mode, java.lang.String language, boolean andOperator) 866 throws RemoteException { 867 try { 868 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 869 groupId, classNameId, classPK, name, description, type, 870 mode, language, andOperator); 871 872 return returnValue; 873 } 874 catch (Exception e) { 875 _log.error(e, e); 876 877 throw new RemoteException(e.getMessage()); 878 } 879 } 880 881 /** 882 * Returns the number of templates matching the group IDs, class name IDs, 883 * class PK, type, and mode, and matching the keywords in the template names 884 * and descriptions. 885 * 886 * @param companyId the primary key of the template's company 887 * @param groupIds the primary keys of the groups 888 * @param classNameIds the primary keys of the entity's instances the 889 templates are related to 890 * @param classPKs the primary keys of the template's related entities 891 * @param keywords the keywords (space separated), which may occur in the 892 template's name or description (optionally <code>null</code>) 893 * @param type the template's type (optionally <code>null</code>). For more 894 information, see {@link 895 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 896 * @param mode the template's mode (optionally <code>null</code>). For more 897 information, see {@link 898 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 899 * @return the number of matching templates 900 * @throws SystemException if a system exception occurred 901 */ 902 public static int searchCount(long companyId, long[] groupIds, 903 long[] classNameIds, long[] classPKs, java.lang.String keywords, 904 java.lang.String type, java.lang.String mode) throws RemoteException { 905 try { 906 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 907 groupIds, classNameIds, classPKs, keywords, type, mode); 908 909 return returnValue; 910 } 911 catch (Exception e) { 912 _log.error(e, e); 913 914 throw new RemoteException(e.getMessage()); 915 } 916 } 917 918 /** 919 * Returns the number of templates matching the group IDs, class name IDs, 920 * class PK, name keyword, description keyword, type, mode, and language. 921 * 922 * @param companyId the primary key of the template's company 923 * @param groupIds the primary keys of the groups 924 * @param classNameIds the primary keys of the entity's instances the 925 templates are related to 926 * @param classPKs the primary keys of the template's related entities 927 * @param name the name keywords (optionally <code>null</code>) 928 * @param description the description keywords (optionally 929 <code>null</code>) 930 * @param type the template's type (optionally <code>null</code>). For more 931 information, see {@link 932 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 933 * @param mode the template's mode (optionally <code>null</code>). For more 934 information, see {@link 935 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 936 * @param language the template's script language (optionally 937 <code>null</code>). For more information, see {@link 938 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 939 * @param andOperator whether every field must match its keywords, or just 940 one field. 941 * @return the number of matching templates 942 * @throws SystemException if a system exception occurred 943 */ 944 public static int searchCount(long companyId, long[] groupIds, 945 long[] classNameIds, long[] classPKs, java.lang.String name, 946 java.lang.String description, java.lang.String type, 947 java.lang.String mode, java.lang.String language, boolean andOperator) 948 throws RemoteException { 949 try { 950 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 951 groupIds, classNameIds, classPKs, name, description, type, 952 mode, language, andOperator); 953 954 return returnValue; 955 } 956 catch (Exception e) { 957 _log.error(e, e); 958 959 throw new RemoteException(e.getMessage()); 960 } 961 } 962 963 private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceSoap.class); 964 }