org.apache.wiki.auth.permissions
Class PermissionFactory

java.lang.Object
  extended by org.apache.wiki.auth.permissions.PermissionFactory

public final class PermissionFactory
extends Object

Provides a factory for Permission objects. Since the Permissions are immutable, and creating them takes a bit of time, caching them makes sense.

This class stores the permissions in a static HashMap.

Since:
2.5.54

Method Summary
static PagePermission getPagePermission(String page, String actions)
          Get a permission object for a WikiPage and a set of actions.
static PagePermission getPagePermission(WikiPage page, String actions)
          Get a permission object for a WikiPage and a set of actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPagePermission

public static PagePermission getPagePermission(WikiPage page,
                                               String actions)
Get a permission object for a WikiPage and a set of actions.

Parameters:
page - The page object.
actions - A list of actions.
Returns:
A PagePermission object, presenting this page+actions combination.

getPagePermission

public static PagePermission getPagePermission(String page,
                                               String actions)
Get a permission object for a WikiPage and a set of actions.

Parameters:
page - The name of the page.
actions - A list of actions.
Returns:
A PagePermission object, presenting this page+actions combination.


Copyright © {inceptionYear}-2014 The Apache Software Foundation. All rights reserved.