public class ELFunctionMethods extends Object
Provides some built-in EL functions.
Constructor and Description |
---|
ELFunctionMethods() |
Modifier and Type | Method and Description |
---|---|
static boolean |
hasAttribute(String attributeName)
Checks if an authenticated user is setted with an attribute with the given name.
|
static boolean |
hasPartition(String partitionName)
Checks if an authenticated user is associated with a partition with the given name.
|
static boolean |
hasPermission(Object resource,
String operation)
Checks if the user has permissions to a resource considering an operation.
|
static boolean |
hasRole(String roleName)
Checks if an authenticated user is granted with a role with the given name.
|
static boolean |
isLoggedIn()
Checks if the user is logged in.
|
static boolean |
isMember(String groupName)
Checks if an authenticated user is member of the a group with the given name.
|
public static boolean isLoggedIn()
Checks if the user is logged in.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
public static boolean hasPermission(Object resource, String operation)
Checks if the user has permissions to a resource considering an operation.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
resource
- The resource.operation
- The operation.public static boolean hasRole(String roleName)
Checks if an authenticated user is granted with a role with the given name.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
roleName
- The role name.public static boolean isMember(String groupName)
Checks if an authenticated user is member of the a group with the given name.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
groupName
- The group name.public static boolean hasAttribute(String attributeName)
Checks if an authenticated user is setted with an attribute with the given name.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
attributeName
- The attribute's name.public static boolean hasPartition(String partitionName)
Checks if an authenticated user is associated with a partition with the given name.
This method requires that valid ELEvaluationContext
associated with the current
invation thread.
partitionName
- The partition name.Copyright © 2018 JBoss by Red Hat. All rights reserved.