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 matching the dynamic query. 335 * 336 * @param dynamicQuery the dynamic query 337 * @return the number of rows matching 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 matching 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 matching 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 /** 462 * Returns all the d d m templates matching the UUID and company. 463 * 464 * @param uuid the UUID of the d d m templates 465 * @param companyId the primary key of the company 466 * @return the matching d d m templates, or an empty list if no matches were found 467 */ 468 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 469 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId( 470 java.lang.String uuid, long companyId); 471 472 /** 473 * Returns a range of d d m templates matching the UUID and company. 474 * 475 * @param uuid the UUID of the d d m templates 476 * @param companyId the primary key of the company 477 * @param start the lower bound of the range of d d m templates 478 * @param end the upper bound of the range of d d m templates (not inclusive) 479 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>) 480 * @return the range of matching d d m templates, or an empty list if no matches were found 481 */ 482 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 483 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getDDMTemplatesByUuidAndCompanyId( 484 java.lang.String uuid, long companyId, int start, int end, 485 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 486 487 /** 488 * Returns the number of d d m templates. 489 * 490 * @return the number of d d m templates 491 */ 492 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 493 public int getDDMTemplatesCount(); 494 495 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 496 public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery( 497 com.liferay.portal.kernel.lar.PortletDataContext portletDataContext); 498 499 @Override 500 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 501 public com.liferay.portal.model.PersistedModel getPersistedModel( 502 java.io.Serializable primaryKeyObj) 503 throws com.liferay.portal.kernel.exception.PortalException; 504 505 /** 506 * Returns the template matching the group and template key. 507 * 508 * @param groupId the primary key of the group 509 * @param classNameId the primary key of the class name for the template's 510 related model 511 * @param templateKey the unique string identifying the template 512 * @return the matching template 513 * @throws PortalException if a matching template could not be found 514 */ 515 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 516 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 517 long groupId, long classNameId, java.lang.String templateKey) 518 throws com.liferay.portal.kernel.exception.PortalException; 519 520 /** 521 * Returns the template matching the group and template key, optionally 522 * searching ancestor sites (that have sharing enabled) and global scoped 523 * sites. 524 * 525 * <p> 526 * This method first searches in the group. If the template is still not 527 * found and <code>includeAncestorTemplates</code> is set to 528 * <code>true</code>, this method searches the group's ancestor sites (that 529 * have sharing enabled) and lastly searches global scoped sites. 530 * </p> 531 * 532 * @param groupId the primary key of the group 533 * @param classNameId the primary key of the class name for the template's 534 related model 535 * @param templateKey the unique string identifying the template 536 * @param includeAncestorTemplates whether to include ancestor sites (that 537 have sharing enabled) and include global scoped sites in the 538 search in the search 539 * @return the matching template 540 * @throws PortalException if a matching template could not be found 541 */ 542 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 543 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 544 long groupId, long classNameId, java.lang.String templateKey, 545 boolean includeAncestorTemplates) 546 throws com.liferay.portal.kernel.exception.PortalException; 547 548 /** 549 * Returns the template with the ID. 550 * 551 * @param templateId the primary key of the template 552 * @return the template with the ID 553 * @throws PortalException if a matching template could not be found 554 */ 555 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 556 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( 557 long templateId) 558 throws com.liferay.portal.kernel.exception.PortalException; 559 560 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 561 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplateBySmallImageId( 562 long smallImageId) 563 throws com.liferay.portal.kernel.exception.PortalException; 564 565 /** 566 * Returns all the templates with the class PK. 567 * 568 * @param classPK the primary key of the template's related entity 569 * @return the templates with the class PK 570 */ 571 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 572 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 573 long classPK); 574 575 /** 576 * Returns all the templates matching the group and class name ID. 577 * 578 * @param groupId the primary key of the group 579 * @param classNameId the primary key of the class name for the template's 580 related model 581 * @return the matching templates 582 */ 583 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 584 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 585 long groupId, long classNameId); 586 587 /** 588 * Returns all the templates matching the group, class name ID, and class 589 * PK. 590 * 591 * @param groupId the primary key of the group 592 * @param classNameId the primary key of the class name for the template's 593 related model 594 * @param classPK the primary key of the template's related entity 595 * @return the matching templates 596 */ 597 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 598 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 599 long groupId, long classNameId, long classPK); 600 601 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 602 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 603 long groupId, long classNameId, long classPK, 604 boolean includeAncestorTemplates) 605 throws com.liferay.portal.kernel.exception.PortalException; 606 607 /** 608 * Returns all the templates matching the group, class name ID, class PK, 609 * and type. 610 * 611 * @param groupId the primary key of the group 612 * @param classNameId the primary key of the class name for the template's 613 related model 614 * @param classPK the primary key of the template's related entity 615 * @param type the template's type. For more information, see {@link 616 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 617 * @return the matching templates 618 */ 619 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 620 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 621 long groupId, long classNameId, long classPK, java.lang.String type); 622 623 /** 624 * Returns all the templates matching the group, class name ID, class PK, 625 * type, and mode. 626 * 627 * @param groupId the primary key of the group 628 * @param classNameId the primary key of the class name for the template's 629 related model 630 * @param classPK the primary key of the template's related entity 631 * @param type the template's type. For more information, see {@link 632 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 633 * @param mode the template's mode. For more information, see {@link 634 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 635 * @return the matching templates 636 */ 637 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 638 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 639 long groupId, long classNameId, long classPK, java.lang.String type, 640 java.lang.String mode); 641 642 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 643 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates( 644 long[] groupIds, long classNameId, long classPK); 645 646 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 647 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 648 long groupId, long classPK); 649 650 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 651 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 652 long groupId, long classPK, int start, int end); 653 654 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 655 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByClassPK( 656 long[] groupIds, long classPK); 657 658 /** 659 * Returns the number of templates matching the group and class PK. 660 * 661 * @param groupId the primary key of the group 662 * @param classPK the primary key of the template's related entity 663 * @return the number of templates belonging to the group and class PK 664 */ 665 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 666 public int getTemplatesByClassPKCount(long groupId, long classPK); 667 668 /** 669 * Returns an ordered range of all the templates matching the group and 670 * structure class name ID. 671 * 672 * <p> 673 * Useful when paginating results. Returns a maximum of <code>end - 674 * start</code> instances. <code>start</code> and <code>end</code> are not 675 * primary keys, they are indexes in the result set. Thus, <code>0</code> 676 * refers to the first result in the set. Setting both <code>start</code> 677 * and <code>end</code> to {@link 678 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 679 * result set. 680 * </p> 681 * 682 * @param groupId the primary key of the group 683 * @param structureClassNameId the primary key of the class name for the 684 template's related structure 685 * @param start the lower bound of the range of templates to return 686 * @param end the upper bound of the range of templates to return (not 687 inclusive) 688 * @param orderByComparator the comparator to order the templates 689 (optionally <code>null</code>) 690 * @return the range of matching templates ordered by the comparator 691 */ 692 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 693 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplatesByStructureClassNameId( 694 long groupId, long structureClassNameId, int start, int end, 695 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 696 697 /** 698 * Returns the number of templates matching the group and structure class 699 * name ID, including Generic Templates. 700 * 701 * @param groupId the primary key of the group 702 * @param structureClassNameId the primary key of the class name for the 703 template's related structure 704 * @return the number of matching templates 705 */ 706 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 707 public int getTemplatesByStructureClassNameIdCount(long groupId, 708 long structureClassNameId); 709 710 /** 711 * Returns the number of templates belonging to the group. 712 * 713 * @param groupId the primary key of the group 714 * @return the number of templates belonging to the group 715 */ 716 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 717 public int getTemplatesCount(long groupId); 718 719 /** 720 * Returns the number of templates matching the group and class name ID. 721 * 722 * @param groupId the primary key of the group 723 * @param classNameId the primary key of the class name for the template's 724 related model 725 * @return the number of matching templates 726 */ 727 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 728 public int getTemplatesCount(long groupId, long classNameId); 729 730 /** 731 * Returns the number of templates matching the group, class name ID, and 732 * class PK. 733 * 734 * @param groupId the primary key of the group 735 * @param classNameId the primary key of the class name for the template's 736 related model 737 * @param classPK the primary key of the template's related entity 738 * @return the number of matching templates 739 */ 740 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 741 public int getTemplatesCount(long groupId, long classNameId, long classPK); 742 743 /** 744 * Returns an ordered range of all the templates matching the group, class 745 * name ID, class PK, type, and mode, and matching the keywords in the 746 * template names and descriptions. 747 * 748 * <p> 749 * Useful when paginating results. Returns a maximum of <code>end - 750 * start</code> instances. <code>start</code> and <code>end</code> are not 751 * primary keys, they are indexes in the result set. Thus, <code>0</code> 752 * refers to the first result in the set. Setting both <code>start</code> 753 * and <code>end</code> to {@link 754 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 755 * result set. 756 * </p> 757 * 758 * @param companyId the primary key of the template's company 759 * @param groupId the primary key of the group 760 * @param classNameId the primary key of the class name for the template's 761 related model 762 * @param classPK the primary key of the template's related entity 763 * @param keywords the keywords (space separated), which may occur in the 764 template's name or description (optionally <code>null</code>) 765 * @param type the template's type (optionally <code>null</code>). For more 766 information, see {@link 767 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 768 * @param mode the template's mode (optionally <code>null</code>). For more 769 information, see {@link 770 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 771 * @param start the lower bound of the range of templates to return 772 * @param end the upper bound of the range of templates to return (not 773 inclusive) 774 * @param orderByComparator the comparator to order the templates 775 (optionally <code>null</code>) 776 * @return the range of matching templates ordered by the comparator 777 */ 778 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 779 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 780 long companyId, long groupId, long classNameId, long classPK, 781 java.lang.String keywords, java.lang.String type, 782 java.lang.String mode, int start, int end, 783 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 784 785 /** 786 * Returns an ordered range of all the templates matching the group, class 787 * name ID, class PK, name keyword, description keyword, type, mode, and 788 * language. 789 * 790 * <p> 791 * Useful when paginating results. Returns a maximum of <code>end - 792 * start</code> instances. <code>start</code> and <code>end</code> are not 793 * primary keys, they are indexes in the result set. Thus, <code>0</code> 794 * refers to the first result in the set. Setting both <code>start</code> 795 * and <code>end</code> to {@link 796 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 797 * result set. 798 * </p> 799 * 800 * @param companyId the primary key of the template's company 801 * @param groupId the primary key of the group 802 * @param classNameId the primary key of the class name for the template's 803 related model 804 * @param classPK the primary key of the template's related entity 805 * @param name the name keywords (optionally <code>null</code>) 806 * @param description the description keywords (optionally 807 <code>null</code>) 808 * @param type the template's type (optionally <code>null</code>). For more 809 information, see {@link 810 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 811 * @param mode the template's mode (optionally <code>null</code>). For more 812 information, see {@link 813 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 814 * @param language the template's script language (optionally 815 <code>null</code>). For more information, see {@link 816 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 817 * @param andOperator whether every field must match its keywords, or just 818 one field 819 * @param start the lower bound of the range of templates to return 820 * @param end the upper bound of the range of templates to return (not 821 inclusive) 822 * @param orderByComparator the comparator to order the templates 823 (optionally <code>null</code>) 824 * @return the range of matching templates ordered by the comparator 825 */ 826 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 827 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 828 long companyId, long groupId, long classNameId, long classPK, 829 java.lang.String name, java.lang.String description, 830 java.lang.String type, java.lang.String mode, 831 java.lang.String language, boolean andOperator, int start, int end, 832 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 833 834 /** 835 * Returns an ordered range of all the templates matching the group IDs, 836 * class Name IDs, class PK, type, and mode, and include the keywords on its 837 * names and descriptions. 838 * 839 * <p> 840 * Useful when paginating results. Returns a maximum of <code>end - 841 * start</code> instances. <code>start</code> and <code>end</code> are not 842 * primary keys, they are indexes in the result set. Thus, <code>0</code> 843 * refers to the first result in the set. Setting both <code>start</code> 844 * and <code>end</code> to {@link 845 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 846 * result set. 847 * </p> 848 * 849 * @param companyId the primary key of the template's company 850 * @param groupIds the primary keys of the groups 851 * @param classNameIds the primary keys of the entity's instances the 852 templates are related to 853 * @param classPKs the primary keys of the template's related entities 854 * @param keywords the keywords (space separated), which may occur in the 855 template's name or description (optionally <code>null</code>) 856 * @param type the template's type (optionally <code>null</code>). For more 857 information, see {@link 858 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 859 * @param mode the template's mode (optionally <code>null</code>). For more 860 information, see {@link 861 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 862 * @param start the lower bound of the range of templates to return 863 * @param end the upper bound of the range of templates to return (not 864 inclusive) 865 * @param orderByComparator the comparator to order the templates 866 (optionally <code>null</code>) 867 * @return the range of matching templates ordered by the comparator 868 */ 869 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 870 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 871 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 872 java.lang.String keywords, java.lang.String type, 873 java.lang.String mode, int start, int end, 874 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 875 876 /** 877 * Returns an ordered range of all the templates matching the group IDs, 878 * class name IDs, class PK, name keyword, description keyword, type, mode, 879 * and language. 880 * 881 * <p> 882 * Useful when paginating results. Returns a maximum of <code>end - 883 * start</code> instances. <code>start</code> and <code>end</code> are not 884 * primary keys, they are indexes in the result set. Thus, <code>0</code> 885 * refers to the first result in the set. Setting both <code>start</code> 886 * and <code>end</code> to {@link 887 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 888 * result set. 889 * </p> 890 * 891 * @param companyId the primary key of the template's company 892 * @param groupIds the primary keys of the groups 893 * @param classNameIds the primary keys of the entity's instances the 894 templates are related to 895 * @param classPKs the primary keys of the template's related entities 896 * @param name the name keywords (optionally <code>null</code>) 897 * @param description the description keywords (optionally 898 <code>null</code>) 899 * @param type the template's type (optionally <code>null</code>). For more 900 information, see {@link 901 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 902 * @param mode the template's mode (optionally <code>null</code>). For more 903 information, see {@link 904 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 905 * @param language the template's script language (optionally 906 <code>null</code>). For more information, see {@link 907 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 908 * @param andOperator whether every field must match its keywords, or just 909 one field. 910 * @param start the lower bound of the range of templates to return 911 * @param end the upper bound of the range of templates to return (not 912 inclusive) 913 * @param orderByComparator the comparator to order the templates 914 (optionally <code>null</code>) 915 * @return the range of matching templates ordered by the comparator 916 */ 917 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 918 public java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search( 919 long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, 920 java.lang.String name, java.lang.String description, 921 java.lang.String type, java.lang.String mode, 922 java.lang.String language, boolean andOperator, int start, int end, 923 com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> orderByComparator); 924 925 /** 926 * Returns the number of templates matching the group, class name ID, class 927 * PK, type, and matching the keywords in the template names and 928 * descriptions. 929 * 930 * @param companyId the primary key of the template's company 931 * @param groupId the primary key of the group 932 * @param classNameId the primary key of the class name for the template's 933 related model 934 * @param classPK the primary key of the template's related entity 935 * @param keywords the keywords (space separated), which may occur in the 936 template's name or description (optionally <code>null</code>) 937 * @param type the template's type (optionally <code>null</code>). For more 938 information, see {@link 939 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 940 * @param mode the template's mode (optionally <code>null</code>). For more 941 information, see {@link 942 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 943 * @return the number of matching templates 944 */ 945 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 946 public int searchCount(long companyId, long groupId, long classNameId, 947 long classPK, java.lang.String keywords, java.lang.String type, 948 java.lang.String mode); 949 950 /** 951 * Returns the number of templates matching the group, class name ID, class 952 * PK, name keyword, description keyword, type, mode, and language. 953 * 954 * @param companyId the primary key of the template's company 955 * @param groupId the primary key of the group 956 * @param classNameId the primary key of the class name for the template's 957 related model 958 * @param classPK the primary key of the template's related entity 959 * @param name the name keywords (optionally <code>null</code>) 960 * @param description the description keywords (optionally 961 <code>null</code>) 962 * @param type the template's type (optionally <code>null</code>). For more 963 information, see {@link 964 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 965 * @param mode the template's mode (optionally <code>null</code>). For more 966 information, see {@link 967 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 968 * @param language the template's script language (optionally 969 <code>null</code>). For more information, see {@link 970 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 971 * @param andOperator whether every field must match its keywords, or just 972 one field. 973 * @return the number of matching templates 974 */ 975 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 976 public int searchCount(long companyId, long groupId, long classNameId, 977 long classPK, java.lang.String name, java.lang.String description, 978 java.lang.String type, java.lang.String mode, 979 java.lang.String language, boolean andOperator); 980 981 /** 982 * Returns the number of templates matching the group IDs, class name IDs, 983 * class PK, type, and mode, and matching the keywords in the template names 984 * and descriptions. 985 * 986 * @param companyId the primary key of the template's company 987 * @param groupIds the primary keys of the groups 988 * @param classNameIds the primary keys of the entity's instance the 989 templates are related to 990 * @param classPKs the primary keys of the template's related entities 991 * @param keywords the keywords (space separated), which may occur in the 992 template's name or description (optionally <code>null</code>) 993 * @param type the template's type (optionally <code>null</code>). For more 994 information, see {@link 995 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 996 * @param mode the template's mode (optionally <code>null</code>). For more 997 information, see {@link 998 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 999 * @return the number of matching templates 1000 */ 1001 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1002 public int searchCount(long companyId, long[] groupIds, 1003 long[] classNameIds, long[] classPKs, java.lang.String keywords, 1004 java.lang.String type, java.lang.String mode); 1005 1006 /** 1007 * Returns the number of templates matching the group IDs, class name IDs, 1008 * class PKs, name keyword, description keyword, type, mode, and language. 1009 * 1010 * @param companyId the primary key of the templates company 1011 * @param groupIds the primary keys of the groups 1012 * @param classNameIds the primary keys of the entity's instance the 1013 templates are related to 1014 * @param classPKs the primary keys of the template's related entities 1015 * @param name the name keywords (optionally <code>null</code>) 1016 * @param description the description keywords (optionally 1017 <code>null</code>) 1018 * @param type the template's type (optionally <code>null</code>). For more 1019 information, see {@link 1020 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1021 * @param mode the template's mode (optionally <code>null</code>). For more 1022 information, see {@link 1023 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1024 * @param language the template's script language (optionally 1025 <code>null</code>). For more information, see {@link 1026 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1027 * @param andOperator whether every field must match its keywords, or just 1028 one field. 1029 * @return the number of matching templates 1030 */ 1031 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) 1032 public int searchCount(long companyId, long[] groupIds, 1033 long[] classNameIds, long[] classPKs, java.lang.String name, 1034 java.lang.String description, java.lang.String type, 1035 java.lang.String mode, java.lang.String language, boolean andOperator); 1036 1037 /** 1038 * Sets the Spring bean ID for this bean. 1039 * 1040 * @param beanIdentifier the Spring bean ID for this bean 1041 */ 1042 public void setBeanIdentifier(java.lang.String beanIdentifier); 1043 1044 /** 1045 * Updates the d d m template in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. 1046 * 1047 * @param ddmTemplate the d d m template 1048 * @return the d d m template that was updated 1049 */ 1050 @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX) 1051 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateDDMTemplate( 1052 com.liferay.portlet.dynamicdatamapping.model.DDMTemplate ddmTemplate); 1053 1054 /** 1055 * Updates the template matching the ID. 1056 * 1057 * @param templateId the primary key of the template 1058 * @param classPK the primary key of the template's related entity 1059 * @param nameMap the template's new locales and localized names 1060 * @param descriptionMap the template's new locales and localized 1061 description 1062 * @param type the template's type. For more information, see {@link 1063 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1064 * @param mode the template's mode. For more information, see {@link 1065 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1066 * @param language the template's script language. For more information, 1067 see {@link 1068 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1069 * @param script the template's script 1070 * @param cacheable whether the template is cacheable 1071 * @param serviceContext the service context to be applied. Can set the 1072 modification date. 1073 * @return the updated template 1074 * @throws PortalException if a portal exception occurred 1075 */ 1076 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 1077 long templateId, long classPK, 1078 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1079 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1080 java.lang.String type, java.lang.String mode, 1081 java.lang.String language, java.lang.String script, boolean cacheable, 1082 com.liferay.portal.service.ServiceContext serviceContext) 1083 throws com.liferay.portal.kernel.exception.PortalException; 1084 1085 /** 1086 * Updates the template matching the ID. 1087 * 1088 * @param templateId the primary key of the template 1089 * @param classPK the primary key of the template's related entity 1090 * @param nameMap the template's new locales and localized names 1091 * @param descriptionMap the template's new locales and localized 1092 description 1093 * @param type the template's type. For more information, see {@link 1094 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1095 * @param mode the template's mode. For more information, see {@link 1096 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1097 * @param language the template's script language. For more information, 1098 see {@link 1099 com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. 1100 * @param script the template's script 1101 * @param cacheable whether the template is cacheable 1102 * @param smallImage whether the template has a small image 1103 * @param smallImageURL the template's small image URL (optionally 1104 <code>null</code>) 1105 * @param smallImageFile the template's small image file (optionally 1106 <code>null</code>) 1107 * @param serviceContext the service context to be applied. Can set the 1108 modification date. 1109 * @return the updated template 1110 * @throws PortalException if a portal exception occurred 1111 */ 1112 public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( 1113 long templateId, long classPK, 1114 java.util.Map<java.util.Locale, java.lang.String> nameMap, 1115 java.util.Map<java.util.Locale, java.lang.String> descriptionMap, 1116 java.lang.String type, java.lang.String mode, 1117 java.lang.String language, java.lang.String script, boolean cacheable, 1118 boolean smallImage, java.lang.String smallImageURL, 1119 java.io.File smallImageFile, 1120 com.liferay.portal.service.ServiceContext serviceContext) 1121 throws com.liferay.portal.kernel.exception.PortalException; 1122 }