SinglePermissionSubject

public class SinglePermissionSubject implements Subject

Constructors

SinglePermissionSubject

public SinglePermissionSubject(String permission)

Methods

associateWith

public <V> Callable<V> associateWith(Callable<V> callable)

associateWith

public Runnable associateWith(Runnable runnable)

checkPermission

public void checkPermission(String permission)

checkPermission

public void checkPermission(Permission permission)

checkPermissions

public void checkPermissions(String... permissions)

checkPermissions

public void checkPermissions(Collection<Permission> permissions)

checkRole

public void checkRole(String roleIdentifier)

checkRoles

public void checkRoles(Collection<String> roleIdentifiers)

checkRoles

public void checkRoles(String... roleIdentifiers)

execute

public <V> V execute(Callable<V> callable)

execute

public void execute(Runnable runnable)

getPreviousPrincipals

public PrincipalCollection getPreviousPrincipals()

getPrincipal

public Object getPrincipal()

getPrincipals

public PrincipalCollection getPrincipals()

getSession

public Session getSession()

getSession

public Session getSession(boolean create)

hasAllRoles

public boolean hasAllRoles(Collection<String> roleIdentifiers)

hasRole

public boolean hasRole(String roleIdentifier)

hasRoles

public boolean[] hasRoles(List<String> roleIdentifiers)

isAuthenticated

public boolean isAuthenticated()

isPermitted

public boolean isPermitted(String permission)

isPermitted

public boolean isPermitted(Permission permission)

isPermitted

public boolean[] isPermitted(String... permissions)

isPermitted

public boolean[] isPermitted(List<Permission> permissions)

isPermittedAll

public boolean isPermittedAll(String... permissions)

isPermittedAll

public boolean isPermittedAll(Collection<Permission> permissions)

isRemembered

public boolean isRemembered()

isRunAs

public boolean isRunAs()

login

public void login(AuthenticationToken token)

logout

public void logout()

releaseRunAs

public PrincipalCollection releaseRunAs()

runAs

public void runAs(PrincipalCollection principals)