|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ecyrd.jspwiki.auth.acl.DefaultAclManager
public class DefaultAclManager
Default implementation that parses Acls from wiki page markup.
| Field Summary | |
|---|---|
static Pattern |
ACL_PATTERN
Identifies ACL strings in wiki text; the first group is the action (view, edit) and the second is the list of Principals separated by commas. |
| Constructor Summary | |
|---|---|
DefaultAclManager()
|
|
| Method Summary | |
|---|---|
Acl |
getPermissions(WikiPage page)
Returns the access control list for the page. |
void |
initialize(WikiEngine engine,
Properties props)
Initializes the AclManager with a supplied wiki engine and properties. |
Acl |
parseAcl(WikiPage page,
String ruleLine)
A helper method for parsing textual AccessControlLists. |
protected static String |
printAcl(Acl acl)
Generates an ACL string for inclusion in a wiki page, based on a supplied Acl object. |
void |
setPermissions(WikiPage page,
Acl acl)
Sets the access control list for the page and persists it by prepending it to the wiki page markup and saving the page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Pattern ACL_PATTERN
| Constructor Detail |
|---|
public DefaultAclManager()
| Method Detail |
|---|
public void initialize(WikiEngine engine,
Properties props)
initialize in interface AclManagerengine - the wiki engineprops - the initialization propertiesAclManager.initialize(com.ecyrd.jspwiki.WikiEngine,
java.util.Properties)
public Acl parseAcl(WikiPage page,
String ruleLine)
throws WikiSecurityException
parseAcl in interface AclManagerpage - The current wiki page. If the page already has an ACL, it
will be used as a basis for this ACL in order to avoid the
creation of a new one.ruleLine - The rule line, as described above.
WikiSecurityException - if the ruleLine was faulty somehow.public Acl getPermissions(WikiPage page)
null Acl.
getPermissions in interface AclManagerpage - the page
public void setPermissions(WikiPage page,
Acl acl)
throws WikiSecurityException
setPermissions in interface AclManagerpage - the wiki pageacl - the access control list
WikiSecurityException - of the Acl cannot be setprotected static String printAcl(Acl acl)
acl - the ACL
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||