Package org.jboss.hal.meta.security
Class SecurityContext
- java.lang.Object
-
- org.jboss.hal.dmr.ModelNode
-
- org.jboss.hal.meta.security.SecurityContext
-
-
Field Summary
Fields Modifier and Type Field Description static SecurityContextREAD_ONLYA security context with hardcoded permissions to read resources, write and execute operations are not allowed.static SecurityContextRWXA security context with hardcoded permissions to read, write and execute any resource.
-
Constructor Summary
Constructors Constructor Description SecurityContext(ModelNode payload)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisExecutable(String operation)booleanisReadable()booleanisReadable(String attribute)booleanisWritable()booleanisWritable(String attribute)-
Methods inherited from class org.jboss.hal.dmr.ModelNode
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addEmptyList, addEmptyObject, addExpression, as, asBigDecimal, asBigInteger, asBoolean, asBoolean, asBytes, asDouble, asDouble, asInt, asInt, asList, asLong, asLong, asObject, asProperty, asPropertyList, asString, asType, clear, clone, equals, equals, fromBase64, get, get, get, getFailureDescription, getType, has, has, hasDefined, hasDefined, hashCode, isDefined, isFailure, keys, protect, remove, require, require, resolve, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setEmptyList, setEmptyObject, setExpression, setExpression, toBase64String, toJSONString, toJSONString, toString, writeExternal
-
-
-
-
Field Detail
-
READ_ONLY
public static final SecurityContext READ_ONLY
A security context with hardcoded permissions to read resources, write and execute operations are not allowed.
-
RWX
public static final SecurityContext RWX
A security context with hardcoded permissions to read, write and execute any resource.
-
-
Constructor Detail
-
SecurityContext
public SecurityContext(ModelNode payload)
-
-
Method Detail
-
isReadable
public boolean isReadable()
- Returns:
- whether the security context is readable
-
isWritable
public boolean isWritable()
- Returns:
- whether the security context is writable
-
isReadable
public boolean isReadable(String attribute)
- Parameters:
attribute- The attribute to check.- Returns:
- whether the attribute is readable
-
isWritable
public boolean isWritable(String attribute)
- Parameters:
attribute- The attribute to check.- Returns:
- whether the attribute is writable
-
isExecutable
public boolean isExecutable(String operation)
- Parameters:
operation- The operation to check.- Returns:
- whether the operation is executable
-
-