001    /**
002     * Copyright (c) 2000-2012 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the layout prototype remote service. This utility wraps {@link com.liferay.portal.service.impl.LayoutPrototypeServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * 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.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see LayoutPrototypeService
030     * @see com.liferay.portal.service.base.LayoutPrototypeServiceBaseImpl
031     * @see com.liferay.portal.service.impl.LayoutPrototypeServiceImpl
032     * @generated
033     */
034    public class LayoutPrototypeServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutPrototypeServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portal.model.LayoutPrototype addLayoutPrototype(
041                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
042                    java.lang.String description, boolean active)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    return getService().addLayoutPrototype(nameMap, description, active);
046            }
047    
048            public static void deleteLayoutPrototype(long layoutPrototypeId)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    getService().deleteLayoutPrototype(layoutPrototypeId);
052            }
053    
054            public static com.liferay.portal.model.LayoutPrototype getLayoutPrototype(
055                    long layoutPrototypeId)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService().getLayoutPrototype(layoutPrototypeId);
059            }
060    
061            public static java.util.List<com.liferay.portal.model.LayoutPrototype> search(
062                    long companyId, java.lang.Boolean active,
063                    com.liferay.portal.kernel.util.OrderByComparator obc)
064                    throws com.liferay.portal.kernel.exception.PortalException,
065                            com.liferay.portal.kernel.exception.SystemException {
066                    return getService().search(companyId, active, obc);
067            }
068    
069            public static com.liferay.portal.model.LayoutPrototype updateLayoutPrototype(
070                    long layoutPrototypeId,
071                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
072                    java.lang.String description, boolean active)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService()
076                                       .updateLayoutPrototype(layoutPrototypeId, nameMap,
077                            description, active);
078            }
079    
080            public static LayoutPrototypeService getService() {
081                    if (_service == null) {
082                            _service = (LayoutPrototypeService)PortalBeanLocatorUtil.locate(LayoutPrototypeService.class.getName());
083    
084                            ReferenceRegistry.registerReference(LayoutPrototypeServiceUtil.class,
085                                    "_service");
086                            MethodCache.remove(LayoutPrototypeService.class);
087                    }
088    
089                    return _service;
090            }
091    
092            public void setService(LayoutPrototypeService service) {
093                    MethodCache.remove(LayoutPrototypeService.class);
094    
095                    _service = service;
096    
097                    ReferenceRegistry.registerReference(LayoutPrototypeServiceUtil.class,
098                            "_service");
099                    MethodCache.remove(LayoutPrototypeService.class);
100            }
101    
102            private static LayoutPrototypeService _service;
103    }