01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.outerj.daisy.repository.acl;
17:
18: import org.outerj.daisy.repository.RepositoryException;
19: import org.outerx.daisy.x10.AclDocument;
20:
21: import java.util.Date;
22:
23: /**
24: * An ACL (Access Control List) ordered list of AclObjects. An
25: * AclObject specifies to what (= which documents) its child AclEntries
26: * applies.
27: *
28: * <p>Modifications to the Acl are only made permanent after a call to
29: * {@link #save()}.
30: */
31: public interface Acl {
32: /**
33: * Creates a new AclObject. This AclObject will not be added to this Acl,
34: * use e.g. the {@link #add(AclObject)} method to do that.
35: */
36: AclObject createNewObject(String objectExpression);
37:
38: AclObject get(int index);
39:
40: void remove(int index);
41:
42: void add(AclObject aclObject);
43:
44: void add(int index, AclObject aclObject);
45:
46: void clear();
47:
48: int size();
49:
50: Date getLastModified();
51:
52: long getLastModifier();
53:
54: /**
55: * Saves this Acl. This includes the saving of its child AclObjects
56: * and their respective AclEntries.
57: */
58: void save() throws RepositoryException;
59:
60: AclDocument getXml();
61:
62: void setFromXml(AclDocument.Acl aclXml);
63:
64: long getUpdateCount();
65: }
|