public final class WikiPermission extends java.security.Permission implements java.io.Serializable
Permission to perform an global wiki operation, such as self-registering
or creating new pages. Permission actions include: createGroups,
createPages, editPreferences,
editProfile and login.
The target is a given wiki. The syntax for the target is the wiki name. "All wikis" can be specified using a wildcard (*). Page collections may also be specified using a wildcard. For pages, the wildcard may be a prefix, suffix, or all by itself.
Certain permissions imply others. Currently,
createGroups implies createPages.
| Modifier and Type | Field and Description |
|---|---|
static WikiPermission |
CREATE_GROUPS
A static instance of the createGroups permission.
|
static java.lang.String |
CREATE_GROUPS_ACTION
Name of the action for createGroups permission.
|
static WikiPermission |
CREATE_PAGES
A static instance of the createPages permission.
|
static java.lang.String |
CREATE_PAGES_ACTION
Name of the action for createPages permission.
|
static WikiPermission |
EDIT_PREFERENCES
A static instance of the editPreferences permission.
|
static java.lang.String |
EDIT_PREFERENCES_ACTION
Name of the action for editPreferences permission.
|
static WikiPermission |
EDIT_PROFILE
A static instance of the editProfile permission.
|
static java.lang.String |
EDIT_PROFILE_ACTION
Name of the action for editProfile permission.
|
static WikiPermission |
LOGIN
A static instance of the login permission.
|
static java.lang.String |
LOGIN_ACTION
Name of the action for login permission.
|
static java.lang.String |
WILDCARD
Value for a generic wildcard.
|
| Constructor and Description |
|---|
WikiPermission(java.lang.String wiki,
java.lang.String actions)
Creates a new WikiPermission for a specified set of actions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Two WikiPermission objects are considered equal if their wikis and
actions (after normalization) are equal.
|
java.lang.String |
getActions()
Returns the actions for this permission: "createGroups", "createPages",
"editPreferences", "editProfile", or "login".
|
java.lang.String |
getWiki()
Returns the name of the wiki containing the page represented by this
permission; may return the wildcard string.
|
int |
hashCode()
Returns the hash code for this WikiPermission.
|
boolean |
implies(java.security.Permission permission)
WikiPermission can only imply other WikiPermissions; no other permission
types are implied.
|
java.security.PermissionCollection |
newPermissionCollection()
Returns a new
AllPermissionCollection. |
java.lang.String |
toString()
Prints a human-readable representation of this permission.
|
public static final java.lang.String CREATE_GROUPS_ACTION
public static final java.lang.String CREATE_PAGES_ACTION
public static final java.lang.String LOGIN_ACTION
public static final java.lang.String EDIT_PREFERENCES_ACTION
public static final java.lang.String EDIT_PROFILE_ACTION
public static final java.lang.String WILDCARD
public static final WikiPermission CREATE_GROUPS
public static final WikiPermission CREATE_PAGES
public static final WikiPermission LOGIN
public static final WikiPermission EDIT_PREFERENCES
public static final WikiPermission EDIT_PROFILE
public WikiPermission(java.lang.String wiki, java.lang.String actions)
actions - the actions for this permissionwiki - The name of the wiki the permission belongs to.public boolean equals(java.lang.Object obj)
equals in class java.security.Permissionobj - the object to testObject.equals(java.lang.Object)public java.lang.String getActions()
getActions in class java.security.PermissionPermission.getActions()public java.lang.String getWiki()
public int hashCode()
hashCode in class java.security.Permissionpublic boolean implies(java.security.Permission permission)
implies in class java.security.Permissionpermission - the permission which may (or may not) be implied by
this instancetrue if the permission is implied,
false otherwisePermission.implies(java.security.Permission)public java.security.PermissionCollection newPermissionCollection()
AllPermissionCollection.newPermissionCollection in class java.security.Permissionpublic java.lang.String toString()
toString in class java.security.PermissionCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.