UserGroupServiceFactory.java |
1 /** 2 * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * of this software and associated documentation files (the "Software"), to deal 6 * in the Software without restriction, including without limitation the rights 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 * copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 * SOFTWARE. 21 */ 22 23 package com.liferay.portal.service; 24 25 import com.liferay.portal.kernel.bean.BeanLocatorUtil; 26 27 /** 28 * <a href="UserGroupServiceFactory.java.html"><b><i>View Source</i></b></a> 29 * 30 * <p> 31 * ServiceBuilder generated this class. Modifications in this class will be 32 * overwritten the next time is generated. 33 * </p> 34 * 35 * <p> 36 * This class is responsible for the lookup of the implementation for 37 * <code>com.liferay.portal.service.UserGroupService</code>. 38 * Spring manages the lookup and lifecycle of the beans. This means you can 39 * modify the Spring configuration files to return a different implementation or 40 * to inject additional behavior. 41 * </p> 42 * 43 * <p> 44 * See the <code>spring.configs</code> property in portal.properties for 45 * additional information on how to customize the Spring XML files. 46 * </p> 47 * 48 * @author Brian Wing Shun Chan 49 * 50 * @see com.liferay.portal.service.UserGroupService 51 * @see com.liferay.portal.service.UserGroupServiceUtil 52 * 53 */ 54 public class UserGroupServiceFactory { 55 public static UserGroupService getService() { 56 return _getFactory()._service; 57 } 58 59 public static UserGroupService getImpl() { 60 if (_impl == null) { 61 _impl = (UserGroupService)BeanLocatorUtil.locate(_IMPL); 62 } 63 64 return _impl; 65 } 66 67 public static UserGroupService getTxImpl() { 68 if (_txImpl == null) { 69 _txImpl = (UserGroupService)BeanLocatorUtil.locate(_TX_IMPL); 70 } 71 72 return _txImpl; 73 } 74 75 public void setService(UserGroupService service) { 76 _service = service; 77 } 78 79 private static UserGroupServiceFactory _getFactory() { 80 if (_factory == null) { 81 _factory = (UserGroupServiceFactory)BeanLocatorUtil.locate(_FACTORY); 82 } 83 84 return _factory; 85 } 86 87 private static final String _FACTORY = UserGroupServiceFactory.class.getName(); 88 private static final String _IMPL = UserGroupService.class.getName() + 89 ".impl"; 90 private static final String _TX_IMPL = UserGroupService.class.getName() + 91 ".transaction"; 92 private static UserGroupServiceFactory _factory; 93 private static UserGroupService _impl; 94 private static UserGroupService _txImpl; 95 private UserGroupService _service; 96 }