001    /**
002     * Copyright (c) 2000-2012 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.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    }