001    /**
002     * Copyright (c) 2000-2013 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 remote service. This utility wraps {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
022     *
023     * <p>
024     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
025     * </p>
026     *
027     * @author Brian Wing Shun Chan
028     * @see DDMTemplateService
029     * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateServiceBaseImpl
030     * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl
031     * @generated
032     */
033    public class DDMTemplateServiceUtil {
034            /*
035             * NOTE FOR DEVELOPERS:
036             *
037             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl} and rerun ServiceBuilder to regenerate this class.
038             */
039    
040            /**
041            * Returns the Spring bean ID for this bean.
042            *
043            * @return the Spring bean ID for this bean
044            */
045            public static java.lang.String getBeanIdentifier() {
046                    return getService().getBeanIdentifier();
047            }
048    
049            /**
050            * Sets the Spring bean ID for this bean.
051            *
052            * @param beanIdentifier the Spring bean ID for this bean
053            */
054            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
055                    getService().setBeanIdentifier(beanIdentifier);
056            }
057    
058            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
059                    long groupId, long structureId,
060                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
061                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062                    java.lang.String type, java.lang.String mode,
063                    java.lang.String language, java.lang.String script,
064                    com.liferay.portal.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException,
066                            com.liferay.portal.kernel.exception.SystemException {
067                    return getService()
068                                       .addTemplate(groupId, structureId, nameMap, descriptionMap,
069                            type, mode, language, script, serviceContext);
070            }
071    
072            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> copyTemplates(
073                    long structureId, long newStructureId, java.lang.String type,
074                    com.liferay.portal.service.ServiceContext serviceContext)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    return getService()
078                                       .copyTemplates(structureId, newStructureId, type,
079                            serviceContext);
080            }
081    
082            public static void deleteTemplate(long templateId)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    getService().deleteTemplate(templateId);
086            }
087    
088            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
089                    long templateId)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return getService().getTemplate(templateId);
093            }
094    
095            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> getTemplates(
096                    long structureId, java.lang.String type, java.lang.String mode)
097                    throws com.liferay.portal.kernel.exception.SystemException {
098                    return getService().getTemplates(structureId, type, mode);
099            }
100    
101            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
102                    long companyId, long groupId, long structureId,
103                    java.lang.String keywords, java.lang.String type,
104                    java.lang.String mode, int start, int end,
105                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
106                    throws com.liferay.portal.kernel.exception.SystemException {
107                    return getService()
108                                       .search(companyId, groupId, structureId, keywords, type,
109                            mode, start, end, orderByComparator);
110            }
111    
112            public static java.util.List<com.liferay.portlet.dynamicdatamapping.model.DDMTemplate> search(
113                    long companyId, long groupId, long structureId, java.lang.String name,
114                    java.lang.String description, java.lang.String type,
115                    java.lang.String mode, java.lang.String language, boolean andOperator,
116                    int start, int end,
117                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
118                    throws com.liferay.portal.kernel.exception.SystemException {
119                    return getService()
120                                       .search(companyId, groupId, structureId, name, description,
121                            type, mode, language, andOperator, start, end, orderByComparator);
122            }
123    
124            public static int searchCount(long companyId, long groupId,
125                    long structureId, java.lang.String keywords, java.lang.String type,
126                    java.lang.String mode)
127                    throws com.liferay.portal.kernel.exception.SystemException {
128                    return getService()
129                                       .searchCount(companyId, groupId, structureId, keywords,
130                            type, mode);
131            }
132    
133            public static int searchCount(long companyId, long groupId,
134                    long structureId, java.lang.String name, java.lang.String description,
135                    java.lang.String type, java.lang.String mode,
136                    java.lang.String language, boolean andOperator)
137                    throws com.liferay.portal.kernel.exception.SystemException {
138                    return getService()
139                                       .searchCount(companyId, groupId, structureId, name,
140                            description, type, mode, language, andOperator);
141            }
142    
143            public static com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate(
144                    long templateId,
145                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
146                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
147                    java.lang.String type, java.lang.String mode,
148                    java.lang.String language, java.lang.String script,
149                    com.liferay.portal.service.ServiceContext serviceContext)
150                    throws com.liferay.portal.kernel.exception.PortalException,
151                            com.liferay.portal.kernel.exception.SystemException {
152                    return getService()
153                                       .updateTemplate(templateId, nameMap, descriptionMap, type,
154                            mode, language, script, serviceContext);
155            }
156    
157            public static DDMTemplateService getService() {
158                    if (_service == null) {
159                            _service = (DDMTemplateService)PortalBeanLocatorUtil.locate(DDMTemplateService.class.getName());
160    
161                            ReferenceRegistry.registerReference(DDMTemplateServiceUtil.class,
162                                    "_service");
163                    }
164    
165                    return _service;
166            }
167    
168            /**
169             * @deprecated
170             */
171            public void setService(DDMTemplateService service) {
172            }
173    
174            private static DDMTemplateService _service;
175    }