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.security.pacl;
016    
017    import java.lang.reflect.Method;
018    
019    import java.security.Permission;
020    
021    import java.util.Properties;
022    import java.util.Set;
023    
024    /**
025     * @author Brian Wing Shun Chan
026     */
027    public interface PACLPolicy {
028    
029            public void checkPermission(Permission permission);
030    
031            public ClassLoader getClassLoader();
032    
033            public Properties getProperties();
034    
035            public String getProperty(String key);
036    
037            public String[] getPropertyArray(String key);
038    
039            public boolean getPropertyBoolean(String key);
040    
041            public Set<String> getPropertySet(String key);
042    
043            public String getServletContextName();
044    
045            public boolean hasJNDI(String name);
046    
047            public boolean hasPortalService(
048                    Object object, Method method, Object[] arguments);
049    
050            public boolean hasSQL(String sql);
051    
052            public boolean isActive();
053    
054            public boolean isCheckablePermission(Permission permission);
055    
056    }