Example usage for org.springframework.security.access.expression.method MethodSecurityExpressionRoot setThis

List of usage examples for org.springframework.security.access.expression.method MethodSecurityExpressionRoot setThis

Introduction

In this page you can find the example usage for org.springframework.security.access.expression.method MethodSecurityExpressionRoot setThis.

Prototype

void setThis(Object target) 

Source Link

Document

Sets the "this" property for use in expressions.

Usage

From source file:org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler.java

/**
 * Creates the root object for expression evaluation.
 *///from  w  w  w .  j ava 2 s .co  m
protected MethodSecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication,
        MethodInvocation invocation) {
    MethodSecurityExpressionRoot root = new MethodSecurityExpressionRoot(authentication);
    root.setThis(invocation.getThis());
    root.setPermissionEvaluator(getPermissionEvaluator());
    root.setTrustResolver(getTrustResolver());
    root.setRoleHierarchy(getRoleHierarchy());
    root.setDefaultRolePrefix(getDefaultRolePrefix());

    return root;
}