001    /**
002     * Copyright (c) 2000-2012 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.security.pacl.permission;
016    
017    import java.security.BasicPermission;
018    
019    /**
020     * @author Raymond Augé
021     * @author Zsolt Berentey
022     */
023    public class CheckMemberAccessPermission extends BasicPermission {
024    
025            public CheckMemberAccessPermission(
026                    String name, Class<?> callerClass, ClassLoader callerClassLoader,
027                    Class<?> subjectClass, ClassLoader subjectClassLoader) {
028    
029                    super(name);
030    
031                    _callerClass = callerClass;
032                    _callerClassLoader = callerClassLoader;
033                    _subjectClass = subjectClass;
034                    _subjectClassLoader = subjectClassLoader;
035            }
036    
037            public Class<?> getCallerClass() {
038                    return _callerClass;
039            }
040    
041            public ClassLoader getCallerClassLoader() {
042                    return _callerClassLoader;
043            }
044    
045            public Class<?> getSubjectClass() {
046                    return _subjectClass;
047            }
048    
049            public ClassLoader getSubjectClassLoader() {
050                    return _subjectClassLoader;
051            }
052    
053            private Class<?> _callerClass;
054            private ClassLoader _callerClassLoader;
055            private Class<?> _subjectClass;
056            private ClassLoader _subjectClassLoader;
057    
058    }