public class DefaultAclManager extends java.lang.Object implements AclManager
| Modifier and Type | Field and Description |
|---|---|
static java.util.regex.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 and Description |
|---|
DefaultAclManager() |
| Modifier and Type | Method and Description |
|---|---|
Acl |
getPermissions(WikiPage page)
Returns the access control list for the page.
|
void |
initialize(WikiEngine engine,
java.util.Properties props)
Initializes the AclManager with a supplied wiki engine and properties.
|
Acl |
parseAcl(WikiPage page,
java.lang.String ruleLine)
A helper method for parsing textual AccessControlLists.
|
protected static java.lang.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.
|
public static final java.util.regex.Pattern ACL_PATTERN
public void initialize(WikiEngine engine, java.util.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, java.lang.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 pagepublic void setPermissions(WikiPage page, Acl acl) throws WikiSecurityException
setPermissions in interface AclManagerpage - the wiki pageacl - the access control listWikiSecurityException - of the Acl cannot be setprotected static java.lang.String printAcl(Acl acl)
acl - the ACLstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.