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