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