@Override public Object get(final Object key) { if (this.expressionObjects.containsObject(key.toString())) { final Object expressionObject = this.expressionObjects.getObject(key.toString()); // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.restrictedExpressionExecution && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(key) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(key))) { return RestrictedRequestAccessUtils.wrapRequestObject(expressionObject); } return expressionObject; } return super.get(key); }
public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.requestParametersRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } if (this.additionalVariables != null && this.additionalVariables.containsKey(name)) { final Object result = this.additionalVariables.get(name); if (result != null) { return result; } } // fall back to delegate return this.delegate.lookupVariable(name); }
public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.requestParametersRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } if (this.additionalVariables != null && this.additionalVariables.containsKey(name)) { final Object result = this.additionalVariables.get(name); if (result != null) { return result; } } // fall back to delegate return this.delegate.lookupVariable(name); }
public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.requestParametersRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } if (this.additionalVariables != null && this.additionalVariables.containsKey(name)) { final Object result = this.additionalVariables.get(name); if (result != null) { return result; } } // fall back to delegate return this.delegate.lookupVariable(name); }
public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.requestParametersRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } if (this.additionalVariables != null && this.additionalVariables.containsKey(name)) { final Object result = this.additionalVariables.get(name); if (result != null) { return result; } } // fall back to delegate return this.delegate.lookupVariable(name); }
@Override public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.variableAccessRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } // fall back to superclass return super.lookupVariable(name); }
public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.requestParametersRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } if (this.additionalVariables != null && this.additionalVariables.containsKey(name)) { final Object result = this.additionalVariables.get(name); if (result != null) { return result; } } // fall back to delegate return this.delegate.lookupVariable(name); }
@Override public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.variableAccessRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } // fall back to superclass return super.lookupVariable(name); }
@Override public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.variableAccessRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } // fall back to superclass return super.lookupVariable(name); }
@Override public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.variableAccessRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } // fall back to superclass return super.lookupVariable(name); }
@Override public Object lookupVariable(final String name) { if (this.expressionObjects != null && this.expressionObjects.containsObject(name)) { final Object result = this.expressionObjects.getObject(name); if (result != null) { // We need to first check if we are in a restricted environment. If so, restrict access to the request. if (this.variableAccessRestricted && (StandardExpressionObjectFactory.REQUEST_EXPRESSION_OBJECT_NAME.equals(name) || StandardExpressionObjectFactory.HTTP_SERVLET_REQUEST_EXPRESSION_OBJECT_NAME.equals(name))) { return RestrictedRequestAccessUtils.wrapRequestObject(result); } return result; } } // fall back to superclass return super.lookupVariable(name); }
"in future versions of Thymeleaf.", TemplateEngine.threadIndex()); return ((IThymeleafEvaluationContext)context).getExpressionObjects().getObject("execInfo");
"in future versions of Thymeleaf.", TemplateEngine.threadIndex()); return ((IThymeleafEvaluationContext)context).getExpressionObjects().getObject("execInfo");
"in future versions of Thymeleaf.", TemplateEngine.threadIndex()); return ((IThymeleafEvaluationContext)context).getExpressionObjects().getObject("execInfo");
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (SpringVersionSpecificUtils.isWebContext(context)) { return AuthUtils.getAuthenticationObject(context); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (SpringVersionSpecificUtils.isWebContext(context)) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); return new Authorization(context, authentication); } return null; } return null; }
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (SpringVersionSpecificUtils.isWebContext(context)) { return AuthUtils.getAuthenticationObject(context); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (SpringVersionSpecificUtils.isWebContext(context)) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); return new Authorization(context, authentication); } return null; } return null; }
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { return AuthUtils.getAuthenticationObject(); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); final IWebContext webContext = (IWebContext)context; final HttpServletRequest request = webContext.getRequest(); final HttpServletResponse response = webContext.getResponse(); final ServletContext servletContext = webContext.getServletContext(); return new Authorization(context, authentication, request, response, servletContext); } return null; } return null; }
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { return AuthUtils.getAuthenticationObject(); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); final IWebContext webContext = (IWebContext)context; final HttpServletRequest request = webContext.getRequest(); final HttpServletResponse response = webContext.getResponse(); final ServletContext servletContext = webContext.getServletContext(); return new Authorization(context, authentication, request, response, servletContext); } return null; } return null; }
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { return AuthUtils.getAuthenticationObject(); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); final IWebContext webContext = (IWebContext)context; final HttpServletRequest request = webContext.getRequest(); final HttpServletResponse response = webContext.getResponse(); final ServletContext servletContext = webContext.getServletContext(); return new Authorization(context, authentication, request, response, servletContext); } return null; } return null; }
public Object buildObject(final IExpressionContext context, final String expressionObjectName) { if (AUTHENTICATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { return AuthUtils.getAuthenticationObject(); } } if (AUTHORIZATION_EXPRESSION_OBJECT_NAME.equals(expressionObjectName)) { if (context instanceof IWebContext) { // We retrieve it like this in order to give it the opportunity to come from cache final Authentication authentication = (Authentication) context.getExpressionObjects().getObject(AUTHENTICATION_EXPRESSION_OBJECT_NAME); final IWebContext webContext = (IWebContext)context; final HttpServletRequest request = webContext.getRequest(); final HttpServletResponse response = webContext.getResponse(); final ServletContext servletContext = webContext.getServletContext(); return new Authorization(context, authentication, request, response, servletContext); } return null; } return null; }