All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.osvaldopina.linkbuilder.expression.impl.SecurityExpressionParser Maven / Gradle / Ivy

There is a newer version: 0.3.0
Show newest version
package com.github.osvaldopina.linkbuilder.expression.impl;

import org.springframework.context.ApplicationContext;
import org.springframework.expression.Expression;

import java.util.HashMap;
import java.util.Map;

public class SecurityExpressionParser {

    private Map expressionCache = new HashMap();

    private SecurityExpressionHandler securityExpressionHandler =
            new SecurityExpressionHandler();

    public Expression parse(ApplicationContext applicationContext, String expression) {

        Expression parsedExpression = expressionCache.get(expression);

        if (parsedExpression == null) {
            parsedExpression = securityExpressionHandler.parse(applicationContext, expression);
            expressionCache.put(expression, parsedExpression);
        }

        return parsedExpression;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy