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                    com.liferay.portal.kernel.service.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,
063                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
064                    throws com.liferay.portal.kernel.exception.PortalException {
065                    return getService()
066                                       .addLayoutPrototype(nameMap, descriptionMap, active,
067                            serviceContext);
068            }
069    
070            public static void deleteLayoutPrototype(long layoutPrototypeId)
071                    throws com.liferay.portal.kernel.exception.PortalException {
072                    getService().deleteLayoutPrototype(layoutPrototypeId);
073            }
074    
075            public static com.liferay.portal.kernel.model.LayoutPrototype fetchLayoutPrototype(
076                    long layoutPrototypeId)
077                    throws com.liferay.portal.kernel.exception.PortalException {
078                    return getService().fetchLayoutPrototype(layoutPrototypeId);
079            }
080    
081            public static com.liferay.portal.kernel.model.LayoutPrototype getLayoutPrototype(
082                    long layoutPrototypeId)
083                    throws com.liferay.portal.kernel.exception.PortalException {
084                    return getService().getLayoutPrototype(layoutPrototypeId);
085            }
086    
087            /**
088            * Returns the OSGi service identifier.
089            *
090            * @return the OSGi service identifier
091            */
092            public static java.lang.String getOSGiServiceIdentifier() {
093                    return getService().getOSGiServiceIdentifier();
094            }
095    
096            public static java.util.List<com.liferay.portal.kernel.model.LayoutPrototype> search(
097                    long companyId, java.lang.Boolean active,
098                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutPrototype> obc)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    return getService().search(companyId, active, obc);
101            }
102    
103            /**
104            * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long,
105            Map, Map, boolean, ServiceContext)}
106            */
107            @Deprecated
108            public static com.liferay.portal.kernel.model.LayoutPrototype updateLayoutPrototype(
109                    long layoutPrototypeId,
110                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
111                    java.lang.String description, boolean active,
112                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService()
115                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
116                            description, active, serviceContext);
117            }
118    
119            public static com.liferay.portal.kernel.model.LayoutPrototype updateLayoutPrototype(
120                    long layoutPrototypeId,
121                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
122                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
123                    boolean active,
124                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    return getService()
127                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
128                            descriptionMap, active, serviceContext);
129            }
130    
131            public static LayoutPrototypeService getService() {
132                    if (_service == null) {
133                            _service = (LayoutPrototypeService)PortalBeanLocatorUtil.locate(LayoutPrototypeService.class.getName());
134    
135                            ReferenceRegistry.registerReference(LayoutPrototypeServiceUtil.class,
136                                    "_service");
137                    }
138    
139                    return _service;
140            }
141    
142            private static LayoutPrototypeService _service;
143    }