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.exportimport.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the remote service utility for ExportImport. This utility wraps
024     * {@link com.liferay.portlet.exportimport.service.impl.ExportImportServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ExportImportService
032     * @see com.liferay.portlet.exportimport.service.base.ExportImportServiceBaseImpl
033     * @see com.liferay.portlet.exportimport.service.impl.ExportImportServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ExportImportServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.exportimport.service.impl.ExportImportServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static java.io.File exportLayoutsAsFile(
044                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().exportLayoutsAsFile(exportImportConfiguration);
047            }
048    
049            public static long exportLayoutsAsFileInBackground(
050                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration)
051                    throws com.liferay.portal.kernel.exception.PortalException {
052                    return getService()
053                                       .exportLayoutsAsFileInBackground(exportImportConfiguration);
054            }
055    
056            public static long exportLayoutsAsFileInBackground(
057                    long exportImportConfigurationId)
058                    throws com.liferay.portal.kernel.exception.PortalException {
059                    return getService()
060                                       .exportLayoutsAsFileInBackground(exportImportConfigurationId);
061            }
062    
063            public static java.io.File exportPortletInfoAsFile(
064                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    return getService().exportPortletInfoAsFile(exportImportConfiguration);
067            }
068    
069            public static long exportPortletInfoAsFileInBackground(
070                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService()
073                                       .exportPortletInfoAsFileInBackground(exportImportConfiguration);
074            }
075    
076            /**
077            * Returns the OSGi service identifier.
078            *
079            * @return the OSGi service identifier
080            */
081            public static java.lang.String getOSGiServiceIdentifier() {
082                    return getService().getOSGiServiceIdentifier();
083            }
084    
085            public static void importLayouts(
086                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
087                    java.io.File file)
088                    throws com.liferay.portal.kernel.exception.PortalException {
089                    getService().importLayouts(exportImportConfiguration, file);
090            }
091    
092            public static void importLayouts(
093                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
094                    java.io.InputStream inputStream)
095                    throws com.liferay.portal.kernel.exception.PortalException {
096                    getService().importLayouts(exportImportConfiguration, inputStream);
097            }
098    
099            public static long importLayoutsInBackground(
100                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
101                    java.io.File file)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService()
104                                       .importLayoutsInBackground(exportImportConfiguration, file);
105            }
106    
107            public static long importLayoutsInBackground(
108                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
109                    java.io.InputStream inputStream)
110                    throws com.liferay.portal.kernel.exception.PortalException {
111                    return getService()
112                                       .importLayoutsInBackground(exportImportConfiguration,
113                            inputStream);
114            }
115    
116            public static void importPortletInfo(
117                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
118                    java.io.File file)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    getService().importPortletInfo(exportImportConfiguration, file);
121            }
122    
123            public static void importPortletInfo(
124                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
125                    java.io.InputStream inputStream)
126                    throws com.liferay.portal.kernel.exception.PortalException {
127                    getService().importPortletInfo(exportImportConfiguration, inputStream);
128            }
129    
130            public static long importPortletInfoInBackground(
131                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
132                    java.io.File file)
133                    throws com.liferay.portal.kernel.exception.PortalException {
134                    return getService()
135                                       .importPortletInfoInBackground(exportImportConfiguration,
136                            file);
137            }
138    
139            public static long importPortletInfoInBackground(
140                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
141                    java.io.InputStream inputStream)
142                    throws com.liferay.portal.kernel.exception.PortalException {
143                    return getService()
144                                       .importPortletInfoInBackground(exportImportConfiguration,
145                            inputStream);
146            }
147    
148            public static com.liferay.portlet.exportimport.lar.MissingReferences validateImportLayoutsFile(
149                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
150                    java.io.File file)
151                    throws com.liferay.portal.kernel.exception.PortalException {
152                    return getService()
153                                       .validateImportLayoutsFile(exportImportConfiguration, file);
154            }
155    
156            public static com.liferay.portlet.exportimport.lar.MissingReferences validateImportLayoutsFile(
157                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
158                    java.io.InputStream inputStream)
159                    throws com.liferay.portal.kernel.exception.PortalException {
160                    return getService()
161                                       .validateImportLayoutsFile(exportImportConfiguration,
162                            inputStream);
163            }
164    
165            public static com.liferay.portlet.exportimport.lar.MissingReferences validateImportPortletInfo(
166                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
167                    java.io.File file)
168                    throws com.liferay.portal.kernel.exception.PortalException {
169                    return getService()
170                                       .validateImportPortletInfo(exportImportConfiguration, file);
171            }
172    
173            public static com.liferay.portlet.exportimport.lar.MissingReferences validateImportPortletInfo(
174                    com.liferay.portlet.exportimport.model.ExportImportConfiguration exportImportConfiguration,
175                    java.io.InputStream inputStream)
176                    throws com.liferay.portal.kernel.exception.PortalException {
177                    return getService()
178                                       .validateImportPortletInfo(exportImportConfiguration,
179                            inputStream);
180            }
181    
182            public static ExportImportService getService() {
183                    if (_service == null) {
184                            _service = (ExportImportService)PortalBeanLocatorUtil.locate(ExportImportService.class.getName());
185    
186                            ReferenceRegistry.registerReference(ExportImportServiceUtil.class,
187                                    "_service");
188                    }
189    
190                    return _service;
191            }
192    
193            private static ExportImportService _service;
194    }