001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portlet.dynamicdatamapping.service; 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 template's service context. 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 template's service context. 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 delete 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 an ordered range of all the templates matching the group, class 369 * name ID, class PK, type, and mode, and matching the keywords in the 370 * template names and descriptions. 371 * 372 * <p> 373 * Useful when paginating results. Returns a maximum of <code>end - 374 * start</code> instances. <code>start</code> and <code>end</code> are not 375 * primary keys, they are indexes in the result set. Thus, <code>0</code> 376 * refers to the first result in the set. Setting both <code>start</code> 377 * and <code>end</code> to {@link 378 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 379 * result set. 380 * </p> 381 * 382 * @param companyId the primary key of the template's company 383 * @param groupId the primary key of the group 384 * @param classNameId the primary key of the class name for template's 385 related model 386 * @param classPK the primary key of the template's related entity 387 * @param keywords the keywords (space separated), which may occur in the 388 template's name or description (optionally <code>null</code>) 389 * @param type the template's type (optionally <code>null</code>). For more 390 information, see {@link 391 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 392 * @param mode the template's mode (optionally <code>null</code>) For more 393 information, see {@link 394 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 395 * @param start the lower bound of the range of templates to return 396 * @param end the upper bound of the range of templates to return (not 397 inclusive) 398 * @param orderByComparator the comparator to order the templates 399 (optionally <code>null</code>) 400 * @return the matching templates ordered by the comparator 401 * @throws SystemException if a system exception occurred 402 */ 403 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 404 long companyId, long groupId, long classNameId, long classPK, 405 java.lang.String keywords, java.lang.String type, 406 java.lang.String mode, int start, int end, 407 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 408 throws com.liferay.portal.kernel.exception.SystemException { 409 return _ddmTemplateService.search(companyId, groupId, classNameId, 410 classPK, keywords, type, mode, start, end, orderByComparator); 411 } 412 413 /** 414 * Returns an ordered range of all the templates matching the group, class 415 * name ID, class PK, name keyword, description keyword, type, mode, and 416 * language. 417 * 418 * <p> 419 * Useful when paginating results. Returns a maximum of <code>end - 420 * start</code> instances. <code>start</code> and <code>end</code> are not 421 * primary keys, they are indexes in the result set. Thus, <code>0</code> 422 * refers to the first result in the set. Setting both <code>start</code> 423 * and <code>end</code> to {@link 424 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 425 * result set. 426 * </p> 427 * 428 * @param companyId the primary key of the template's company 429 * @param groupId the primary key of the group 430 * @param classNameId the primary key of the class name for template's 431 related model 432 * @param classPK the primary key of the template's related entity 433 * @param name the name keywords (optionally <code>null</code>) 434 * @param description the description keywords (optionally 435 <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 language the template's script language (optionally 443 <code>null</code>). For more information, see {@link 444 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 445 * @param andOperator whether every field must match its keywords, or just 446 one field. 447 * @param start the lower bound of the range of templates to return 448 * @param end the upper bound of the range of templates to return (not 449 inclusive) 450 * @param orderByComparator the comparator to order the templates 451 (optionally <code>null</code>) 452 * @return the matching templates ordered by the comparator 453 * @throws SystemException if a system exception occurred 454 */ 455 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 456 long companyId, long groupId, long classNameId, long classPK, 457 java.lang.String name, java.lang.String description, 458 java.lang.String type, java.lang.String mode, 459 java.lang.String language, boolean andOperator, int start, int end, 460 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 461 throws com.liferay.portal.kernel.exception.SystemException { 462 return _ddmTemplateService.search(companyId, groupId, classNameId, 463 classPK, name, description, type, mode, language, andOperator, 464 start, end, orderByComparator); 465 } 466 467 /** 468 * Returns an ordered range of all the templates matching the group IDs, 469 * class name IDs, class PK, type, and mode, and matching the keywords in 470 * the template names and descriptions. 471 * 472 * <p> 473 * Useful when paginating results. Returns a maximum of <code>end - 474 * start</code> instances. <code>start</code> and <code>end</code> are not 475 * primary keys, they are indexes in the result set. Thus, <code>0</code> 476 * refers to the first result in the set. Setting both <code>start</code> 477 * and <code>end</code> to {@link 478 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 479 * result set. 480 * </p> 481 * 482 * @param companyId the primary key of the template's company 483 * @param groupIds the primary keys of the groups 484 * @param classNameIds the primary keys of the entity's instances the 485 templates are related to 486 * @param classPK the primary key of the template's related entity 487 * @param keywords the keywords (space separated), which may occur in the 488 template's name or description (optionally <code>null</code>) 489 * @param type the template's type (optionally <code>null</code>). For more 490 information, see {@link 491 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 492 * @param mode the template's mode (optionally <code>null</code>). For more 493 information, see {@link 494 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 495 * @param start the lower bound of the range of templates to return 496 * @param end the upper bound of the range of templates to return (not 497 inclusive) 498 * @param orderByComparator the comparator to order the templates 499 (optionally <code>null</code>) 500 * @return the matching templates ordered by the comparator 501 * @throws SystemException if a system exception occurred 502 */ 503 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 504 long companyId, long[] groupIds, long[] classNameIds, long classPK, 505 java.lang.String keywords, java.lang.String type, 506 java.lang.String mode, 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, groupIds, classNameIds, 510 classPK, keywords, type, mode, start, end, orderByComparator); 511 } 512 513 /** 514 * Returns an ordered range of all the templates matching the group IDs, 515 * class name IDs, class PK, name keyword, description keyword, type, mode, 516 * and language. 517 * 518 * <p> 519 * Useful when paginating results. Returns a maximum of <code>end - 520 * start</code> instances. <code>start</code> and <code>end</code> are not 521 * primary keys, they are indexes in the result set. Thus, <code>0</code> 522 * refers to the first result in the set. Setting both <code>start</code> 523 * and <code>end</code> to {@link 524 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 525 * result set. 526 * </p> 527 * 528 * @param companyId the primary key of the template's company 529 * @param groupIds the primary keys of the groups 530 * @param classNameIds the primary keys of the entity's instances the 531 templates are related to 532 * @param classPK the primary key of the template's related entity 533 * @param name the name keywords (optionally <code>null</code>) 534 * @param description the description keywords (optionally 535 <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 language the template's script language (optionally 543 <code>null</code>). For more information, see {@link 544 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 545 * @param andOperator whether every field must match its keywords, or just 546 one field. 547 * @param start the lower bound of the range of templates to return 548 * @param end the upper bound of the range of templates to return (not 549 inclusive) 550 * @param orderByComparator the comparator to order the templates 551 (optionally <code>null</code>) 552 * @return the matching templates ordered by the comparator 553 * @throws SystemException if a system exception occurred 554 */ 555 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 556 long companyId, long[] groupIds, long[] classNameIds, long classPK, 557 java.lang.String name, java.lang.String description, 558 java.lang.String type, java.lang.String mode, 559 java.lang.String language, boolean andOperator, int start, int end, 560 com.liferay.portal.kernel.util.OrderByComparator orderByComparator) 561 throws com.liferay.portal.kernel.exception.SystemException { 562 return _ddmTemplateService.search(companyId, groupIds, classNameIds, 563 classPK, name, description, type, mode, language, andOperator, 564 start, end, orderByComparator); 565 } 566 567 /** 568 * Returns the number of templates matching the group, class name ID, class 569 * PK, type, and mode, and matching the keywords in the template names and 570 * descriptions. 571 * 572 * @param companyId the primary key of the template's company 573 * @param groupId the primary key of the group 574 * @param classNameId the primary key of the class name for template's 575 related model 576 * @param classPK the primary key of the template's related entity 577 * @param keywords the keywords (space separated), which may occur in the 578 template's name or description (optionally <code>null</code>) 579 * @param type the template's type (optionally <code>null</code>). For more 580 information, see {@link 581 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 582 * @param mode the template's mode (optionally <code>null</code>). For more 583 information, see {@link 584 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 585 * @return the number of matching templates 586 * @throws SystemException if a system exception occurred 587 */ 588 public int searchCount(long companyId, long groupId, long classNameId, 589 long classPK, java.lang.String keywords, java.lang.String type, 590 java.lang.String mode) 591 throws com.liferay.portal.kernel.exception.SystemException { 592 return _ddmTemplateService.searchCount(companyId, groupId, classNameId, 593 classPK, keywords, type, mode); 594 } 595 596 /** 597 * Returns the number of templates matching the group, class name ID, class 598 * PK, name keyword, description keyword, type, mode, and language. 599 * 600 * @param companyId the primary key of the template's company 601 * @param groupId the primary key of the group 602 * @param classNameId the primary key of the class name for template's 603 related model 604 * @param classPK the primary key of the template's related entity 605 * @param name the name keywords (optionally <code>null</code>) 606 * @param description the description keywords (optionally 607 <code>null</code>) 608 * @param type the template's type (optionally <code>null</code>). For more 609 information, see {@link 610 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 611 * @param mode the template's mode (optionally <code>null</code>). For more 612 information, see {@link 613 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 614 * @param language the template's script language (optionally 615 <code>null</code>). For more information, see {@link 616 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 617 * @param andOperator whether every field must match its keywords, or just 618 one field. 619 * @return the number of matching templates 620 * @throws SystemException if a system exception occurred 621 */ 622 public int searchCount(long companyId, long groupId, long classNameId, 623 long classPK, java.lang.String name, java.lang.String description, 624 java.lang.String type, java.lang.String mode, 625 java.lang.String language, boolean andOperator) 626 throws com.liferay.portal.kernel.exception.SystemException { 627 return _ddmTemplateService.searchCount(companyId, groupId, classNameId, 628 classPK, name, description, type, mode, language, andOperator); 629 } 630 631 /** 632 * Returns the number of templates matching the group IDs, class name IDs, 633 * class PK, type, and mode, and matching the keywords in the template names 634 * and descriptions. 635 * 636 * @param companyId the primary key of the template's company 637 * @param groupIds the primary keys of the groups 638 * @param classNameIds the primary keys of the entity's instances the 639 templates are related to 640 * @param classPK the primary key of the template's related entity 641 * @param keywords the keywords (space separated), which may occur in the 642 template's name or description (optionally <code>null</code>) 643 * @param type the template's type (optionally <code>null</code>). For more 644 information, see {@link 645 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 646 * @param mode the template's mode (optionally <code>null</code>). For more 647 information, see {@link 648 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 649 * @return the number of matching templates 650 * @throws SystemException if a system exception occurred 651 */ 652 public int searchCount(long companyId, long[] groupIds, 653 long[] classNameIds, long classPK, java.lang.String keywords, 654 java.lang.String type, java.lang.String mode) 655 throws com.liferay.portal.kernel.exception.SystemException { 656 return _ddmTemplateService.searchCount(companyId, groupIds, 657 classNameIds, classPK, keywords, type, mode); 658 } 659 660 /** 661 * Returns the number of templates matching the group IDs, class name IDs, 662 * class PK, name keyword, description keyword, type, mode, and language. 663 * 664 * @param companyId the primary key of the template's company 665 * @param groupIds the primary keys of the groups 666 * @param classNameIds the primary keys of the entity's instances the 667 templates are related to 668 * @param classPK the primary key of the template's related entity 669 * @param name the name keywords (optionally <code>null</code>) 670 * @param description the description keywords (optionally 671 <code>null</code>) 672 * @param type the template's type (optionally <code>null</code>). For more 673 information, see {@link 674 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 675 * @param mode the template's mode (optionally <code>null</code>). For more 676 information, see {@link 677 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 678 * @param language the template's script language (optionally 679 <code>null</code>). For more information, see {@link 680 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 681 * @param andOperator whether every field must match its keywords, or just 682 one field. 683 * @return the number of matching templates 684 * @throws SystemException if a system exception occurred 685 */ 686 public int searchCount(long companyId, long[] groupIds, 687 long[] classNameIds, long classPK, java.lang.String name, 688 java.lang.String description, java.lang.String type, 689 java.lang.String mode, java.lang.String language, boolean andOperator) 690 throws com.liferay.portal.kernel.exception.SystemException { 691 return _ddmTemplateService.searchCount(companyId, groupIds, 692 classNameIds, classPK, name, description, type, mode, language, 693 andOperator); 694 } 695 696 /** 697 * Updates the template matching the ID. 698 * 699 * @param templateId the primary key of the template 700 * @param nameMap the template's new locales and localized names 701 * @param descriptionMap the template's new locales and localized 702 description 703 * @param type the template's type. For more information, see {@link 704 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 705 * @param mode the template's mode. For more information, see {@link 706 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 707 * @param language the template's script language. For more information, 708 see {@link 709 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 710 * @param script the template's script 711 * @param cacheable whether the template is cacheable 712 * @param smallImage whether the template has a small image 713 * @param smallImageURL the template's small image URL (optionally 714 <code>null</code>) 715 * @param smallImageFile the template's small image file (optionally 716 <code>null</code>) 717 * @param serviceContext the service context to be applied. Can set the 718 modification date. 719 * @return the updated template 720 * @throws PortalException if the user did not have permission to update the 721 template or if a portal exception occurred 722 * @throws SystemException if a system exception occurred 723 */ 724 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 725 long templateId, 726 java.util.Map<java.util.Locale, java.lang.String> nameMap, 727 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 728 java.lang.String type, java.lang.String mode, 729 java.lang.String language, java.lang.String script, boolean cacheable, 730 boolean smallImage, java.lang.String smallImageURL, 731 java.io.File smallImageFile, 732 com.liferay.portal.service.ServiceContext serviceContext) 733 throws com.liferay.portal.kernel.exception.PortalException, 734 com.liferay.portal.kernel.exception.SystemException { 735 return _ddmTemplateService.updateTemplate(templateId, nameMap, 736 descriptionMap, type, mode, language, script, cacheable, 737 smallImage, smallImageURL, smallImageFile, serviceContext); 738 } 739 740 /** 741 * @deprecated Renamed to {@link #getWrappedService} 742 */ 743 public DDMTemplateService getWrappedDDMTemplateService() { 744 return _ddmTemplateService; 745 } 746 747 /** 748 * @deprecated Renamed to {@link #setWrappedService} 749 */ 750 public void setWrappedDDMTemplateService( 751 DDMTemplateService ddmTemplateService) { 752 _ddmTemplateService = ddmTemplateService; 753 } 754 755 public DDMTemplateService getWrappedService() { 756 return _ddmTemplateService; 757 } 758 759 public void setWrappedService(DDMTemplateService ddmTemplateService) { 760 _ddmTemplateService = ddmTemplateService; 761 } 762 763 private DDMTemplateService _ddmTemplateService; 764 }