1 /** 2 * 3 * Magnolia and its source-code is licensed under the LGPL. 4 * You may copy, adapt, and redistribute this file for commercial or non-commercial use. 5 * When copying, adapting, or redistributing this document in keeping with the guidelines above, 6 * you are required to provide proper attribution to obinary. 7 * If you reproduce or distribute the document without making any substantive modifications to its content, 8 * please use the following attribution line: 9 * 10 * Copyright 1993-2006 obinary Ltd. (http://www.obinary.com) All rights reserved. 11 * 12 */ 13 package info.magnolia.cms.security; 14 15 import java.util.List; 16 17 18 /** 19 * @author Sameer Charles 20 * @version $Revision:2558 $ ($Author:scharles $) 21 */ 22 public interface AccessManager { 23 24 /** 25 * Determines wether the specified permissions are granted to the given path. 26 * @param path path for which permissions are checked 27 * @param permissions permission mask 28 * @return true if this accessmanager has permissions to the specified path 29 */ 30 boolean isGranted(String path, long permissions); 31 32 /** 33 * Sets the list of permissions this manager will use to determine access, implementation is free to define the 34 * structure of this list. 35 * @param permissions 36 */ 37 void setPermissionList(List permissions); 38 39 /** 40 * Get permision list assigned to this access manager 41 */ 42 List getPermissionList(); 43 44 /** 45 * Get permissions assigned to the given path. 46 * @see Permission all possible permissions 47 * @param path for which permissions are requested 48 * @return permission mask 49 */ 50 long getPermissions(String path); 51 } 52