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.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.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.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.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, com.liferay.portal.service.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 void deleteLayoutPrototype(long layoutPrototypeId)
070                    throws com.liferay.portal.kernel.exception.PortalException {
071                    getService().deleteLayoutPrototype(layoutPrototypeId);
072            }
073    
074            public static com.liferay.portal.model.LayoutPrototype fetchLayoutPrototype(
075                    long layoutPrototypeId)
076                    throws com.liferay.portal.kernel.exception.PortalException {
077                    return getService().fetchLayoutPrototype(layoutPrototypeId);
078            }
079    
080            public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype(
081                    long layoutPrototypeId)
082                    throws com.liferay.portal.kernel.exception.PortalException {
083                    return getService().getLayoutPrototype(layoutPrototypeId);
084            }
085    
086            /**
087            * Returns the OSGi service identifier.
088            *
089            * @return the OSGi service identifier
090            */
091            public static java.lang.String getOSGiServiceIdentifier() {
092                    return getService().getOSGiServiceIdentifier();
093            }
094    
095            public static java.util.List<com.liferay.portal.model.LayoutPrototype> search(
096                    long companyId, java.lang.Boolean active,
097                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutPrototype> obc)
098                    throws com.liferay.portal.kernel.exception.PortalException {
099                    return getService().search(companyId, active, obc);
100            }
101    
102            /**
103            * @deprecated As of 7.0.0, replaced by {@link #updateLayoutPrototype(long,
104            Map, Map, boolean, ServiceContext)}
105            */
106            @Deprecated
107            public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
108                    long layoutPrototypeId,
109                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
110                    java.lang.String description, boolean active,
111                    com.liferay.portal.service.ServiceContext serviceContext)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService()
114                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
115                            description, active, serviceContext);
116            }
117    
118            public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
119                    long layoutPrototypeId,
120                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
121                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
122                    boolean active, com.liferay.portal.service.ServiceContext serviceContext)
123                    throws com.liferay.portal.kernel.exception.PortalException {
124                    return getService()
125                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
126                            descriptionMap, active, serviceContext);
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    }