001    /**
002     * Copyright (c) 2000-2013 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.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 JavadocMethod lookupJavadocMethod(Method method) {
039                    return getJavadocManager().lookupJavadocMethod(method);
040            }
041    
042            public static void unload(String servletContextName) {
043                    getJavadocManager().unload(servletContextName);
044            }
045    
046            public void setJavadocManager(JavadocManager javadocManager) {
047                    PortalRuntimePermission.checkSetBeanProperty(getClass());
048    
049                    _javadocManager = javadocManager;
050            }
051    
052            private static JavadocManager _javadocManager;
053    
054    }