View Javadoc

1   /* Copyright 2004 Acegi Technology Pty Limited
2    *
3    * Licensed under the Apache License, Version 2.0 (the "License");
4    * you may not use this file except in compliance with the License.
5    * You may obtain a copy of the License at
6    *
7    *     http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  package org.acegisecurity.acl.basic;
17  
18  import org.springframework.dao.DataAccessException;
19  
20  /***
21   * Represents a more extensive data access object
22   * for {@link BasicAclEntry}s.
23   * 
24   * <P>
25   * <code>BasicAclExtendedDao</code> implementations are responsible for interpreting a
26   * a given {@link AclObjectIdentity}.
27   * </p>
28   * 
29   * @author Ben Alex
30   * @version $Id: BasicAclExtendedDao.java,v 1.2 2005/11/17 00:55:47 benalex Exp $
31   */
32  public interface BasicAclExtendedDao extends BasicAclDao {
33      //~ Methods ================================================================
34  
35  	public void create(BasicAclEntry basicAclEntry)  throws DataAccessException;
36  	
37  	/***
38  	 * Deletes <b>all</b> entries associated with the
39  	 * specified <code>AclObjectIdentity</code>.
40  	 * 
41  	 * @param aclObjectIdentity to delete, including any <code>BasicAclEntry</code>s
42  	 */
43  	public void delete(AclObjectIdentity aclObjectIdentity) throws DataAccessException;
44  	
45  	/***
46  	 * Deletes the <code>BasicAclEntry</code> associated with the specified
47  	 * <code>AclObjectIdentity</code> and recipient <code>Object</code>.
48  	 * 
49  	 * @param aclObjectIdentity to delete
50  	 * @param recipient to delete
51  	 */
52  	public void delete(AclObjectIdentity aclObjectIdentity, Object recipient) throws DataAccessException;
53  	
54  	/***
55  	 * Changes the permission mask assigned to the <code>BasicAclEntry</code>
56  	 * associated with the specified
57  	 * <code>AclObjectIdentity</code> and recipient <code>Object</code>.
58  	 * 
59  	 * @param aclObjectIdentity to locate the relevant <code>BasicAclEntry</code>
60  	 * @param recipient to locate the relevant <code>BasicAclEntry</code>
61  	 * @param newMask indicating the new permission
62  	 */
63  	public void changeMask(AclObjectIdentity aclObjectIdentity, Object recipient, Integer newMask) throws DataAccessException;
64  }