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 java.util.List;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class PersistedModelLocalServiceRegistryUtil {
023    
024            public static PersistedModelLocalService getPersistedModelLocalService(
025                    String className) {
026    
027                    return getPersistedModelLocalServiceRegistry().
028                            getPersistedModelLocalService(className);
029            }
030    
031            public static PersistedModelLocalServiceRegistry
032                    getPersistedModelLocalServiceRegistry() {
033    
034                    return _persistedModelLocalServiceRegistry;
035            }
036    
037            public static List<PersistedModelLocalService>
038                    getPersistedModelLocalServices() {
039    
040                    return getPersistedModelLocalServiceRegistry().
041                            getPersistedModelLocalServices();
042            }
043    
044            public static void register(
045                    String className,
046                    PersistedModelLocalService persistedModelLocalService) {
047    
048                    getPersistedModelLocalServiceRegistry().register(
049                            className, persistedModelLocalService);
050            }
051    
052            public static void unregister(String className) {
053                    getPersistedModelLocalServiceRegistry().unregister(className);
054            }
055    
056            public void setPersistedModelLocalServiceRegistry(
057                    PersistedModelLocalServiceRegistry persistedModelLocalServiceRegistry) {
058    
059                    _persistedModelLocalServiceRegistry =
060                            persistedModelLocalServiceRegistry;
061            }
062    
063            private static PersistedModelLocalServiceRegistry
064                    _persistedModelLocalServiceRegistry;
065    
066    }