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 Modifier and Type Field Description protected java.util.Hashtable<java.security.Permission,java.security.Permission>
m_permissions
-
Constructor Summary
Constructors Constructor Description AllPermissionCollection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
-
-
-
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 typeAllPermission
, aSecurityException
is thrown.- Specified by:
add
in classjava.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 classjava.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 typeAllPermission
,PagePermission
orWikiPermission
, this method will returnfalse
. If none of the AllPermissions stored in this collection imply the permission, the method returnsfalse
; conversely, if one of the AllPermission objects implies the permission, the method returnstrue
.- Specified by:
implies
in classjava.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 classjava.security.PermissionCollection
-
setReadOnly
public void setReadOnly()
- Overrides:
setReadOnly
in classjava.security.PermissionCollection
- See Also:
PermissionCollection.setReadOnly()
-
-