com.ecyrd.jspwiki.auth.acl
Class DefaultAclManager

java.lang.Object
  extended by com.ecyrd.jspwiki.auth.acl.DefaultAclManager
All Implemented Interfaces:
AclManager

public class DefaultAclManager
extends Object
implements AclManager

Default implementation that parses Acls from wiki page markup.

Since:
2.3
Version:
$Revision: 1.6 $ $Date: 2005/12/12 06:31:36 $
Author:
Andrew Jaquith

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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAclManager

public DefaultAclManager()
Method Detail

initialize

public void initialize(WikiEngine engine,
                       Properties props)
Initializes the AclManager with a supplied wiki engine and properties.

Specified by:
initialize in interface AclManager
Parameters:
engine - the wiki engine
props - the initialization properties
See Also:
AclManager.initialize(com.ecyrd.jspwiki.WikiEngine, java.util.Properties)

parseAcl

public Acl parseAcl(WikiPage page,
                    String ruleLine)
             throws WikiSecurityException
A helper method for parsing textual AccessControlLists. The line is in form "ALLOW , , ". This method was moved from Authorizer.

Specified by:
parseAcl in interface AclManager
Parameters:
page - 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.
Returns:
A valid Access Control List. May be empty.
Throws:
WikiSecurityException, - if the ruleLine was faulty somehow.
WikiSecurityException
Since:
2.1.121

getPermissions

public Acl getPermissions(WikiPage page)
Returns the access control list for the page. If the ACL has not been parsed yet, it is done on-the-fly. If the page has a parent page, then that is tried also. This method was moved from Authorizer; it was consolidated with some code from AuthorizationManager.

Specified by:
getPermissions in interface AclManager
Parameters:
page -
Returns:
the Acl representing permissions for the page
Since:
2.2.121