001 /** 002 * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.log.Log; 018 import com.liferay.portal.kernel.log.LogFactoryUtil; 019 import com.liferay.portal.kernel.util.LocalizationUtil; 020 021 import com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil; 022 023 import java.rmi.RemoteException; 024 025 import java.util.Locale; 026 import java.util.Map; 027 028 /** 029 * <p> 030 * This class provides a SOAP utility for the 031 * {@link com.liferay.portlet.dynamicdatamapping.service.DDMTemplateServiceUtil} service utility. The 032 * static methods of this class calls the same methods of the service utility. 033 * However, the signatures are different because it is difficult for SOAP to 034 * support certain types. 035 * </p> 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 public class DDMTemplateServiceSoap { 071 /** 072 * Adds a template. 073 * 074 * @param groupId the primary key of the group 075 * @param classNameId the primary key of the class name for template's 076 related model 077 * @param classPK the primary key of the template's related entity 078 * @param nameMap the template's locales and localized names 079 * @param descriptionMap the template's locales and localized descriptions 080 * @param type the template's type. For more information, see {@link 081 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 082 * @param mode the template's mode. For more information, see {@link 083 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 084 * @param language the template's script language. For more information, 085 see {@link 086 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 087 * @param script the template's script 088 * @param serviceContext the template's service context. Must have the 089 <code>ddmResource</code> attribute to check permissions. Can set 090 the UUID, creation date, modification date, guest permissions, 091 and group permissions for the template. 092 * @return the template 093 * @throws PortalException if the user did not have permission to add the 094 template or if a portal exception occurred 095 * @throws SystemException if a system exception occurred 096 */ 097 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap addTemplate( 098 long groupId, long classNameId, long classPK, 099 java.lang.String[] nameMapLanguageIds, 100 java.lang.String[] nameMapValues, 101 java.lang.String[] descriptionMapLanguageIds, 102 java.lang.String[] descriptionMapValues, java.lang.String type, 103 java.lang.String mode, java.lang.String language, 104 java.lang.String script, 105 com.liferay.portal.service.ServiceContext serviceContext) 106 throws RemoteException { 107 try { 108 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, 109 nameMapValues); 110 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 111 descriptionMapValues); 112 113 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 114 DDMTemplateServiceUtil.addTemplate(groupId, classNameId, 115 classPK, nameMap, descriptionMap, type, mode, language, 116 script, serviceContext); 117 118 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 119 } 120 catch (Exception e) { 121 _log.error(e, e); 122 123 throw new RemoteException(e.getMessage()); 124 } 125 } 126 127 /** 128 * Copies the template, creating a new template with all the values 129 * extracted from the original one. This method supports defining a new name 130 * and description. 131 * 132 * @param templateId the primary key of the template to be copied 133 * @param nameMap the new template's locales and localized names 134 * @param descriptionMap the new template's locales and localized 135 descriptions 136 * @param serviceContext the service context to be applied. Must have the 137 <code>ddmResource</code> attribute to check permissions. Can set 138 the UUID, creation date, modification date, guest permissions, 139 and group permissions for the template. 140 * @return the new template 141 * @throws PortalException if the user did not have permission to add the 142 template or if a portal exception occurred 143 * @throws SystemException if a system exception occurred 144 */ 145 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( 146 long templateId, java.lang.String[] nameMapLanguageIds, 147 java.lang.String[] nameMapValues, 148 java.lang.String[] descriptionMapLanguageIds, 149 java.lang.String[] descriptionMapValues, 150 com.liferay.portal.service.ServiceContext serviceContext) 151 throws RemoteException { 152 try { 153 Map<Locale, String> nameMap = LocalizationUtil.getLocalizationMap(nameMapLanguageIds, 154 nameMapValues); 155 Map<Locale, String> descriptionMap = LocalizationUtil.getLocalizationMap(descriptionMapLanguageIds, 156 descriptionMapValues); 157 158 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 159 DDMTemplateServiceUtil.copyTemplate(templateId, nameMap, 160 descriptionMap, serviceContext); 161 162 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 163 } 164 catch (Exception e) { 165 _log.error(e, e); 166 167 throw new RemoteException(e.getMessage()); 168 } 169 } 170 171 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap copyTemplate( 172 long templateId, 173 com.liferay.portal.service.ServiceContext serviceContext) 174 throws RemoteException { 175 try { 176 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 177 DDMTemplateServiceUtil.copyTemplate(templateId, serviceContext); 178 179 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 180 } 181 catch (Exception e) { 182 _log.error(e, e); 183 184 throw new RemoteException(e.getMessage()); 185 } 186 } 187 188 /** 189 * Copies all the templates matching the class name ID, class PK, and type. 190 * This method creates new templates, extracting all the values from the old 191 * ones and updating their class PKs. 192 * 193 * @param classNameId the primary key of the class name for template's 194 related model 195 * @param classPK the primary key of the original template's related entity 196 * @param newClassPK the primary key of the new template's related entity 197 * @param type the template's type. For more information, see {@link 198 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 199 * @param serviceContext the service context to be applied. Must have the 200 <code>ddmResource</code> attribute to check permissions. Can set 201 the UUID, creation date, modification date, guest permissions, 202 and group permissions for the template. 203 * @return the new template 204 * @throws PortalException if the user did not have permission to add the 205 template or if a portal exception occurred 206 * @throws SystemException if a system exception occurred 207 */ 208 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] copyTemplates( 209 long classNameId, long classPK, long newClassPK, java.lang.String type, 210 com.liferay.portal.service.ServiceContext serviceContext) 211 throws RemoteException { 212 try { 213 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 214 DDMTemplateServiceUtil.copyTemplates(classNameId, classPK, 215 newClassPK, type, serviceContext); 216 217 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 218 } 219 catch (Exception e) { 220 _log.error(e, e); 221 222 throw new RemoteException(e.getMessage()); 223 } 224 } 225 226 /** 227 * Deletes the template and its resources. 228 * 229 * @param templateId the primary key of the template to be deleted 230 * @throws PortalException if the user did not have permission to delete the 231 template or if a portal exception occurred 232 * @throws SystemException if a system exception occurred 233 */ 234 public static void deleteTemplate(long templateId) 235 throws RemoteException { 236 try { 237 DDMTemplateServiceUtil.deleteTemplate(templateId); 238 } 239 catch (Exception e) { 240 _log.error(e, e); 241 242 throw new RemoteException(e.getMessage()); 243 } 244 } 245 246 /** 247 * Returns the template matching the group and template key. 248 * 249 * @param groupId the primary key of the group 250 * @param classNameId the primary key of the class name for template's 251 related model 252 * @param templateKey the unique string identifying the template 253 * @return the matching template, or <code>null</code> if a matching 254 template could not be found 255 * @throws PortalException if the user did not have permission to delete the 256 template 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap fetchTemplate( 260 long groupId, long classNameId, java.lang.String templateKey) 261 throws RemoteException { 262 try { 263 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 264 DDMTemplateServiceUtil.fetchTemplate(groupId, classNameId, 265 templateKey); 266 267 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 268 } 269 catch (Exception e) { 270 _log.error(e, e); 271 272 throw new RemoteException(e.getMessage()); 273 } 274 } 275 276 /** 277 * Returns the template with the ID. 278 * 279 * @param templateId the primary key of the template 280 * @return the template with the ID 281 * @throws PortalException if the user did not have permission to view the 282 template or if a matching template could not be found 283 * @throws SystemException if a system exception occurred 284 */ 285 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 286 long templateId) throws RemoteException { 287 try { 288 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 289 DDMTemplateServiceUtil.getTemplate(templateId); 290 291 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 292 } 293 catch (Exception e) { 294 _log.error(e, e); 295 296 throw new RemoteException(e.getMessage()); 297 } 298 } 299 300 /** 301 * Returns the template matching the group and template key. 302 * 303 * @param groupId the primary key of the group 304 * @param classNameId the primary key of the class name for template's 305 related model 306 * @param templateKey the unique string identifying the template 307 * @return the matching template 308 * @throws PortalException if a matching template could not be found 309 * @throws SystemException if a system exception occurred 310 */ 311 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 312 long groupId, long classNameId, java.lang.String templateKey) 313 throws RemoteException { 314 try { 315 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 316 DDMTemplateServiceUtil.getTemplate(groupId, classNameId, 317 templateKey); 318 319 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 320 } 321 catch (Exception e) { 322 _log.error(e, e); 323 324 throw new RemoteException(e.getMessage()); 325 } 326 } 327 328 /** 329 * Returns the template matching the group and template key, optionally in 330 * the global scope. 331 * 332 * <p> 333 * This method first searches in the group. If the template is still not 334 * found and <code>includeGlobalTemplates</code> is set to 335 * <code>true</code>, this method searches the global group. 336 * </p> 337 * 338 * @param groupId the primary key of the group 339 * @param classNameId the primary key of the class name for template's 340 related model 341 * @param templateKey the unique string identifying the template 342 * @param includeGlobalTemplates whether to include the global scope in the 343 search 344 * @return the matching template 345 * @throws PortalException if a matching template could not be found 346 * @throws SystemException if a system exception occurred 347 */ 348 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap getTemplate( 349 long groupId, long classNameId, java.lang.String templateKey, 350 boolean includeGlobalTemplates) throws RemoteException { 351 try { 352 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate returnValue = 353 DDMTemplateServiceUtil.getTemplate(groupId, classNameId, 354 templateKey, includeGlobalTemplates); 355 356 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModel(returnValue); 357 } 358 catch (Exception e) { 359 _log.error(e, e); 360 361 throw new RemoteException(e.getMessage()); 362 } 363 } 364 365 /** 366 * Returns all the templates matching the group and class name ID. 367 * 368 * @param groupId the primary key of the group 369 * @param classNameId the primary key of the class name for template's 370 related model 371 * @return the matching templates 372 * @throws SystemException if a system exception occurred 373 */ 374 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 375 long groupId, long classNameId) throws RemoteException { 376 try { 377 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 378 DDMTemplateServiceUtil.getTemplates(groupId, classNameId); 379 380 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 381 } 382 catch (Exception e) { 383 _log.error(e, e); 384 385 throw new RemoteException(e.getMessage()); 386 } 387 } 388 389 /** 390 * Returns all the templates matching the group, class name ID, and class 391 * PK. 392 * 393 * @param groupId the primary key of the group 394 * @param classNameId the primary key of the class name for template's 395 related model 396 * @param classPK the primary key of the template's related entity 397 * @return the matching templates 398 * @throws SystemException if a system exception occurred 399 */ 400 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 401 long groupId, long classNameId, long classPK) throws RemoteException { 402 try { 403 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 404 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 405 classPK); 406 407 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 408 } 409 catch (Exception e) { 410 _log.error(e, e); 411 412 throw new RemoteException(e.getMessage()); 413 } 414 } 415 416 /** 417 * Returns all the templates matching the class name ID, class PK, type, and 418 * mode. 419 * 420 * @param groupId the primary key of the group 421 * @param classNameId the primary key of the class name for template's 422 related model 423 * @param classPK the primary key of the template's related entity 424 * @param type the template's type. For more information, see {@link 425 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 426 * @return the matching templates 427 * @throws SystemException if a system exception occurred 428 */ 429 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 430 long groupId, long classNameId, long classPK, java.lang.String type) 431 throws RemoteException { 432 try { 433 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 434 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 435 classPK, type); 436 437 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 438 } 439 catch (Exception e) { 440 _log.error(e, e); 441 442 throw new RemoteException(e.getMessage()); 443 } 444 } 445 446 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplates( 447 long groupId, long classNameId, long classPK, java.lang.String type, 448 java.lang.String mode) throws RemoteException { 449 try { 450 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 451 DDMTemplateServiceUtil.getTemplates(groupId, classNameId, 452 classPK, type, mode); 453 454 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 455 } 456 catch (Exception e) { 457 _log.error(e, e); 458 459 throw new RemoteException(e.getMessage()); 460 } 461 } 462 463 /** 464 * Returns an ordered range of all the templates matching the group, class 465 * name ID, class PK, type, and mode, and matching the keywords in the 466 * template names and descriptions. 467 * 468 * <p> 469 * Useful when paginating results. Returns a maximum of <code>end - 470 * start</code> instances. <code>start</code> and <code>end</code> are not 471 * primary keys, they are indexes in the result set. Thus, <code>0</code> 472 * refers to the first result in the set. Setting both <code>start</code> 473 * and <code>end</code> to {@link 474 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 475 * result set. 476 * </p> 477 * 478 * @param companyId the primary key of the template's company 479 * @param groupId the primary key of the group 480 * @param classNameId the primary key of the class name for template's 481 related model 482 * @param classPK the primary key of the template's related entity 483 * @param keywords the keywords (space separated), which may occur in the 484 template's name or description (optionally <code>null</code>) 485 * @param type the template's type (optionally <code>null</code>). For more 486 information, see {@link 487 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 488 * @param mode the template's mode (optionally <code>null</code>) For more 489 information, see {@link 490 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 491 * @param start the lower bound of the range of templates to return 492 * @param end the upper bound of the range of templates to return (not 493 inclusive) 494 * @param orderByComparator the comparator to order the templates 495 (optionally <code>null</code>) 496 * @return the matching templates ordered by the comparator 497 * @throws SystemException if a system exception occurred 498 */ 499 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 500 long companyId, long groupId, long classNameId, long classPK, 501 java.lang.String keywords, java.lang.String type, 502 java.lang.String mode, int start, int end, 503 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 504 throws RemoteException { 505 try { 506 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 507 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 508 classPK, keywords, type, mode, start, end, orderByComparator); 509 510 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 511 } 512 catch (Exception e) { 513 _log.error(e, e); 514 515 throw new RemoteException(e.getMessage()); 516 } 517 } 518 519 /** 520 * Returns an ordered range of all the templates matching the group, class 521 * name ID, class PK, name keyword, description keyword, type, mode, and 522 * language. 523 * 524 * <p> 525 * Useful when paginating results. Returns a maximum of <code>end - 526 * start</code> instances. <code>start</code> and <code>end</code> are not 527 * primary keys, they are indexes in the result set. Thus, <code>0</code> 528 * refers to the first result in the set. Setting both <code>start</code> 529 * and <code>end</code> to {@link 530 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 531 * result set. 532 * </p> 533 * 534 * @param companyId the primary key of the template's company 535 * @param groupId the primary key of the group 536 * @param classNameId the primary key of the class name for template's 537 related model 538 * @param classPK the primary key of the template's related entity 539 * @param name the name keywords (optionally <code>null</code>) 540 * @param description the description keywords (optionally 541 <code>null</code>) 542 * @param type the template's type (optionally <code>null</code>). For more 543 information, see {@link 544 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 545 * @param mode the template's mode (optionally <code>null</code>). For more 546 information, see {@link 547 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 548 * @param language the template's script language (optionally 549 <code>null</code>). For more information, see {@link 550 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 551 * @param andOperator whether every field must match its keywords, or just 552 one field. 553 * @param start the lower bound of the range of templates to return 554 * @param end the upper bound of the range of templates to return (not 555 inclusive) 556 * @param orderByComparator the comparator to order the templates 557 (optionally <code>null</code>) 558 * @return the matching templates ordered by the comparator 559 * @throws SystemException if a system exception occurred 560 */ 561 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 562 long companyId, long groupId, long classNameId, long classPK, 563 java.lang.String name, java.lang.String description, 564 java.lang.String type, java.lang.String mode, 565 java.lang.String language, boolean andOperator, int start, int end, 566 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 567 throws RemoteException { 568 try { 569 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 570 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 571 classPK, name, description, type, mode, language, 572 andOperator, start, end, orderByComparator); 573 574 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 575 } 576 catch (Exception e) { 577 _log.error(e, e); 578 579 throw new RemoteException(e.getMessage()); 580 } 581 } 582 583 /** 584 * Returns an ordered range of all the templates matching the group IDs, 585 * class name IDs, class PK, type, and mode, and matching the keywords in 586 * the template names and descriptions. 587 * 588 * <p> 589 * Useful when paginating results. Returns a maximum of <code>end - 590 * start</code> instances. <code>start</code> and <code>end</code> are not 591 * primary keys, they are indexes in the result set. Thus, <code>0</code> 592 * refers to the first result in the set. Setting both <code>start</code> 593 * and <code>end</code> to {@link 594 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 595 * result set. 596 * </p> 597 * 598 * @param companyId the primary key of the template's company 599 * @param groupIds the primary keys of the groups 600 * @param classNameIds the primary keys of the entity's instances the 601 templates are related to 602 * @param classPK the primary key of the template's related entity 603 * @param keywords the keywords (space separated), which may occur in the 604 template's name or description (optionally <code>null</code>) 605 * @param type the template's type (optionally <code>null</code>). For more 606 information, see {@link 607 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 608 * @param mode the template's mode (optionally <code>null</code>). For more 609 information, see {@link 610 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 611 * @param start the lower bound of the range of templates to return 612 * @param end the upper bound of the range of templates to return (not 613 inclusive) 614 * @param orderByComparator the comparator to order the templates 615 (optionally <code>null</code>) 616 * @return the matching templates ordered by the comparator 617 * @throws SystemException if a system exception occurred 618 */ 619 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 620 long companyId, long[] groupIds, long[] classNameIds, long classPK, 621 java.lang.String keywords, java.lang.String type, 622 java.lang.String mode, int start, int end, 623 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 624 throws RemoteException { 625 try { 626 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 627 DDMTemplateServiceUtil.search(companyId, groupIds, 628 classNameIds, classPK, keywords, type, mode, start, end, 629 orderByComparator); 630 631 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 632 } 633 catch (Exception e) { 634 _log.error(e, e); 635 636 throw new RemoteException(e.getMessage()); 637 } 638 } 639 640 /** 641 * Returns an ordered range of all the templates matching the group IDs, 642 * class name IDs, class PK, name keyword, description keyword, type, mode, 643 * and language. 644 * 645 * <p> 646 * Useful when paginating results. Returns a maximum of <code>end - 647 * start</code> instances. <code>start</code> and <code>end</code> are not 648 * primary keys, they are indexes in the result set. Thus, <code>0</code> 649 * refers to the first result in the set. Setting both <code>start</code> 650 * and <code>end</code> to {@link 651 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 652 * result set. 653 * </p> 654 * 655 * @param companyId the primary key of the template's company 656 * @param groupIds the primary keys of the groups 657 * @param classNameIds the primary keys of the entity's instances the 658 templates are related to 659 * @param classPK the primary key of the template's related entity 660 * @param name the name keywords (optionally <code>null</code>) 661 * @param description the description keywords (optionally 662 <code>null</code>) 663 * @param type the template's type (optionally <code>null</code>). For more 664 information, see {@link 665 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 666 * @param mode the template's mode (optionally <code>null</code>). For more 667 information, see {@link 668 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 669 * @param language the template's script language (optionally 670 <code>null</code>). For more information, see {@link 671 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 672 * @param andOperator whether every field must match its keywords, or just 673 one field. 674 * @param start the lower bound of the range of templates to return 675 * @param end the upper bound of the range of templates to return (not 676 inclusive) 677 * @param orderByComparator the comparator to order the templates 678 (optionally <code>null</code>) 679 * @return the matching templates ordered by the comparator 680 * @throws SystemException if a system exception occurred 681 */ 682 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 683 long companyId, long[] groupIds, long[] classNameIds, long classPK, 684 java.lang.String name, java.lang.String description, 685 java.lang.String type, java.lang.String mode, 686 java.lang.String language, boolean andOperator, int start, int end, 687 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 688 throws RemoteException { 689 try { 690 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 691 DDMTemplateServiceUtil.search(companyId, groupIds, 692 classNameIds, classPK, name, description, type, mode, 693 language, andOperator, start, end, orderByComparator); 694 695 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 696 } 697 catch (Exception e) { 698 _log.error(e, e); 699 700 throw new RemoteException(e.getMessage()); 701 } 702 } 703 704 /** 705 * Returns the number of templates matching the group, class name ID, class 706 * PK, type, and mode, and matching the keywords in the template names and 707 * descriptions. 708 * 709 * @param companyId the primary key of the template's company 710 * @param groupId the primary key of the group 711 * @param classNameId the primary key of the class name for template's 712 related model 713 * @param classPK the primary key of the template's related entity 714 * @param keywords the keywords (space separated), which may occur in the 715 template's name or description (optionally <code>null</code>) 716 * @param type the template's type (optionally <code>null</code>). For more 717 information, see {@link 718 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 719 * @param mode the template's mode (optionally <code>null</code>). For more 720 information, see {@link 721 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 722 * @return the number of matching templates 723 * @throws SystemException if a system exception occurred 724 */ 725 public static int searchCount(long companyId, long groupId, 726 long classNameId, long classPK, java.lang.String keywords, 727 java.lang.String type, java.lang.String mode) throws RemoteException { 728 try { 729 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 730 groupId, classNameId, classPK, keywords, type, mode); 731 732 return returnValue; 733 } 734 catch (Exception e) { 735 _log.error(e, e); 736 737 throw new RemoteException(e.getMessage()); 738 } 739 } 740 741 /** 742 * Returns the number of templates matching the group, class name ID, class 743 * PK, name keyword, description keyword, type, mode, and language. 744 * 745 * @param companyId the primary key of the template's company 746 * @param groupId the primary key of the group 747 * @param classNameId the primary key of the class name for template's 748 related model 749 * @param classPK the primary key of the template's related entity 750 * @param name the name keywords (optionally <code>null</code>) 751 * @param description the description keywords (optionally 752 <code>null</code>) 753 * @param type the template's type (optionally <code>null</code>). For more 754 information, see {@link 755 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 756 * @param mode the template's mode (optionally <code>null</code>). For more 757 information, see {@link 758 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 759 * @param language the template's script language (optionally 760 <code>null</code>). For more information, see {@link 761 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 762 * @param andOperator whether every field must match its keywords, or just 763 one field. 764 * @return the number of matching templates 765 * @throws SystemException if a system exception occurred 766 */ 767 public static int searchCount(long companyId, long groupId, 768 long classNameId, long classPK, java.lang.String name, 769 java.lang.String description, java.lang.String type, 770 java.lang.String mode, java.lang.String language, boolean andOperator) 771 throws RemoteException { 772 try { 773 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 774 groupId, classNameId, classPK, name, description, type, 775 mode, language, andOperator); 776 777 return returnValue; 778 } 779 catch (Exception e) { 780 _log.error(e, e); 781 782 throw new RemoteException(e.getMessage()); 783 } 784 } 785 786 /** 787 * Returns the number of templates matching the group IDs, class name IDs, 788 * class PK, type, and mode, and matching the keywords in the template names 789 * and descriptions. 790 * 791 * @param companyId the primary key of the template's company 792 * @param groupIds the primary keys of the groups 793 * @param classNameIds the primary keys of the entity's instances the 794 templates are related to 795 * @param classPK the primary key of the template's related entity 796 * @param keywords the keywords (space separated), which may occur in the 797 template's name or description (optionally <code>null</code>) 798 * @param type the template's type (optionally <code>null</code>). For more 799 information, see {@link 800 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 801 * @param mode the template's mode (optionally <code>null</code>). For more 802 information, see {@link 803 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 804 * @return the number of matching templates 805 * @throws SystemException if a system exception occurred 806 */ 807 public static int searchCount(long companyId, long[] groupIds, 808 long[] classNameIds, long classPK, java.lang.String keywords, 809 java.lang.String type, java.lang.String mode) throws RemoteException { 810 try { 811 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 812 groupIds, classNameIds, classPK, keywords, type, mode); 813 814 return returnValue; 815 } 816 catch (Exception e) { 817 _log.error(e, e); 818 819 throw new RemoteException(e.getMessage()); 820 } 821 } 822 823 /** 824 * Returns the number of templates matching the group IDs, class name IDs, 825 * class PK, name keyword, description keyword, type, mode, and language. 826 * 827 * @param companyId the primary key of the template's company 828 * @param groupIds the primary keys of the groups 829 * @param classNameIds the primary keys of the entity's instances the 830 templates are related to 831 * @param classPK the primary key of the template's related entity 832 * @param name the name keywords (optionally <code>null</code>) 833 * @param description the description keywords (optionally 834 <code>null</code>) 835 * @param type the template's type (optionally <code>null</code>). For more 836 information, see {@link 837 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 838 * @param mode the template's mode (optionally <code>null</code>). For more 839 information, see {@link 840 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 841 * @param language the template's script language (optionally 842 <code>null</code>). For more information, see {@link 843 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 844 * @param andOperator whether every field must match its keywords, or just 845 one field. 846 * @return the number of matching templates 847 * @throws SystemException if a system exception occurred 848 */ 849 public static int searchCount(long companyId, long[] groupIds, 850 long[] classNameIds, long classPK, java.lang.String name, 851 java.lang.String description, java.lang.String type, 852 java.lang.String mode, java.lang.String language, boolean andOperator) 853 throws RemoteException { 854 try { 855 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 856 groupIds, classNameIds, classPK, name, description, type, 857 mode, language, andOperator); 858 859 return returnValue; 860 } 861 catch (Exception e) { 862 _log.error(e, e); 863 864 throw new RemoteException(e.getMessage()); 865 } 866 } 867 868 private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceSoap.class); 869 }