Package org.apache.wiki.auth.permissions

## Class AllPermissionCollection

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

All Implemented Interfaces:
  `java.io.Serializable`

    public class AllPermissionCollection
    extends java.security.PermissionCollection

A collection of AllPermission objects.

See Also:
  Serialized Form

### Field Summary

Fields
`protected java.util.Hashtable<java.security.Permission,​java.security.Permission>` `m_permissions`

### Constructor Summary

Constructors
`AllPermissionCollection()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add​(java.security.Permission permission)` Adds an AllPermission object to this AllPermissionCollection.
`java.util.Enumeration<java.security.Permission>` `elements()` Returns an enumeration of all AllPermission objects stored in this collection.
`boolean` `implies​(java.security.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 Detail

#### m_permissions

    protected final java.util.Hashtable<java.security.Permission,​java.security.Permission> m_permissions

### Constructor Detail

#### AllPermissionCollection

    public AllPermissionCollection()

### Method Detail

#### add

    public void add​(java.security.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 `java.security.PermissionCollection`
Parameters:
  `permission` -
See Also:
  `PermissionCollection.add(java.security.Permission)`

#### elements

    public java.util.Enumeration<java.security.Permission> elements()

Returns an enumeration of all AllPermission objects stored in this collection.

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

#### implies

    public boolean implies​(java.security.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 `java.security.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 `java.security.PermissionCollection`

#### setReadOnly

    public void setReadOnly()

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