jade.util
Class AccessControlList
java.lang.Object
|
+--jade.util.AccessControlList
- public class AccessControlList
- extends java.lang.Object
An ACL object represents an Access Control List and
wraps a White list and a Black list,
Both lists make use of regular expressions for
allowing/denying access to a certain resource.
Into each file, multiple sections are allowed.
A specific client is allowed if:
- it is not present into the black list, AND
- it is present into the white list.
More about regular expressions:
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
http://java.sun.com/docs/books/tutorial/extra/regex/
- Author:
- Giosue Vitaglione - Telecom Italia LAB
Method Summary |
boolean |
isAllowed(java.lang.String section,
java.lang.String value)
A specific client is allowed if:
it is not present into the black list, AND
it is present into the white list. |
void |
refresh()
Update this AccessControlList object
reading again the white and black files. |
void |
setBlack(java.lang.String blackFileName)
|
void |
setWhite(java.lang.String whiteFileName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccessControlList
public AccessControlList()
setBlack
public void setBlack(java.lang.String blackFileName)
setWhite
public void setWhite(java.lang.String whiteFileName)
isAllowed
public boolean isAllowed(java.lang.String section,
java.lang.String value)
- A specific client is allowed if:
- it is not present into the black list, AND
- it is present into the white list.
isAllow("section", value)
returns is the client
having that specific value for that property is allowed.
refresh
public void refresh()
- Update this AccessControlList object
reading again the white and black files.
JADE