public final class Permissions extends QTestBaseModel<Permissions>
| Modifier and Type | Class and Description |
|---|---|
static class |
Permissions.PermissionType
PermissionType
|
NL, properties, RESERVED_NAME| Constructor and Description |
|---|
Permissions()
Creates the permission instance.
|
Permissions(java.util.Map<java.lang.String,java.lang.Object> permissions) |
| Modifier and Type | Method and Description |
|---|---|
Permissions |
clone() |
java.lang.String |
elementName() |
Permissions.PermissionType |
getType() |
java.lang.String |
getTypeName() |
boolean |
hasPermission(java.lang.String name)
If the given permission name is permitted
|
Permissions |
setPermission(java.lang.String name,
java.lang.Boolean value)
Sets the permission.
|
void |
setType(Permissions.PermissionType type)
Sets the permission type.
|
Permissions |
withPermission(java.lang.String name,
java.lang.Boolean value)
Sets the permission.
|
Permissions |
withType(Permissions.PermissionType type)
Sets the permission type.
|
getBinaryFromInputStream, getLinks, getWebUrl, setLinks, setWebUrl, validateInputStream, withLinks, withWebUrlappendPropertiesTo, appendPropertiesTo, asDate, asDate, asInteger, asInteger, asLong, asLong, asString, asString, getProperties, getProperty, getPropertyMap, hasProperties, hasProperty, isVisible, jsonElementName, removeProperty, setPropertiesFrom, setProperty, toJson, toStringpublic Permissions()
public Permissions(java.util.Map<java.lang.String,java.lang.Object> permissions)
permissions - permissionspublic boolean hasPermission(java.lang.String name)
name - the given permission name.true if permitted, otherwise falsepublic Permissions setPermission(java.lang.String name, java.lang.Boolean value)
name - the given permission name.value - the value of the given permission.public Permissions withPermission(java.lang.String name, java.lang.Boolean value)
name - the given permission name.value - the value of the given permission.Permissions object.public void setType(Permissions.PermissionType type)
type - the given permission type to set.public Permissions withType(Permissions.PermissionType type)
type - the given permission type to set.Permissions object.public Permissions.PermissionType getType()
public Permissions clone()
clone in class PropertyContainerpublic java.lang.String getTypeName()
public java.lang.String elementName()
elementName in class PropertyContainer