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