001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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 getColorScheme(
060                    long companyId, java.lang.String themeId,
061                    java.lang.String colorSchemeId, boolean wapTheme)
062                    throws com.liferay.portal.kernel.exception.SystemException {
063                    return getService()
064                                       .getColorScheme(companyId, themeId, colorSchemeId, wapTheme);
065            }
066    
067            public static com.liferay.portal.model.Theme getTheme(long companyId,
068                    java.lang.String themeId, boolean wapTheme)
069                    throws com.liferay.portal.kernel.exception.SystemException {
070                    return getService().getTheme(companyId, themeId, wapTheme);
071            }
072    
073            public static java.util.List<com.liferay.portal.model.Theme> getThemes(
074                    long companyId) {
075                    return getService().getThemes(companyId);
076            }
077    
078            public static java.util.List<com.liferay.portal.model.Theme> getThemes(
079                    long companyId, long groupId, long userId, boolean wapTheme)
080                    throws com.liferay.portal.kernel.exception.SystemException {
081                    return getService().getThemes(companyId, groupId, userId, wapTheme);
082            }
083    
084            public static java.util.List<com.liferay.portal.model.Theme> getWARThemes() {
085                    return getService().getWARThemes();
086            }
087    
088            public static java.util.List<java.lang.String> init(
089                    javax.servlet.ServletContext servletContext,
090                    java.lang.String themesPath, boolean loadFromServletContext,
091                    java.lang.String[] xmls,
092                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
093                    return getService()
094                                       .init(servletContext, themesPath, loadFromServletContext,
095                            xmls, pluginPackage);
096            }
097    
098            public static java.util.List<java.lang.String> init(
099                    java.lang.String servletContextName,
100                    javax.servlet.ServletContext servletContext,
101                    java.lang.String themesPath, boolean loadFromServletContext,
102                    java.lang.String[] xmls,
103                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage) {
104                    return getService()
105                                       .init(servletContextName, servletContext, themesPath,
106                            loadFromServletContext, xmls, pluginPackage);
107            }
108    
109            public static void uninstallThemes(
110                    java.util.List<java.lang.String> themeIds) {
111                    getService().uninstallThemes(themeIds);
112            }
113    
114            public static ThemeLocalService getService() {
115                    if (_service == null) {
116                            _service = (ThemeLocalService)PortalBeanLocatorUtil.locate(ThemeLocalService.class.getName());
117    
118                            ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
119                                    "_service");
120                            MethodCache.remove(ThemeLocalService.class);
121                    }
122    
123                    return _service;
124            }
125    
126            public void setService(ThemeLocalService service) {
127                    MethodCache.remove(ThemeLocalService.class);
128    
129                    _service = service;
130    
131                    ReferenceRegistry.registerReference(ThemeLocalServiceUtil.class,
132                            "_service");
133                    MethodCache.remove(ThemeLocalService.class);
134            }
135    
136            private static ThemeLocalService _service;
137    }