001    /**
002     * Copyright (c) 2000-2013 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.kernel.javadoc;
016    
017    import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018    
019    import java.lang.reflect.Method;
020    
021    /**
022     * @author Igor Spasic
023     */
024    public class JavadocManagerUtil {
025    
026            public static JavadocManager getJavadocManager() {
027                    PortalRuntimePermission.checkGetBeanProperty(JavadocManagerUtil.class);
028    
029                    return _javadocManager;
030            }
031    
032            public static void load(
033                    String servletContextName, ClassLoader classLoader) {
034    
035                    getJavadocManager().load(servletContextName, classLoader);
036            }
037    
038            public static JavadocClass lookupJavadocClass(Class<?> clazz) {
039                    return getJavadocManager().lookupJavadocClass(clazz);
040            }
041    
042            public static JavadocMethod lookupJavadocMethod(Method method) {
043                    return getJavadocManager().lookupJavadocMethod(method);
044            }
045    
046            public static void unload(String servletContextName) {
047                    getJavadocManager().unload(servletContextName);
048            }
049    
050            public void setJavadocManager(JavadocManager javadocManager) {
051                    PortalRuntimePermission.checkSetBeanProperty(getClass());
052    
053                    _javadocManager = javadocManager;
054            }
055    
056            private static JavadocManager _javadocManager;
057    
058    }