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