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