Interface AclManager

All Superinterfaces:
org.apache.wiki.api.engine.Initializable
All Known Implementing Classes:
DefaultAclManager

public interface AclManager extends org.apache.wiki.api.engine.Initializable
Specifies how to parse and return ACLs from wiki pages.
Since:
2.3
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.wiki.api.core.Acl
    getPermissions(org.apache.wiki.api.core.Page page)
    Returns the access control list for the page.
    org.apache.wiki.api.core.Acl
    parseAcl(org.apache.wiki.api.core.Page page, String ruleLine)
    A helper method for parsing textual AccessControlLists.
    void
    setPermissions(org.apache.wiki.api.core.Page page, org.apache.wiki.api.core.Acl acl)
    Sets the access control list for the page and persists it.

    Methods inherited from interface org.apache.wiki.api.engine.Initializable

    initialize
  • Method Details

    • parseAcl

      org.apache.wiki.api.core.Acl parseAcl(org.apache.wiki.api.core.Page page, String ruleLine) throws WikiSecurityException
      A helper method for parsing textual AccessControlLists. The line is in form "(ALLOW) , , ". This method was moved from Authorizer.
      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.
      Since:
      2.1.121
    • getPermissions

      org.apache.wiki.api.core.Acl getPermissions(org.apache.wiki.api.core.Page 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.
      Parameters:
      page - the wiki page
      Returns:
      the Acl representing permissions for the page
      Since:
      2.2.121
    • setPermissions

      void setPermissions(org.apache.wiki.api.core.Page page, org.apache.wiki.api.core.Acl acl) throws WikiSecurityException
      Sets the access control list for the page and persists it.
      Parameters:
      page - the wiki page
      acl - the access control list
      Throws:
      WikiSecurityException - if the ACL cannot be set or persisted
      Since:
      2.5