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 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.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.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.model.Theme fetchTheme(long companyId,
055                    java.lang.String themeId) {
056                    return getService().fetchTheme(companyId, themeId);
057            }
058    
059            public static com.liferay.portal.model.ColorScheme getColorScheme(
060                    long companyId, java.lang.String themeId,
061                    java.lang.String colorSchemeId, boolean wapTheme) {
062                    return getService()
063                                       .getColorScheme(companyId, themeId, colorSchemeId, wapTheme);
064            }
065    
066            public static java.util.List<com.liferay.portal.model.Theme> getControlPanelThemes(
067                    long companyId, long userId, boolean wapTheme) {
068                    return getService().getControlPanelThemes(companyId, userId, wapTheme);
069            }
070    
071            /**
072            * Returns the OSGi service identifier.
073            *
074            * @return the OSGi service identifier
075            */
076            public static java.lang.String getOSGiServiceIdentifier() {
077                    return getService().getOSGiServiceIdentifier();
078            }
079    
080            public static java.util.List<com.liferay.portal.model.Theme> getPageThemes(
081                    long companyId, long groupId, long userId, boolean wapTheme) {
082                    return getService().getPageThemes(companyId, groupId, userId, wapTheme);
083            }
084    
085            public static com.liferay.portal.model.PortletDecorator getPortletDecorator(
086                    long companyId, java.lang.String themeId,
087                    java.lang.String portletDecoratorId) {
088                    return getService()
089                                       .getPortletDecorator(companyId, themeId, portletDecoratorId);
090            }
091    
092            public static com.liferay.portal.model.Theme getTheme(long companyId,
093                    java.lang.String themeId, boolean wapTheme) {
094                    return getService().getTheme(companyId, themeId, wapTheme);
095            }
096    
097            public static java.util.List<com.liferay.portal.model.Theme> getThemes(
098                    long companyId) {
099                    return getService().getThemes(companyId);
100            }
101    
102            /**
103            * @deprecated As of 7.0.0, replaced by {@link #getPageThemes}
104            */
105            @Deprecated
106            public static java.util.List<com.liferay.portal.model.Theme> getThemes(
107                    long companyId, long groupId, long userId, boolean wapTheme) {
108                    return getService().getThemes(companyId, groupId, userId, wapTheme);
109            }
110    
111            public static java.util.List<com.liferay.portal.model.Theme> getWARThemes() {
112                    return getService().getWARThemes();
113            }
114    
115            public static java.util.List<com.liferay.portal.model.Theme> init(
116                    javax.servlet.ServletContext servletContext,
117                    java.lang.String themesPath, boolean loadFromServletContext,
118                    java.lang.String[] xmls,
119                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
120                    return getService()
121                                       .init(servletContext, themesPath, loadFromServletContext,
122                            xmls, pluginPackage);
123            }
124    
125            public static java.util.List<com.liferay.portal.model.Theme> init(
126                    java.lang.String servletContextName,
127                    javax.servlet.ServletContext servletContext,
128                    java.lang.String themesPath, boolean loadFromServletContext,
129                    java.lang.String[] xmls,
130                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
131                    return getService()
132                                       .init(servletContextName, servletContext, themesPath,
133                            loadFromServletContext, xmls, pluginPackage);
134            }
135    
136            public static void uninstallThemes(
137                    java.util.List<com.liferay.portal.model.Theme> themes) {
138                    getService().uninstallThemes(themes);
139            }
140    
141            public static ThemeLocalService getService() {
142                    if (_service == null) {
143                            _service = (ThemeLocalService)PortalBeanLocatorUtil.locate(ThemeLocalService.class.getName());
144    
145                            ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
146                                    "_service");
147                    }
148    
149                    return _service;
150            }
151    
152            private static ThemeLocalService _service;
153    }