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.kernel.exception.PortalException; 020 import com.liferay.portal.kernel.exception.SystemException; 021 import com.liferay.portal.kernel.search.IndexableType; 022 import com.liferay.portal.kernel.transaction.Isolation; 023 import com.liferay.portal.kernel.transaction.Propagation; 024 import com.liferay.portal.kernel.transaction.Transactional; 025 import com.liferay.portal.model.SystemEventConstants; 026 import com.liferay.portal.service.BaseLocalService; 027 import com.liferay.portal.service.PersistedModelLocalService; 028 029 /** 030 * Provides the local service interface for DDMTemplate. Methods of this 031 * service will not have security checks based on the propagated JAAS 032 * credentials because this service can only be accessed from within the same 033 * VM. 034 * 035 * @author Brian Wing Shun Chan 036 * @see DDMTemplateLocalServiceUtil 037 * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateLocalServiceBaseImpl 038 * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl 039 * @generated 040 */ 041 @ProviderType 042 @Transactional(isolation = Isolation.PORTAL, rollbackFor = { 043 PortalException.class, SystemException.class}) 044 public interface DDMTemplateLocalService extends BaseLocalService, 045 PersistedModelLocalService { 046 /* 047 * NOTE FOR DEVELOPERS: 048 * 049 * Never modify or reference this interface directly. Always use {@link DDMTemplateLocalServiceUtil} to access the d d m template local service. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. 050 */ 051 052 /** 053 * Adds the d d m template to the database. Also notifies the appropriate model listeners. 054 * 055 * @param ddmTemplate the d d m template 056 * @return the d d m template that was added 057 */ 058 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 059 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addDDMTemplate( 060 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate); 061 062 /** 063 * Adds a template. 064 * 065 * @param userId the primary key of the template's creator/owner 066 * @param groupId the primary key of the group 067 * @param classNameId the primary key of the class name for the template's 068 related model 069 * @param classPK the primary key of the template's related entity 070 * @param nameMap the template's locales and localized names 071 * @param descriptionMap the template's locales and localized descriptions 072 * @param type the template's type. For more information, see {@link 073 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 074 * @param mode the template's mode. For more information, see {@link 075 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 076 * @param language the template's script language. For more information, 077 see {@link 078 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 079 * @param script the template's script 080 * @param serviceContext the service context to be applied. Can set the 081 UUID, creation date, modification date, guest permissions, and 082 group permissions for the template. 083 * @return the template 084 * @throws PortalException if a portal exception occurred 085 */ 086 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate( 087 long userId, long groupId, long classNameId, long classPK, 088 java.util.Map<java.util.Locale, java.lang.String> nameMap, 089 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 090 java.lang.String type, java.lang.String mode, 091 java.lang.String language, java.lang.String script, 092 com.liferay.portal.service.ServiceContext serviceContext) 093 throws com.liferay.portal.kernel.exception.PortalException; 094 095 /** 096 * Adds a template with additional parameters. 097 * 098 * @param userId the primary key of the template's creator/owner 099 * @param groupId the primary key of the group 100 * @param classNameId the primary key of the class name for the template's 101 related model 102 * @param classPK the primary key of the template's related entity 103 * @param templateKey the unique string identifying the template 104 (optionally <code>null</code>) 105 * @param nameMap the template's locales and localized names 106 * @param descriptionMap the template's locales and localized descriptions 107 * @param type the template's type. For more information, see {@link 108 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 109 * @param mode the template's mode. For more information, see {@link 110 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 111 * @param language the template's script language. For more information, 112 see {@link 113 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 114 * @param script the template's script 115 * @param cacheable whether the template is cacheable 116 * @param smallImage whether the template has a small image 117 * @param smallImageURL the template's small image URL (optionally 118 <code>null</code>) 119 * @param smallImageFile the template's small image file (optionally 120 <code>null</code>) 121 * @param serviceContext the service context to be applied. Can set the 122 UUID, creation date, modification date, guest permissions, and 123 group permissions for the template. 124 * @return the template 125 * @throws PortalException if a portal exception occurred 126 */ 127 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate( 128 long userId, long groupId, long classNameId, long classPK, 129 java.lang.String templateKey, 130 java.util.Map<java.util.Locale, java.lang.String> nameMap, 131 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 132 java.lang.String type, java.lang.String mode, 133 java.lang.String language, java.lang.String script, boolean cacheable, 134 boolean smallImage, java.lang.String smallImageURL, 135 java.io.File smallImageFile, 136 com.liferay.portal.service.ServiceContext serviceContext) 137 throws com.liferay.portal.kernel.exception.PortalException; 138 139 /** 140 * Adds the resources to the template. 141 * 142 * @param template the template to add resources to 143 * @param addGroupPermissions whether to add group permissions 144 * @param addGuestPermissions whether to add guest permissions 145 * @throws PortalException if a portal exception occurred 146 */ 147 public void addTemplateResources( 148 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template, 149 boolean addGroupPermissions, boolean addGuestPermissions) 150 throws com.liferay.portal.kernel.exception.PortalException; 151 152 /** 153 * Adds the model resources with the permissions to the template. 154 * 155 * @param template the template to add resources to 156 * @param groupPermissions the group permissions to be added 157 * @param guestPermissions the guest permissions to be added 158 * @throws PortalException if a portal exception occurred 159 */ 160 public void addTemplateResources( 161 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template, 162 java.lang.String[] groupPermissions, java.lang.String[] guestPermissions) 163 throws com.liferay.portal.kernel.exception.PortalException; 164 165 /** 166 * Copies the template, creating a new template with all the values 167 * extracted from the original one. This method supports defining a new name 168 * and description. 169 * 170 * @param userId the primary key of the template's creator/owner 171 * @param templateId the primary key of the template to be copied 172 * @param nameMap the new template's locales and localized names 173 * @param descriptionMap the new template's locales and localized 174 descriptions 175 * @param serviceContext the service context to be applied. Can set the 176 UUID, creation date, modification date, guest permissions, and 177 group permissions for the template. 178 * @return the new template 179 * @throws PortalException if a portal exception occurred 180 */ 181 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate( 182 long userId, long templateId, 183 java.util.Map<java.util.Locale, java.lang.String> nameMap, 184 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 185 com.liferay.portal.service.ServiceContext serviceContext) 186 throws com.liferay.portal.kernel.exception.PortalException; 187 188 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate( 189 long userId, long templateId, 190 com.liferay.portal.service.ServiceContext serviceContext) 191 throws com.liferay.portal.kernel.exception.PortalException; 192 193 /** 194 * Copies all the templates matching the class name ID, class PK, and type. 195 * This method creates new templates, extracting all the values from the old 196 * ones and updating their class PKs. 197 * 198 * @param userId the primary key of the template's creator/owner 199 * @param classNameId the primary key of the class name for the template's 200 related model 201 * @param oldClassPK the primary key of the old template's related entity 202 * @param newClassPK the primary key of the new template's related entity 203 * @param type the template's type. For more information, see {@link 204 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 205 * @param serviceContext the service context to be applied. Can set the 206 creation date, modification date, guest permissions, and group 207 permissions for the new templates. 208 * @return the new templates 209 * @throws PortalException if a portal exception occurred 210 */ 211 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates( 212 long userId, long classNameId, long oldClassPK, long newClassPK, 213 java.lang.String type, 214 com.liferay.portal.service.ServiceContext serviceContext) 215 throws com.liferay.portal.kernel.exception.PortalException; 216 217 /** 218 * Creates a new d d m template with the primary key. Does not add the d d m template to the database. 219 * 220 * @param templateId the primary key for the new d d m template 221 * @return the new d d m template 222 */ 223 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate createDDMTemplate( 224 long templateId); 225 226 /** 227 * Deletes the d d m template from the database. Also notifies the appropriate model listeners. 228 * 229 * @param ddmTemplate the d d m template 230 * @return the d d m template that was removed 231 */ 232 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 233 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate deleteDDMTemplate( 234 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate); 235 236 /** 237 * Deletes the d d m template with the primary key from the database. Also notifies the appropriate model listeners. 238 * 239 * @param templateId the primary key of the d d m template 240 * @return the d d m template that was removed 241 * @throws PortalException if a d d m template with the primary key could not be found 242 */ 243 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE) 244 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate deleteDDMTemplate( 245 long templateId) 246 throws com.liferay.portal.kernel.exception.PortalException; 247 248 /** 249 * @throws PortalException 250 */ 251 @Override 252 public com.liferay.portal.model.PersistedModel deletePersistedModel( 253 com.liferay.portal.model.PersistedModel persistedModel) 254 throws com.liferay.portal.kernel.exception.PortalException; 255 256 /** 257 * Deletes the template and its resources. 258 * 259 * @param template the template to be deleted 260 * @throws PortalException if a portal exception occurred 261 */ 262 @com.liferay.portal.kernel.systemevent.SystemEvent(type = SystemEventConstants.TYPE_DELETE) 263 public void deleteTemplate( 264 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate template) 265 throws com.liferay.portal.kernel.exception.PortalException; 266 267 /** 268 * Deletes the template and its resources. 269 * 270 * @param templateId the primary key of the template to be deleted 271 * @throws PortalException if a portal exception occurred 272 */ 273 public void deleteTemplate(long templateId) 274 throws com.liferay.portal.kernel.exception.PortalException; 275 276 /** 277 * Deletes all the templates of the group. 278 * 279 * @param groupId the primary key of the group 280 * @throws PortalException if a portal exception occurred 281 */ 282 public void deleteTemplates(long groupId) 283 throws com.liferay.portal.kernel.exception.PortalException; 284 285 public void deleteTemplates(long groupId, long classNameId) 286 throws com.liferay.portal.kernel.exception.PortalException; 287 288 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery(); 289 290 /** 291 * Performs a dynamic query on the database and returns the matching rows. 292 * 293 * @param dynamicQuery the dynamic query 294 * @return the matching rows 295 */ 296 public <T> java.util.List<T> dynamicQuery( 297 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 298 299 /** 300 * Performs a dynamic query on the database and returns a range of the matching rows. 301 * 302 * <p> 303 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 304 * </p> 305 * 306 * @param dynamicQuery the dynamic query 307 * @param start the lower bound of the range of model instances 308 * @param end the upper bound of the range of model instances (not inclusive) 309 * @return the range of matching rows 310 */ 311 public <T> java.util.List<T> dynamicQuery( 312 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 313 int end); 314 315 /** 316 * Performs a dynamic query on the database and returns an ordered range of the matching rows. 317 * 318 * <p> 319 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 320 * </p> 321 * 322 * @param dynamicQuery the dynamic query 323 * @param start the lower bound of the range of model instances 324 * @param end the upper bound of the range of model instances (not inclusive) 325 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 326 * @return the ordered range of matching rows 327 */ 328 public <T> java.util.List<T> dynamicQuery( 329 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, 330 int end, 331 com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator); 332 333 /** 334 * Returns the number of rows that match the dynamic query. 335 * 336 * @param dynamicQuery the dynamic query 337 * @return the number of rows that match the dynamic query 338 */ 339 public long dynamicQueryCount( 340 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery); 341 342 /** 343 * Returns the number of rows that match the dynamic query. 344 * 345 * @param dynamicQuery the dynamic query 346 * @param projection the projection to apply to the query 347 * @return the number of rows that match the dynamic query 348 */ 349 public long dynamicQueryCount( 350 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, 351 com.liferay.portal.kernel.dao.orm.Projection projection); 352 353 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 354 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchDDMTemplate( 355 long templateId); 356 357 /** 358 * Returns the d d m template matching the UUID and group. 359 * 360 * @param uuid the d d m template's UUID 361 * @param groupId the primary key of the group 362 * @return the matching d d m template, or <code>null</code> if a matching d d m template could not be found 363 */ 364 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 365 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchDDMTemplateByUuidAndGroupId( 366 java.lang.String uuid, long groupId); 367 368 /** 369 * Returns the template matching the group and template key. 370 * 371 * @param groupId the primary key of the group 372 * @param classNameId the primary key of the class name for the template's 373 related model 374 * @param templateKey the unique string identifying the template 375 * @return the matching template, or <code>null</code> if a matching 376 template could not be found 377 */ 378 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 379 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate( 380 long groupId, long classNameId, java.lang.String templateKey); 381 382 /** 383 * Returns the template matching the group and template key, optionally 384 * searching ancestor sites (that have sharing enabled) and global scoped 385 * sites. 386 * 387 * <p> 388 * This method first searches in the given group. If the template is still 389 * not found and <code>includeAncestorTemplates</code> is set to 390 * <code>true</code>, this method searches the group's ancestor sites (that 391 * have sharing enabled) and lastly searches global scoped sites. 392 * </p> 393 * 394 * @param groupId the primary key of the group 395 * @param classNameId the primary key of the class name for the template's 396 related model 397 * @param templateKey the unique string identifying the template 398 * @param includeAncestorTemplates whether to include ancestor sites (that 399 have sharing enabled) and include global scoped sites in the 400 search in the search 401 * @return the matching template, or <code>null</code> if a matching 402 template could not be found 403 * @throws PortalException if a portal exception occurred 404 */ 405 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 406 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate( 407 long groupId, long classNameId, java.lang.String templateKey, 408 boolean includeAncestorTemplates) 409 throws com.liferay.portal.kernel.exception.PortalException; 410 411 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 412 public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery(); 413 414 /** 415 * Returns the Spring bean ID for this bean. 416 * 417 * @return the Spring bean ID for this bean 418 */ 419 public java.lang.String getBeanIdentifier(); 420 421 /** 422 * Returns the d d m template with the primary key. 423 * 424 * @param templateId the primary key of the d d m template 425 * @return the d d m template 426 * @throws PortalException if a d d m template with the primary key could not be found 427 */ 428 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 429 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getDDMTemplate( 430 long templateId) 431 throws com.liferay.portal.kernel.exception.PortalException; 432 433 /** 434 * Returns the d d m template matching the UUID and group. 435 * 436 * @param uuid the d d m template's UUID 437 * @param groupId the primary key of the group 438 * @return the matching d d m template 439 * @throws PortalException if a matching d d m template could not be found 440 */ 441 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 442 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getDDMTemplateByUuidAndGroupId( 443 java.lang.String uuid, long groupId) 444 throws com.liferay.portal.kernel.exception.PortalException; 445 446 /** 447 * Returns a range of all the d d m templates. 448 * 449 * <p> 450 * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portlet.dynamicdatamapping.model.impl.DDMTemplateModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. 451 * </p> 452 * 453 * @param start the lower bound of the range of d d m templates 454 * @param end the upper bound of the range of d d m templates (not inclusive) 455 * @return the range of d d m templates 456 */ 457 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 458 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplates( 459 int start, int end); 460 461 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 462 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId( 463 java.lang.String uuid, long companyId); 464 465 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 466 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId( 467 java.lang.String uuid, long companyId, int start, int end, 468 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 469 470 /** 471 * Returns the number of d d m templates. 472 * 473 * @return the number of d d m templates 474 */ 475 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 476 public int getDDMTemplatesCount(); 477 478 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 479 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 480 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 481 482 @Override 483 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 484 public com.liferay.portal.model.PersistedModel getPersistedModel( 485 java.io.Serializable primaryKeyObj) 486 throws com.liferay.portal.kernel.exception.PortalException; 487 488 /** 489 * Returns the template matching the group and template key. 490 * 491 * @param groupId the primary key of the group 492 * @param classNameId the primary key of the class name for the template's 493 related model 494 * @param templateKey the unique string identifying the template 495 * @return the matching template 496 * @throws PortalException if a matching template could not be found 497 */ 498 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 499 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 500 long groupId, long classNameId, java.lang.String templateKey) 501 throws com.liferay.portal.kernel.exception.PortalException; 502 503 /** 504 * Returns the template matching the group and template key, optionally 505 * searching ancestor sites (that have sharing enabled) and global scoped 506 * sites. 507 * 508 * <p> 509 * This method first searches in the group. If the template is still not 510 * found and <code>includeAncestorTemplates</code> is set to 511 * <code>true</code>, this method searches the group's ancestor sites (that 512 * have sharing enabled) and lastly searches global scoped sites. 513 * </p> 514 * 515 * @param groupId the primary key of the group 516 * @param classNameId the primary key of the class name for the template's 517 related model 518 * @param templateKey the unique string identifying the template 519 * @param includeAncestorTemplates whether to include ancestor sites (that 520 have sharing enabled) and include global scoped sites in the 521 search in the search 522 * @return the matching template 523 * @throws PortalException if a matching template could not be found 524 */ 525 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 526 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 527 long groupId, long classNameId, java.lang.String templateKey, 528 boolean includeAncestorTemplates) 529 throws com.liferay.portal.kernel.exception.PortalException; 530 531 /** 532 * Returns the template with the ID. 533 * 534 * @param templateId the primary key of the template 535 * @return the template with the ID 536 * @throws PortalException if a matching template could not be found 537 */ 538 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 539 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 540 long templateId) 541 throws com.liferay.portal.kernel.exception.PortalException; 542 543 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 544 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplateBySmallImageId( 545 long smallImageId) 546 throws com.liferay.portal.kernel.exception.PortalException; 547 548 /** 549 * Returns all the templates with the class PK. 550 * 551 * @param classPK the primary key of the template's related entity 552 * @return the templates with the class PK 553 */ 554 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 555 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 556 long classPK); 557 558 /** 559 * Returns all the templates matching the group and class name ID. 560 * 561 * @param groupId the primary key of the group 562 * @param classNameId the primary key of the class name for the template's 563 related model 564 * @return the matching templates 565 */ 566 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 567 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 568 long groupId, long classNameId); 569 570 /** 571 * Returns all the templates matching the group, class name ID, and class 572 * PK. 573 * 574 * @param groupId the primary key of the group 575 * @param classNameId the primary key of the class name for the template's 576 related model 577 * @param classPK the primary key of the template's related entity 578 * @return the matching templates 579 */ 580 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 581 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 582 long groupId, long classNameId, long classPK); 583 584 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 585 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 586 long groupId, long classNameId, long classPK, 587 boolean includeAncestorTemplates) 588 throws com.liferay.portal.kernel.exception.PortalException; 589 590 /** 591 * Returns all the templates matching the group, class name ID, class PK, 592 * and type. 593 * 594 * @param groupId the primary key of the group 595 * @param classNameId the primary key of the class name for the template's 596 related model 597 * @param classPK the primary key of the template's related entity 598 * @param type the template's type. For more information, see {@link 599 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 600 * @return the matching templates 601 */ 602 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 603 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 604 long groupId, long classNameId, long classPK, java.lang.String type); 605 606 /** 607 * Returns all the templates matching the group, class name ID, class PK, 608 * type, and mode. 609 * 610 * @param groupId the primary key of the group 611 * @param classNameId the primary key of the class name for the template's 612 related model 613 * @param classPK the primary key of the template's related entity 614 * @param type the template's type. For more information, see {@link 615 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 616 * @param mode the template's mode. For more information, see {@link 617 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 618 * @return the matching templates 619 */ 620 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 621 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 622 long groupId, long classNameId, long classPK, java.lang.String type, 623 java.lang.String mode); 624 625 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 626 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 627 long[] groupIds, long classNameId, long classPK); 628 629 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 630 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 631 long groupId, long classPK); 632 633 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 634 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 635 long groupId, long classPK, int start, int end); 636 637 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 638 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 639 long[] groupIds, long classPK); 640 641 /** 642 * Returns the number of templates matching the group and class PK. 643 * 644 * @param groupId the primary key of the group 645 * @param classPK the primary key of the template's related entity 646 * @return the number of templates belonging to the group and class PK 647 */ 648 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 649 public int getTemplatesByClassPKCount(long groupId, long classPK); 650 651 /** 652 * Returns an ordered range of all the templates matching the group and 653 * structure class name ID. 654 * 655 * <p> 656 * Useful when paginating results. Returns a maximum of <code>end - 657 * start</code> instances. <code>start</code> and <code>end</code> are not 658 * primary keys, they are indexes in the result set. Thus, <code>0</code> 659 * refers to the first result in the set. Setting both <code>start</code> 660 * and <code>end</code> to {@link 661 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 662 * result set. 663 * </p> 664 * 665 * @param groupId the primary key of the group 666 * @param structureClassNameId the primary key of the class name for the 667 template's related structure 668 * @param start the lower bound of the range of templates to return 669 * @param end the upper bound of the range of templates to return (not 670 inclusive) 671 * @param orderByComparator the comparator to order the templates 672 (optionally <code>null</code>) 673 * @return the range of matching templates ordered by the comparator 674 */ 675 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 676 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId( 677 long groupId, long structureClassNameId, int start, int end, 678 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 679 680 /** 681 * Returns the number of templates matching the group and structure class 682 * name ID, including Generic Templates. 683 * 684 * @param groupId the primary key of the group 685 * @param structureClassNameId the primary key of the class name for the 686 template's related structure 687 * @return the number of matching templates 688 */ 689 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 690 public int getTemplatesByStructureClassNameIdCount(long groupId, 691 long structureClassNameId); 692 693 /** 694 * Returns the number of templates belonging to the group. 695 * 696 * @param groupId the primary key of the group 697 * @return the number of templates belonging to the group 698 */ 699 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 700 public int getTemplatesCount(long groupId); 701 702 /** 703 * Returns the number of templates matching the group and class name ID. 704 * 705 * @param groupId the primary key of the group 706 * @param classNameId the primary key of the class name for the template's 707 related model 708 * @return the number of matching templates 709 */ 710 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 711 public int getTemplatesCount(long groupId, long classNameId); 712 713 /** 714 * Returns the number of templates matching the group, class name ID, and 715 * class PK. 716 * 717 * @param groupId the primary key of the group 718 * @param classNameId the primary key of the class name for the template's 719 related model 720 * @param classPK the primary key of the template's related entity 721 * @return the number of matching templates 722 */ 723 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 724 public int getTemplatesCount(long groupId, long classNameId, long classPK); 725 726 /** 727 * Returns an ordered range of all the templates matching the group, class 728 * name ID, class PK, type, and mode, and matching the keywords in the 729 * template names and descriptions. 730 * 731 * <p> 732 * Useful when paginating results. Returns a maximum of <code>end - 733 * start</code> instances. <code>start</code> and <code>end</code> are not 734 * primary keys, they are indexes in the result set. Thus, <code>0</code> 735 * refers to the first result in the set. Setting both <code>start</code> 736 * and <code>end</code> to {@link 737 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 738 * result set. 739 * </p> 740 * 741 * @param companyId the primary key of the template's company 742 * @param groupId the primary key of the group 743 * @param classNameId the primary key of the class name for the template's 744 related model 745 * @param classPK the primary key of the template's related entity 746 * @param keywords the keywords (space separated), which may occur in the 747 template's name or description (optionally <code>null</code>) 748 * @param type the template's type (optionally <code>null</code>). For more 749 information, see {@link 750 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 751 * @param mode the template's mode (optionally <code>null</code>). For more 752 information, see {@link 753 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 754 * @param start the lower bound of the range of templates to return 755 * @param end the upper bound of the range of templates to return (not 756 inclusive) 757 * @param orderByComparator the comparator to order the templates 758 (optionally <code>null</code>) 759 * @return the range of matching templates ordered by the comparator 760 */ 761 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 762 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 763 long companyId, long groupId, long classNameId, long classPK, 764 java.lang.String keywords, java.lang.String type, 765 java.lang.String mode, int start, int end, 766 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 767 768 /** 769 * Returns an ordered range of all the templates matching the group, class 770 * name ID, class PK, name keyword, description keyword, type, mode, and 771 * language. 772 * 773 * <p> 774 * Useful when paginating results. Returns a maximum of <code>end - 775 * start</code> instances. <code>start</code> and <code>end</code> are not 776 * primary keys, they are indexes in the result set. Thus, <code>0</code> 777 * refers to the first result in the set. Setting both <code>start</code> 778 * and <code>end</code> to {@link 779 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 780 * result set. 781 * </p> 782 * 783 * @param companyId the primary key of the template's company 784 * @param groupId the primary key of the group 785 * @param classNameId the primary key of the class name for the template's 786 related model 787 * @param classPK the primary key of the template's related entity 788 * @param name the name keywords (optionally <code>null</code>) 789 * @param description the description keywords (optionally 790 <code>null</code>) 791 * @param type the template's type (optionally <code>null</code>). For more 792 information, see {@link 793 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 794 * @param mode the template's mode (optionally <code>null</code>). For more 795 information, see {@link 796 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 797 * @param language the template's script language (optionally 798 <code>null</code>). For more information, see {@link 799 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 800 * @param andOperator whether every field must match its keywords, or just 801 one field 802 * @param start the lower bound of the range of templates to return 803 * @param end the upper bound of the range of templates to return (not 804 inclusive) 805 * @param orderByComparator the comparator to order the templates 806 (optionally <code>null</code>) 807 * @return the range of matching templates ordered by the comparator 808 */ 809 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 810 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 811 long companyId, long groupId, long classNameId, long classPK, 812 java.lang.String name, java.lang.String description, 813 java.lang.String type, java.lang.String mode, 814 java.lang.String language, boolean andOperator, int start, int end, 815 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 816 817 /** 818 * Returns an ordered range of all the templates matching the group IDs, 819 * class Name IDs, class PK, type, and mode, and include the keywords on its 820 * names and descriptions. 821 * 822 * <p> 823 * Useful when paginating results. Returns a maximum of <code>end - 824 * start</code> instances. <code>start</code> and <code>end</code> are not 825 * primary keys, they are indexes in the result set. Thus, <code>0</code> 826 * refers to the first result in the set. Setting both <code>start</code> 827 * and <code>end</code> to {@link 828 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 829 * result set. 830 * </p> 831 * 832 * @param companyId the primary key of the template's company 833 * @param groupIds the primary keys of the groups 834 * @param classNameIds the primary keys of the entity's instances the 835 templates are related to 836 * @param classPKs the primary keys of the template's related entities 837 * @param keywords the keywords (space separated), which may occur in the 838 template's name or description (optionally <code>null</code>) 839 * @param type the template's type (optionally <code>null</code>). For more 840 information, see {@link 841 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 842 * @param mode the template's mode (optionally <code>null</code>). For more 843 information, see {@link 844 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 845 * @param start the lower bound of the range of templates to return 846 * @param end the upper bound of the range of templates to return (not 847 inclusive) 848 * @param orderByComparator the comparator to order the templates 849 (optionally <code>null</code>) 850 * @return the range of matching templates ordered by the comparator 851 */ 852 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 853 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 854 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 855 java.lang.String keywords, java.lang.String type, 856 java.lang.String mode, int start, int end, 857 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 858 859 /** 860 * Returns an ordered range of all the templates matching the group IDs, 861 * class name IDs, class PK, name keyword, description keyword, type, mode, 862 * and language. 863 * 864 * <p> 865 * Useful when paginating results. Returns a maximum of <code>end - 866 * start</code> instances. <code>start</code> and <code>end</code> are not 867 * primary keys, they are indexes in the result set. Thus, <code>0</code> 868 * refers to the first result in the set. Setting both <code>start</code> 869 * and <code>end</code> to {@link 870 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 871 * result set. 872 * </p> 873 * 874 * @param companyId the primary key of the template's company 875 * @param groupIds the primary keys of the groups 876 * @param classNameIds the primary keys of the entity's instances the 877 templates are related to 878 * @param classPKs the primary keys of the template's related entities 879 * @param name the name keywords (optionally <code>null</code>) 880 * @param description the description keywords (optionally 881 <code>null</code>) 882 * @param type the template's type (optionally <code>null</code>). For more 883 information, see {@link 884 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 885 * @param mode the template's mode (optionally <code>null</code>). For more 886 information, see {@link 887 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 888 * @param language the template's script language (optionally 889 <code>null</code>). For more information, see {@link 890 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 891 * @param andOperator whether every field must match its keywords, or just 892 one field. 893 * @param start the lower bound of the range of templates to return 894 * @param end the upper bound of the range of templates to return (not 895 inclusive) 896 * @param orderByComparator the comparator to order the templates 897 (optionally <code>null</code>) 898 * @return the range of matching templates ordered by the comparator 899 */ 900 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 901 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 902 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 903 java.lang.String name, java.lang.String description, 904 java.lang.String type, java.lang.String mode, 905 java.lang.String language, boolean andOperator, int start, int end, 906 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 907 908 /** 909 * Returns the number of templates matching the group, class name ID, class 910 * PK, type, and matching the keywords in the template names and 911 * descriptions. 912 * 913 * @param companyId the primary key of the template's company 914 * @param groupId the primary key of the group 915 * @param classNameId the primary key of the class name for the template's 916 related model 917 * @param classPK the primary key of the template's related entity 918 * @param keywords the keywords (space separated), which may occur in the 919 template's name or description (optionally <code>null</code>) 920 * @param type the template's type (optionally <code>null</code>). For more 921 information, see {@link 922 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 923 * @param mode the template's mode (optionally <code>null</code>). For more 924 information, see {@link 925 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 926 * @return the number of matching templates 927 */ 928 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 929 public int searchCount(long companyId, long groupId, long classNameId, 930 long classPK, java.lang.String keywords, java.lang.String type, 931 java.lang.String mode); 932 933 /** 934 * Returns the number of templates matching the group, class name ID, class 935 * PK, name keyword, description keyword, type, mode, and language. 936 * 937 * @param companyId the primary key of the template's company 938 * @param groupId the primary key of the group 939 * @param classNameId the primary key of the class name for the template's 940 related model 941 * @param classPK the primary key of the template's related entity 942 * @param name the name keywords (optionally <code>null</code>) 943 * @param description the description keywords (optionally 944 <code>null</code>) 945 * @param type the template's type (optionally <code>null</code>). For more 946 information, see {@link 947 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 948 * @param mode the template's mode (optionally <code>null</code>). For more 949 information, see {@link 950 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 951 * @param language the template's script language (optionally 952 <code>null</code>). For more information, see {@link 953 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 954 * @param andOperator whether every field must match its keywords, or just 955 one field. 956 * @return the number of matching templates 957 */ 958 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 959 public int searchCount(long companyId, long groupId, long classNameId, 960 long classPK, java.lang.String name, java.lang.String description, 961 java.lang.String type, java.lang.String mode, 962 java.lang.String language, boolean andOperator); 963 964 /** 965 * Returns the number of templates matching the group IDs, class name IDs, 966 * class PK, type, and mode, and matching the keywords in the template names 967 * and descriptions. 968 * 969 * @param companyId the primary key of the template's company 970 * @param groupIds the primary keys of the groups 971 * @param classNameIds the primary keys of the entity's instance the 972 templates are related to 973 * @param classPKs the primary keys of the template's related entities 974 * @param keywords the keywords (space separated), which may occur in the 975 template's name or description (optionally <code>null</code>) 976 * @param type the template's type (optionally <code>null</code>). For more 977 information, see {@link 978 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 979 * @param mode the template's mode (optionally <code>null</code>). For more 980 information, see {@link 981 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 982 * @return the number of matching templates 983 */ 984 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 985 public int searchCount(long companyId, long[] groupIds, 986 long[] classNameIds, long[] classPKs, java.lang.String keywords, 987 java.lang.String type, java.lang.String mode); 988 989 /** 990 * Returns the number of templates matching the group IDs, class name IDs, 991 * class PKs, name keyword, description keyword, type, mode, and language. 992 * 993 * @param companyId the primary key of the templates company 994 * @param groupIds the primary keys of the groups 995 * @param classNameIds the primary keys of the entity's instance the 996 templates are related to 997 * @param classPKs the primary keys of the template's related entities 998 * @param name the name keywords (optionally <code>null</code>) 999 * @param description the description keywords (optionally 1000 <code>null</code>) 1001 * @param type the template's type (optionally <code>null</code>). For more 1002 information, see {@link 1003 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1004 * @param mode the template's mode (optionally <code>null</code>). For more 1005 information, see {@link 1006 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1007 * @param language the template's script language (optionally 1008 <code>null</code>). For more information, see {@link 1009 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1010 * @param andOperator whether every field must match its keywords, or just 1011 one field. 1012 * @return the number of matching templates 1013 */ 1014 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1015 public int searchCount(long companyId, long[] groupIds, 1016 long[] classNameIds, long[] classPKs, java.lang.String name, 1017 java.lang.String description, java.lang.String type, 1018 java.lang.String mode, java.lang.String language, boolean andOperator); 1019 1020 /** 1021 * Sets the Spring bean ID for this bean. 1022 * 1023 * @param beanIdentifier the Spring bean ID for this bean 1024 */ 1025 public void setBeanIdentifier(java.lang.String beanIdentifier); 1026 1027 /** 1028 * Updates the d d m template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1029 * 1030 * @param ddmTemplate the d d m template 1031 * @return the d d m template that was updated 1032 */ 1033 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 1034 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateDDMTemplate( 1035 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate); 1036 1037 /** 1038 * Updates the template matching the ID. 1039 * 1040 * @param templateId the primary key of the template 1041 * @param classPK the primary key of the template's related entity 1042 * @param nameMap the template's new locales and localized names 1043 * @param descriptionMap the template's new locales and localized 1044 description 1045 * @param type the template's type. For more information, see {@link 1046 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1047 * @param mode the template's mode. For more information, see {@link 1048 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1049 * @param language the template's script language. For more information, 1050 see {@link 1051 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1052 * @param script the template's script 1053 * @param cacheable whether the template is cacheable 1054 * @param serviceContext the service context to be applied. Can set the 1055 modification date. 1056 * @return the updated template 1057 * @throws PortalException if a portal exception occurred 1058 */ 1059 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 1060 long templateId, long classPK, 1061 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1062 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1063 java.lang.String type, java.lang.String mode, 1064 java.lang.String language, java.lang.String script, boolean cacheable, 1065 com.liferay.portal.service.ServiceContext serviceContext) 1066 throws com.liferay.portal.kernel.exception.PortalException; 1067 1068 /** 1069 * Updates the template matching the ID. 1070 * 1071 * @param templateId the primary key of the template 1072 * @param classPK the primary key of the template's related entity 1073 * @param nameMap the template's new locales and localized names 1074 * @param descriptionMap the template's new locales and localized 1075 description 1076 * @param type the template's type. For more information, see {@link 1077 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1078 * @param mode the template's mode. For more information, see {@link 1079 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1080 * @param language the template's script language. For more information, 1081 see {@link 1082 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1083 * @param script the template's script 1084 * @param cacheable whether the template is cacheable 1085 * @param smallImage whether the template has a small image 1086 * @param smallImageURL the template's small image URL (optionally 1087 <code>null</code>) 1088 * @param smallImageFile the template's small image file (optionally 1089 <code>null</code>) 1090 * @param serviceContext the service context to be applied. Can set the 1091 modification date. 1092 * @return the updated template 1093 * @throws PortalException if a portal exception occurred 1094 */ 1095 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 1096 long templateId, long classPK, 1097 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1098 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1099 java.lang.String type, java.lang.String mode, 1100 java.lang.String language, java.lang.String script, boolean cacheable, 1101 boolean smallImage, java.lang.String smallImageURL, 1102 java.io.File smallImageFile, 1103 com.liferay.portal.service.ServiceContext serviceContext) 1104 throws com.liferay.portal.kernel.exception.PortalException; 1105 }