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.portal.kernel.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 LayoutPrototype. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutPrototypeServiceImpl} 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 LayoutPrototypeService
032     * @see com.liferay.portal.service.base.LayoutPrototypeServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutPrototypeServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutPrototypeServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutPrototypeServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * @deprecated As of 7.0.0, replaced by {@link #addLayoutPrototype(Map, Map,
046            boolean, ServiceContext)}
047            */
048            @Deprecated
049            public static com.liferay.portal.kernel.model.LayoutPrototype addLayoutPrototype(
050                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
051                    java.lang.String description, boolean active,
052                    ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException {
054                    return getService()
055                                       .addLayoutPrototype(nameMap, description, active,
056                            serviceContext);
057            }
058    
059            public static com.liferay.portal.kernel.model.LayoutPrototype addLayoutPrototype(
060                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
061                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
062                    boolean active, ServiceContext serviceContext)
063                    throws com.liferay.portal.kernel.exception.PortalException {
064                    return getService()
065                                       .addLayoutPrototype(nameMap, descriptionMap, active,
066                            serviceContext);
067            }
068    
069            public static com.liferay.portal.kernel.model.LayoutPrototype fetchLayoutPrototype(
070                    long layoutPrototypeId)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    return getService().fetchLayoutPrototype(layoutPrototypeId);
073            }
074    
075            public static com.liferay.portal.kernel.model.LayoutPrototype getLayoutPrototype(
076                    long layoutPrototypeId)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    return getService().getLayoutPrototype(layoutPrototypeId);
079            }
080    
081            /**
082            * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long,
083            Map, Map, boolean, ServiceContext)}
084            */
085            @Deprecated
086            public static com.liferay.portal.kernel.model.LayoutPrototype updateLayoutPrototype(
087                    long layoutPrototypeId,
088                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
089                    java.lang.String description, boolean active,
090                    ServiceContext serviceContext)
091                    throws com.liferay.portal.kernel.exception.PortalException {
092                    return getService()
093                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
094                            description, active, serviceContext);
095            }
096    
097            public static com.liferay.portal.kernel.model.LayoutPrototype updateLayoutPrototype(
098                    long layoutPrototypeId,
099                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
100                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
101                    boolean active, ServiceContext serviceContext)
102                    throws com.liferay.portal.kernel.exception.PortalException {
103                    return getService()
104                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
105                            descriptionMap, active, serviceContext);
106            }
107    
108            /**
109            * Returns the OSGi service identifier.
110            *
111            * @return the OSGi service identifier
112            */
113            public static java.lang.String getOSGiServiceIdentifier() {
114                    return getService().getOSGiServiceIdentifier();
115            }
116    
117            public static java.util.List<com.liferay.portal.kernel.model.LayoutPrototype> search(
118                    long companyId, java.lang.Boolean active,
119                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutPrototype> obc)
120                    throws com.liferay.portal.kernel.exception.PortalException {
121                    return getService().search(companyId, active, obc);
122            }
123    
124            public static void deleteLayoutPrototype(long layoutPrototypeId)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    getService().deleteLayoutPrototype(layoutPrototypeId);
127            }
128    
129            public static LayoutPrototypeService getService() {
130                    if (_service == null) {
131                            _service = (LayoutPrototypeService)PortalBeanLocatorUtil.locate(LayoutPrototypeService.class.getName());
132    
133                            ReferenceRegistry.registerReference(LayoutPrototypeServiceUtil.class,
134                                    "_service");
135                    }
136    
137                    return _service;
138            }
139    
140            private static LayoutPrototypeService _service;
141    }