public class Right extends Object implements RightDescription, Serializable, Comparable<Right>
Modifier and Type | Field and Description |
---|---|
static Right |
ADMIN
The Admin access right.
|
static Right |
COMMENT
The comment access right.
|
static Right |
CREATE_WIKI
The creation of a Wiki right.
|
static Right |
CREATOR
Imply rights provided to creator of a document.
|
static Right |
DELETE
The delete access right.
|
static Right |
EDIT
The edit access right.
|
static Set<EntityType> |
FARM_ONLY
Targeted entity type list to target only the main wiki.
|
static Right |
ILLEGAL
Illegal value.
|
static String |
ILLEGAL_RIGHT_NAME
Illegal right name.
|
static Right |
LOGIN
The login access right.
|
static Right |
PROGRAM
The program access right.
|
static Right |
REGISTER
The register access right.
|
static Right |
SCRIPT
The script access right.
|
static Right |
VIEW
The view access right.
|
static Set<EntityType> |
WIKI_ONLY
Targeted entity type list to target only wikis (including main wiki).
|
static Set<EntityType> |
WIKI_SPACE
Targeted entity type list to target wikis and spaces.
|
static Set<EntityType> |
WIKI_SPACE_DOCUMENT
Targeted entity type list to target wikis, spaces and documents.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Right other) |
static Right |
get(int ordinal)
Retrieve a right based on its ordinal.
|
static List<String> |
getAllRightsAsString() |
RuleState |
getDefaultState() |
static Set<Right> |
getEnabledRights(EntityType entityType)
Returns the list of rights available for a given entity type.
|
Set<Right> |
getImpliedRights() |
boolean |
getInheritanceOverridePolicy() |
String |
getName() |
static List<Right> |
getStandardRights() |
Set<EntityType> |
getTargetedEntityType() |
RuleState |
getTieResolutionPolicy() |
boolean |
isReadOnly()
Used to check if this right should be allowed when the wiki is in read-only mode.
|
int |
ordinal() |
static int |
size() |
static Right |
toRight(String string)
Convert a string to a right.
|
String |
toString() |
static List<Right> |
values() |
public static final Right LOGIN
public static final Right VIEW
public static final Right EDIT
public static final Right DELETE
public static final Right CREATOR
public static final Right ADMIN
public static final Right PROGRAM
public static final Right SCRIPT
public static final Right REGISTER
public static final Right COMMENT
public static final Right CREATE_WIKI
public static final Right ILLEGAL
public static final String ILLEGAL_RIGHT_NAME
public static final Set<EntityType> FARM_ONLY
public static final Set<EntityType> WIKI_ONLY
public static final Set<EntityType> WIKI_SPACE
public static final Set<EntityType> WIKI_SPACE_DOCUMENT
public static Right toRight(String string)
string
- String representation of right.ILLEGAL
.public static Set<Right> getEnabledRights(EntityType entityType)
entityType
- the entity type, or null for main wiki.Right
enabled of this entity typepublic static Right get(int ordinal)
ordinal
- the ordinal of the rightRight
public static int size()
public static List<String> getAllRightsAsString()
@Unstable public static List<Right> getStandardRights()
public int ordinal()
public String getName()
getName
in interface RightDescription
public Set<Right> getImpliedRights()
getImpliedRights
in interface RightDescription
null
instead of an empty set.public Set<EntityType> getTargetedEntityType()
getTargetedEntityType
in interface RightDescription
public boolean getInheritanceOverridePolicy()
getInheritanceOverridePolicy
in interface RightDescription
public RuleState getTieResolutionPolicy()
getTieResolutionPolicy
in interface RightDescription
public RuleState getDefaultState()
getDefaultState
in interface RightDescription
RuleState.ALLOW
or RuleState.DENY
.public boolean isReadOnly()
RightDescription
isReadOnly
in interface RightDescription
public int compareTo(Right other)
compareTo
in interface Comparable<Right>
Copyright © 2004–2021 XWiki. All rights reserved.