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 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 service context to be applied. 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 view 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 all the templates matching the group and class PK. 465 * 466 * @param groupId the primary key of the group 467 * @param classPK the primary key of the template's related entity 468 * @return the matching templates 469 * @throws SystemException if a system exception occurred 470 */ 471 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByClassPK( 472 long groupId, long classPK) throws RemoteException { 473 try { 474 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 475 DDMTemplateServiceUtil.getTemplatesByClassPK(groupId, classPK); 476 477 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 478 } 479 catch (Exception e) { 480 _log.error(e, e); 481 482 throw new RemoteException(e.getMessage()); 483 } 484 } 485 486 /** 487 * Returns an ordered range of all the templates matching the group and 488 * structure class name ID. 489 * 490 * <p> 491 * Useful when paginating results. Returns a maximum of <code>end - 492 * start</code> instances. <code>start</code> and <code>end</code> are not 493 * primary keys, they are indexes in the result set. Thus, <code>0</code> 494 * refers to the first result in the set. Setting both <code>start</code> 495 * and <code>end</code> to {@link 496 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 497 * result set. 498 * </p> 499 * 500 * @param groupId the primary key of the group 501 * @param structureClassNameId the primary key of the class name for the 502 template's related structure 503 * @param start the lower bound of the range of templates to return 504 * @param end the upper bound of the range of templates to return (not 505 inclusive) 506 * @param orderByComparator the comparator to order the templates 507 (optionally <code>null</code>) 508 * @return the range of matching templates ordered by the comparator 509 * @throws SystemException if a system exception occurred 510 */ 511 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] getTemplatesByStructureClassNameId( 512 long groupId, long structureClassNameId, int start, int end, 513 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 514 throws RemoteException { 515 try { 516 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 517 DDMTemplateServiceUtil.getTemplatesByStructureClassNameId(groupId, 518 structureClassNameId, start, end, orderByComparator); 519 520 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 521 } 522 catch (Exception e) { 523 _log.error(e, e); 524 525 throw new RemoteException(e.getMessage()); 526 } 527 } 528 529 /** 530 * Returns an ordered range of all the templates matching the group, class 531 * name ID, class PK, type, and mode, and matching the keywords in the 532 * template names and descriptions. 533 * 534 * <p> 535 * Useful when paginating results. Returns a maximum of <code>end - 536 * start</code> instances. <code>start</code> and <code>end</code> are not 537 * primary keys, they are indexes in the result set. Thus, <code>0</code> 538 * refers to the first result in the set. Setting both <code>start</code> 539 * and <code>end</code> to {@link 540 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 541 * result set. 542 * </p> 543 * 544 * @param companyId the primary key of the template's company 545 * @param groupId the primary key of the group 546 * @param classNameId the primary key of the class name for template's 547 related model 548 * @param classPK the primary key of the template's related entity 549 * @param keywords the keywords (space separated), which may occur in the 550 template's name or description (optionally <code>null</code>) 551 * @param type the template's type (optionally <code>null</code>). For more 552 information, see {@link 553 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 554 * @param mode the template's mode (optionally <code>null</code>) For more 555 information, see {@link 556 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 557 * @param start the lower bound of the range of templates to return 558 * @param end the upper bound of the range of templates to return (not 559 inclusive) 560 * @param orderByComparator the comparator to order the templates 561 (optionally <code>null</code>) 562 * @return the matching templates ordered by the comparator 563 * @throws SystemException if a system exception occurred 564 */ 565 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 566 long companyId, long groupId, long classNameId, long classPK, 567 java.lang.String keywords, java.lang.String type, 568 java.lang.String mode, int start, int end, 569 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 570 throws RemoteException { 571 try { 572 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 573 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 574 classPK, keywords, type, mode, start, end, orderByComparator); 575 576 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 577 } 578 catch (Exception e) { 579 _log.error(e, e); 580 581 throw new RemoteException(e.getMessage()); 582 } 583 } 584 585 /** 586 * Returns an ordered range of all the templates matching the group, class 587 * name ID, class PK, name keyword, description keyword, type, mode, and 588 * language. 589 * 590 * <p> 591 * Useful when paginating results. Returns a maximum of <code>end - 592 * start</code> instances. <code>start</code> and <code>end</code> are not 593 * primary keys, they are indexes in the result set. Thus, <code>0</code> 594 * refers to the first result in the set. Setting both <code>start</code> 595 * and <code>end</code> to {@link 596 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 597 * result set. 598 * </p> 599 * 600 * @param companyId the primary key of the template's company 601 * @param groupId the primary key of the group 602 * @param classNameId the primary key of the class name for template's 603 related model 604 * @param classPK the primary key of the template's related entity 605 * @param name the name keywords (optionally <code>null</code>) 606 * @param description the description keywords (optionally 607 <code>null</code>) 608 * @param type the template's type (optionally <code>null</code>). For more 609 information, see {@link 610 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 611 * @param mode the template's mode (optionally <code>null</code>). For more 612 information, see {@link 613 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 614 * @param language the template's script language (optionally 615 <code>null</code>). For more information, see {@link 616 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 617 * @param andOperator whether every field must match its keywords, or just 618 one field. 619 * @param start the lower bound of the range of templates to return 620 * @param end the upper bound of the range of templates to return (not 621 inclusive) 622 * @param orderByComparator the comparator to order the templates 623 (optionally <code>null</code>) 624 * @return the matching templates ordered by the comparator 625 * @throws SystemException if a system exception occurred 626 */ 627 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 628 long companyId, long groupId, long classNameId, long classPK, 629 java.lang.String name, java.lang.String description, 630 java.lang.String type, java.lang.String mode, 631 java.lang.String language, boolean andOperator, int start, int end, 632 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 633 throws RemoteException { 634 try { 635 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 636 DDMTemplateServiceUtil.search(companyId, groupId, classNameId, 637 classPK, name, description, type, mode, language, 638 andOperator, start, end, orderByComparator); 639 640 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 641 } 642 catch (Exception e) { 643 _log.error(e, e); 644 645 throw new RemoteException(e.getMessage()); 646 } 647 } 648 649 /** 650 * Returns an ordered range of all the templates matching the group IDs, 651 * class name IDs, class PK, type, and mode, and matching the keywords in 652 * the template names and descriptions. 653 * 654 * <p> 655 * Useful when paginating results. Returns a maximum of <code>end - 656 * start</code> instances. <code>start</code> and <code>end</code> are not 657 * primary keys, they are indexes in the result set. Thus, <code>0</code> 658 * refers to the first result in the set. Setting both <code>start</code> 659 * and <code>end</code> to {@link 660 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 661 * result set. 662 * </p> 663 * 664 * @param companyId the primary key of the template's company 665 * @param groupIds the primary keys of the groups 666 * @param classNameIds the primary keys of the entity's instances the 667 templates are related to 668 * @param classPK the primary key of the template's related entity 669 * @param keywords the keywords (space separated), which may occur in the 670 template's name or description (optionally <code>null</code>) 671 * @param type the template's type (optionally <code>null</code>). For more 672 information, see {@link 673 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 674 * @param mode the template's mode (optionally <code>null</code>). For more 675 information, see {@link 676 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 677 * @param start the lower bound of the range of templates to return 678 * @param end the upper bound of the range of templates to return (not 679 inclusive) 680 * @param orderByComparator the comparator to order the templates 681 (optionally <code>null</code>) 682 * @return the matching templates ordered by the comparator 683 * @throws SystemException if a system exception occurred 684 */ 685 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 686 long companyId, long[] groupIds, long[] classNameIds, long classPK, 687 java.lang.String keywords, java.lang.String type, 688 java.lang.String mode, int start, int end, 689 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 690 throws RemoteException { 691 try { 692 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 693 DDMTemplateServiceUtil.search(companyId, groupIds, 694 classNameIds, classPK, keywords, type, mode, start, end, 695 orderByComparator); 696 697 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 698 } 699 catch (Exception e) { 700 _log.error(e, e); 701 702 throw new RemoteException(e.getMessage()); 703 } 704 } 705 706 /** 707 * Returns an ordered range of all the templates matching the group IDs, 708 * class name IDs, class PK, name keyword, description keyword, type, mode, 709 * and language. 710 * 711 * <p> 712 * Useful when paginating results. Returns a maximum of <code>end - 713 * start</code> instances. <code>start</code> and <code>end</code> are not 714 * primary keys, they are indexes in the result set. Thus, <code>0</code> 715 * refers to the first result in the set. Setting both <code>start</code> 716 * and <code>end</code> to {@link 717 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 718 * result set. 719 * </p> 720 * 721 * @param companyId the primary key of the template's company 722 * @param groupIds the primary keys of the groups 723 * @param classNameIds the primary keys of the entity's instances the 724 templates are related to 725 * @param classPK the primary key of the template's related entity 726 * @param name the name keywords (optionally <code>null</code>) 727 * @param description the description keywords (optionally 728 <code>null</code>) 729 * @param type the template's type (optionally <code>null</code>). For more 730 information, see {@link 731 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 732 * @param mode the template's mode (optionally <code>null</code>). For more 733 information, see {@link 734 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 735 * @param language the template's script language (optionally 736 <code>null</code>). For more information, see {@link 737 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 738 * @param andOperator whether every field must match its keywords, or just 739 one field. 740 * @param start the lower bound of the range of templates to return 741 * @param end the upper bound of the range of templates to return (not 742 inclusive) 743 * @param orderByComparator the comparator to order the templates 744 (optionally <code>null</code>) 745 * @return the matching templates ordered by the comparator 746 * @throws SystemException if a system exception occurred 747 */ 748 public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap[] search( 749 long companyId, long[] groupIds, long[] classNameIds, long classPK, 750 java.lang.String name, java.lang.String description, 751 java.lang.String type, java.lang.String mode, 752 java.lang.String language, boolean andOperator, int start, int end, 753 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 754 throws RemoteException { 755 try { 756 java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> returnValue = 757 DDMTemplateServiceUtil.search(companyId, groupIds, 758 classNameIds, classPK, name, description, type, mode, 759 language, andOperator, start, end, orderByComparator); 760 761 return com.liferay.portlet.dynamicdatamapping.model.DDMTemplateSoap.toSoapModels(returnValue); 762 } 763 catch (Exception e) { 764 _log.error(e, e); 765 766 throw new RemoteException(e.getMessage()); 767 } 768 } 769 770 /** 771 * Returns the number of templates matching the group, class name ID, class 772 * PK, type, and mode, and matching the keywords in the template names and 773 * descriptions. 774 * 775 * @param companyId the primary key of the template's company 776 * @param groupId the primary key of the group 777 * @param classNameId the primary key of the class name for template's 778 related model 779 * @param classPK the primary key of the template's related entity 780 * @param keywords the keywords (space separated), which may occur in the 781 template's name or description (optionally <code>null</code>) 782 * @param type the template's type (optionally <code>null</code>). For more 783 information, see {@link 784 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 785 * @param mode the template's mode (optionally <code>null</code>). For more 786 information, see {@link 787 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 788 * @return the number of matching templates 789 * @throws SystemException if a system exception occurred 790 */ 791 public static int searchCount(long companyId, long groupId, 792 long classNameId, long classPK, java.lang.String keywords, 793 java.lang.String type, java.lang.String mode) throws RemoteException { 794 try { 795 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 796 groupId, classNameId, classPK, keywords, type, mode); 797 798 return returnValue; 799 } 800 catch (Exception e) { 801 _log.error(e, e); 802 803 throw new RemoteException(e.getMessage()); 804 } 805 } 806 807 /** 808 * Returns the number of templates matching the group, class name ID, class 809 * PK, name keyword, description keyword, type, mode, and language. 810 * 811 * @param companyId the primary key of the template's company 812 * @param groupId the primary key of the group 813 * @param classNameId the primary key of the class name for template's 814 related model 815 * @param classPK the primary key of the template's related entity 816 * @param name the name keywords (optionally <code>null</code>) 817 * @param description the description keywords (optionally 818 <code>null</code>) 819 * @param type the template's type (optionally <code>null</code>). For more 820 information, see {@link 821 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 822 * @param mode the template's mode (optionally <code>null</code>). For more 823 information, see {@link 824 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 825 * @param language the template's script language (optionally 826 <code>null</code>). For more information, see {@link 827 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 828 * @param andOperator whether every field must match its keywords, or just 829 one field. 830 * @return the number of matching templates 831 * @throws SystemException if a system exception occurred 832 */ 833 public static int searchCount(long companyId, long groupId, 834 long classNameId, long classPK, java.lang.String name, 835 java.lang.String description, java.lang.String type, 836 java.lang.String mode, java.lang.String language, boolean andOperator) 837 throws RemoteException { 838 try { 839 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 840 groupId, classNameId, classPK, name, description, type, 841 mode, language, andOperator); 842 843 return returnValue; 844 } 845 catch (Exception e) { 846 _log.error(e, e); 847 848 throw new RemoteException(e.getMessage()); 849 } 850 } 851 852 /** 853 * Returns the number of templates matching the group IDs, class name IDs, 854 * class PK, type, and mode, and matching the keywords in the template names 855 * and descriptions. 856 * 857 * @param companyId the primary key of the template's company 858 * @param groupIds the primary keys of the groups 859 * @param classNameIds the primary keys of the entity's instances the 860 templates are related to 861 * @param classPK the primary key of the template's related entity 862 * @param keywords the keywords (space separated), which may occur in the 863 template's name or description (optionally <code>null</code>) 864 * @param type the template's type (optionally <code>null</code>). For more 865 information, see {@link 866 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 867 * @param mode the template's mode (optionally <code>null</code>). For more 868 information, see {@link 869 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 870 * @return the number of matching templates 871 * @throws SystemException if a system exception occurred 872 */ 873 public static int searchCount(long companyId, long[] groupIds, 874 long[] classNameIds, long classPK, java.lang.String keywords, 875 java.lang.String type, java.lang.String mode) throws RemoteException { 876 try { 877 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 878 groupIds, classNameIds, classPK, keywords, type, mode); 879 880 return returnValue; 881 } 882 catch (Exception e) { 883 _log.error(e, e); 884 885 throw new RemoteException(e.getMessage()); 886 } 887 } 888 889 /** 890 * Returns the number of templates matching the group IDs, class name IDs, 891 * class PK, name keyword, description keyword, type, mode, and language. 892 * 893 * @param companyId the primary key of the template's company 894 * @param groupIds the primary keys of the groups 895 * @param classNameIds the primary keys of the entity's instances the 896 templates are related to 897 * @param classPK the primary key of the template's related entity 898 * @param name the name keywords (optionally <code>null</code>) 899 * @param description the description keywords (optionally 900 <code>null</code>) 901 * @param type the template's type (optionally <code>null</code>). For more 902 information, see {@link 903 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 904 * @param mode the template's mode (optionally <code>null</code>). For more 905 information, see {@link 906 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 907 * @param language the template's script language (optionally 908 <code>null</code>). For more information, see {@link 909 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 910 * @param andOperator whether every field must match its keywords, or just 911 one field. 912 * @return the number of matching templates 913 * @throws SystemException if a system exception occurred 914 */ 915 public static int searchCount(long companyId, long[] groupIds, 916 long[] classNameIds, long classPK, java.lang.String name, 917 java.lang.String description, java.lang.String type, 918 java.lang.String mode, java.lang.String language, boolean andOperator) 919 throws RemoteException { 920 try { 921 int returnValue = DDMTemplateServiceUtil.searchCount(companyId, 922 groupIds, classNameIds, classPK, name, description, type, 923 mode, language, andOperator); 924 925 return returnValue; 926 } 927 catch (Exception e) { 928 _log.error(e, e); 929 930 throw new RemoteException(e.getMessage()); 931 } 932 } 933 934 private static Log _log = LogFactoryUtil.getLog(DDMTemplateServiceSoap.class); 935 }