Package org.apache.wiki.auth.permissions

# Class AllPermissionCollection

java.lang.Object
java.security.PermissionCollection
org.apache.wiki.auth.permissions.AllPermissionCollection

All Implemented Interfaces:
  `Serializable`

public class AllPermissionCollection extends PermissionCollection
A collection of AllPermission objects.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final Hashtable<Permission,Permission>`
`m_permissions`

## Constructor Summary

Constructors
Constructor
Description
`AllPermissionCollection()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(Permission permission)`
Adds an AllPermission object to this AllPermissionCollection.
`Enumeration<Permission>`
`elements()`
Returns an enumeration of all AllPermission objects stored in this collection.
`boolean`
`implies(Permission permission)`
Iterates through the AllPermission objects stored by this AllPermissionCollection and determines if any of them imply a supplied Permission.
`boolean`
`isReadOnly()`
`void`
`setReadOnly()`

### Methods inherited from class java.security.PermissionCollection

`elementsAsStream, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### m_permissions

protected final Hashtable<Permission,Permission> m_permissions

## Constructor Details

### AllPermissionCollection

public AllPermissionCollection()

## Method Details

### add

public void add(Permission permission)
Adds an AllPermission object to this AllPermissionCollection. If this collection was previously marked read-only, or if the permission supplied is not of type `AllPermission`, a `SecurityException` is thrown.

Specified by:
  `add` in class `PermissionCollection`
Parameters:
  `permission` -
See Also:
  - `PermissionCollection.add(java.security.Permission)`

### elements

public Enumeration<Permission> elements()
Returns an enumeration of all AllPermission objects stored in this collection.

Specified by:
  `elements` in class `PermissionCollection`
Returns:
See Also:
  - `PermissionCollection.elements()`

### implies

public boolean implies(Permission permission)
Iterates through the AllPermission objects stored by this AllPermissionCollection and determines if any of them imply a supplied Permission. If the Permission is not of type `AllPermission`, `PagePermission` or `WikiPermission`, this method will return `false`. If none of the AllPermissions stored in this collection imply the permission, the method returns `false`; conversely, if one of the AllPermission objects implies the permission, the method returns `true`.

Specified by:
  `implies` in class `PermissionCollection`
Parameters:
  `permission` - the Permission to test. It may be any Permission type, but only the AllPermission, PagePermission or WikiPermission types are actually evaluated.
Returns:
See Also:
  - `PermissionCollection.implies(java.security.Permission)`

### isReadOnly

public boolean isReadOnly()

Overrides:
  `isReadOnly` in class `PermissionCollection`

### setReadOnly

public void setReadOnly()

Overrides:
  `setReadOnly` in class `PermissionCollection`
See Also:
  - `PermissionCollection.setReadOnly()`