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.PortletDecorator fetchPortletDecorator(
049                    long companyId, java.lang.String themeId, java.lang.String colorSchemeId) {
050                    return getService()
051                                       .fetchPortletDecorator(companyId, themeId, colorSchemeId);
052            }
053    
054            public static com.liferay.portal.kernel.model.Theme fetchTheme(
055                    long companyId, java.lang.String themeId) {
056                    return getService().fetchTheme(companyId, themeId);
057            }
058    
059            public static com.liferay.portal.kernel.model.ColorScheme getColorScheme(
060                    long companyId, java.lang.String themeId, java.lang.String colorSchemeId) {
061                    return getService().getColorScheme(companyId, themeId, colorSchemeId);
062            }
063    
064            public static java.util.List<com.liferay.portal.kernel.model.Theme> getControlPanelThemes(
065                    long companyId, long userId) {
066                    return getService().getControlPanelThemes(companyId, userId);
067            }
068    
069            /**
070            * Returns the OSGi service identifier.
071            *
072            * @return the OSGi service identifier
073            */
074            public static java.lang.String getOSGiServiceIdentifier() {
075                    return getService().getOSGiServiceIdentifier();
076            }
077    
078            public static java.util.List<com.liferay.portal.kernel.model.Theme> getPageThemes(
079                    long companyId, long groupId, long userId) {
080                    return getService().getPageThemes(companyId, groupId, userId);
081            }
082    
083            public static com.liferay.portal.kernel.model.PortletDecorator getPortletDecorator(
084                    long companyId, java.lang.String themeId,
085                    java.lang.String portletDecoratorId) {
086                    return getService()
087                                       .getPortletDecorator(companyId, themeId, portletDecoratorId);
088            }
089    
090            public static com.liferay.portal.kernel.model.Theme getTheme(
091                    long companyId, java.lang.String themeId) {
092                    return getService().getTheme(companyId, themeId);
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                    javax.servlet.ServletContext servletContext,
115                    java.lang.String themesPath, boolean loadFromServletContext,
116                    java.lang.String[] xmls,
117                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
118                    return getService()
119                                       .init(servletContext, themesPath, loadFromServletContext,
120                            xmls, pluginPackage);
121            }
122    
123            public static java.util.List<com.liferay.portal.kernel.model.Theme> init(
124                    java.lang.String servletContextName,
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(servletContextName, servletContext, themesPath,
131                            loadFromServletContext, 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    }