01: /*
02: * Copyright 2007 Pentaho Corporation. All rights reserved.
03: * This software was developed by Pentaho Corporation and is provided under the terms
04: * of the Mozilla Public License, Version 1.1, or any later version. You may not use
05: * this file except in compliance with the license. If you need a copy of the license,
06: * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
07: * BI Platform. The Initial Developer is Pentaho Corporation.
08: *
09: * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10: * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11: * the license for the specific language governing your rights and limitations.
12: */
13: package com.pentaho.security.acls;
14:
15: import java.util.List;
16:
17: public interface IAclHolder {
18: public static final int ACCESS_TYPE_READ = 0;
19:
20: public static final int ACCESS_TYPE_WRITE = 1;
21:
22: public static final int ACCESS_TYPE_UPDATE = 2;
23:
24: public static final int ACCESS_TYPE_DELETE = 3;
25:
26: public static final int ACCESS_TYPE_ADMIN = 4;
27:
28: /**
29: * Returns the ACLs on the existing object. Never returns null. If you need
30: * to get the effective access controls, you may need to call
31: * getEffectiveAccessControls() which will chain up from this object if
32: * necessary to find the ACLs that control this object.
33: *
34: * @return List of ACLs for this object only.
35: */
36: public List getAccessControls();
37:
38: /**
39: * Sets the access controls on this specific object. Currently doesn't check
40: * whether the acls are the same as those assigned to the parent.
41: *
42: * @param acls
43: */
44: public void setAccessControls(List acls);
45:
46: /**
47: * Examines whether the existing object has ACLs. If not, it will return the
48: * parent's ACLs. All the way up to the top if necessary. This method should
49: * never return null.
50: *
51: * @return List containing all the AclEntry objects
52: */
53: public List getEffectiveAccessControls();
54:
55: /**
56: * Replaces existing access controls with a new list of
57: * access controls. This method should be used in favor
58: * of setting the access controls with setAccessControls
59: * when the object is being persisted.
60: * @param acls
61: */
62: public void resetAccessControls(List acls);
63: }
|