01: /* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
02: *
03: * Licensed under the Apache License, Version 2.0 (the "License");
04: * you may not use this file except in compliance with the License.
05: * You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * 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: package org.acegisecurity.acls;
16:
17: import org.acegisecurity.acls.objectidentity.ObjectIdentity;
18:
19: /**
20: * Provides support for creating and storing <code>Acl</code> instances.
21: *
22: * @author Ben Alex
23: * @version $Id: MutableAclService.java 1784 2007-02-24 21:00:24Z luke_t $
24: */
25: public interface MutableAclService extends AclService {
26: //~ Methods ========================================================================================================
27:
28: /**
29: * Creates an empty <code>Acl</code> object in the database. It will have no entries. The returned object
30: * will then be used to add entries.
31: *
32: * @param objectIdentity the object identity to create
33: *
34: * @return an ACL object with its ID set
35: *
36: * @throws AlreadyExistsException if the passed object identity already has a record
37: */
38: MutableAcl createAcl(ObjectIdentity objectIdentity)
39: throws AlreadyExistsException;
40:
41: /**
42: * Removes the specified entry from the database.
43: *
44: * @param objectIdentity the object identity to remove
45: * @param deleteChildren whether to cascade the delete to children
46: *
47: * @throws ChildrenExistException if the deleteChildren argument was <code>false</code> but children exist
48: */
49: void deleteAcl(ObjectIdentity objectIdentity, boolean deleteChildren)
50: throws ChildrenExistException;
51:
52: /**
53: * Changes an existing <code>Acl</code> in the database.
54: *
55: * @param acl to modify
56: *
57: * @return DOCUMENT ME!
58: *
59: * @throws NotFoundException if the relevant record could not be found (did you remember to use {@link
60: * #createAcl(ObjectIdentity)} to create the object, rather than creating it with the <code>new</code>
61: * keyword?)
62: */
63: MutableAcl updateAcl(MutableAcl acl) throws NotFoundException;
64: }
|