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 local service utility for Theme. This utility wraps
024     * {@link com.liferay.portal.service.impl.ThemeLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see ThemeLocalService
032     * @see com.liferay.portal.service.base.ThemeLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ThemeLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class ThemeLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.ThemeLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.kernel.model.ColorScheme fetchColorScheme(
044                    long companyId, java.lang.String themeId, java.lang.String colorSchemeId) {
045                    return getService().fetchColorScheme(companyId, themeId, colorSchemeId);
046            }
047    
048            public static com.liferay.portal.kernel.model.ColorScheme getColorScheme(
049                    long companyId, java.lang.String themeId, java.lang.String colorSchemeId) {
050                    return getService().getColorScheme(companyId, themeId, colorSchemeId);
051            }
052    
053            public static com.liferay.portal.kernel.model.PortletDecorator fetchPortletDecorator(
054                    long companyId, java.lang.String themeId, java.lang.String colorSchemeId) {
055                    return getService()
056                                       .fetchPortletDecorator(companyId, themeId, colorSchemeId);
057            }
058    
059            public static com.liferay.portal.kernel.model.PortletDecorator getPortletDecorator(
060                    long companyId, java.lang.String themeId,
061                    java.lang.String portletDecoratorId) {
062                    return getService()
063                                       .getPortletDecorator(companyId, themeId, portletDecoratorId);
064            }
065    
066            public static com.liferay.portal.kernel.model.Theme fetchTheme(
067                    long companyId, java.lang.String themeId) {
068                    return getService().fetchTheme(companyId, themeId);
069            }
070    
071            public static com.liferay.portal.kernel.model.Theme getTheme(
072                    long companyId, java.lang.String themeId) {
073                    return getService().getTheme(companyId, themeId);
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 java.util.List<com.liferay.portal.kernel.model.Theme> getControlPanelThemes(
086                    long companyId, long userId) {
087                    return getService().getControlPanelThemes(companyId, userId);
088            }
089    
090            public static java.util.List<com.liferay.portal.kernel.model.Theme> getPageThemes(
091                    long companyId, long groupId, long userId) {
092                    return getService().getPageThemes(companyId, groupId, userId);
093            }
094    
095            public static java.util.List<com.liferay.portal.kernel.model.Theme> getThemes(
096                    long companyId) {
097                    return getService().getThemes(companyId);
098            }
099    
100            /**
101            * @deprecated As of 7.0.0, replaced by {@link #getPageThemes}
102            */
103            @Deprecated
104            public static java.util.List<com.liferay.portal.kernel.model.Theme> getThemes(
105                    long companyId, long groupId, long userId, boolean wapTheme) {
106                    return getService().getThemes(companyId, groupId, userId, wapTheme);
107            }
108    
109            public static java.util.List<com.liferay.portal.kernel.model.Theme> getWARThemes() {
110                    return getService().getWARThemes();
111            }
112    
113            public static java.util.List<com.liferay.portal.kernel.model.Theme> init(
114                    java.lang.String servletContextName,
115                    javax.servlet.ServletContext servletContext,
116                    java.lang.String themesPath, boolean loadFromServletContext,
117                    java.lang.String[] xmls,
118                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
119                    return getService()
120                                       .init(servletContextName, servletContext, themesPath,
121                            loadFromServletContext, xmls, pluginPackage);
122            }
123    
124            public static java.util.List<com.liferay.portal.kernel.model.Theme> init(
125                    javax.servlet.ServletContext servletContext,
126                    java.lang.String themesPath, boolean loadFromServletContext,
127                    java.lang.String[] xmls,
128                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
129                    return getService()
130                                       .init(servletContext, themesPath, loadFromServletContext,
131                            xmls, pluginPackage);
132            }
133    
134            public static void uninstallThemes(
135                    java.util.List<com.liferay.portal.kernel.model.Theme> themes) {
136                    getService().uninstallThemes(themes);
137            }
138    
139            public static ThemeLocalService getService() {
140                    if (_service == null) {
141                            _service = (ThemeLocalService)PortalBeanLocatorUtil.locate(ThemeLocalService.class.getName());
142    
143                            ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
144                                    "_service");
145                    }
146    
147                    return _service;
148            }
149    
150            private static ThemeLocalService _service;
151    }