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