/** * <p> * Returns the execution attributes. * </p> * * @return the current map of execution attributes */ public Map<String,Object> getExecutionAttributes() { return this.configuration.getExecutionAttributes(); }
/** * <p> * Returns the execution attributes. * </p> * * @return the current map of execution attributes */ public Map<String,Object> getExecutionAttributes() { return this.configuration.getExecutionAttributes(); }
/** * <p> * Returns the execution attribute with the specified name. * </p> * * @param attributeName the name of the attribute to be retrieved * @return the value of the attribute */ public Object getExecutionAttribute(final String attributeName) { return this.configuration.getExecutionAttributes().get(attributeName); }
/** * <p> * Returns the execution attribute with the specified name. * </p> * * @param attributeName the name of the attribute to be retrieved * @return the value of the attribute */ public Object getExecutionAttribute(final String attributeName) { return this.configuration.getExecutionAttributes().get(attributeName); }
/** * <p> * Obtain the expression parser (implementation of {@link IStandardExpressionParser}) registered by * the Standard Dialect that is being currently used. * </p> * * @param configuration the configuration object for the current template execution environment. * @return the parser object. */ public static IStandardExpressionParser getExpressionParser(final Configuration configuration) { final Object parser = configuration.getExecutionAttributes().get(STANDARD_EXPRESSION_PARSER_ATTRIBUTE_NAME); if (parser == null || (!(parser instanceof IStandardExpressionParser))) { throw new TemplateProcessingException( "No Standard Expression Parser has been registered as an execution argument. " + "This is a requirement for using Standard Expressions, and might happen " + "if neither the Standard or the SpringStandard dialects have " + "been added to the Template Engine and none of the specified dialects registers an " + "attribute of type " + IStandardExpressionParser.class.getName() + " with name " + "\"" + STANDARD_EXPRESSION_PARSER_ATTRIBUTE_NAME + "\""); } return (IStandardExpressionParser) parser; }
/** * <p> * Obtain the conversion service (implementation of {@link IStandardConversionService}) registered by * the Standard Dialect that is being currently used. * </p> * * @param configuration the configuration object for the current template execution environment. * @return the conversion service object. */ public static IStandardConversionService getConversionService(final Configuration configuration) { final Object conversionService = configuration.getExecutionAttributes().get(STANDARD_CONVERSION_SERVICE_ATTRIBUTE_NAME); if (conversionService == null || (!(conversionService instanceof IStandardConversionService))) { throw new TemplateProcessingException( "No Standard Conversion Service has been registered as an execution argument. " + "This is a requirement for using Standard Expressions, and might happen " + "if neither the Standard or the SpringStandard dialects have " + "been added to the Template Engine and none of the specified dialects registers an " + "attribute of type " + IStandardConversionService.class.getName() + " with name " + "\"" + STANDARD_CONVERSION_SERVICE_ATTRIBUTE_NAME + "\""); } return (IStandardConversionService) conversionService; }
/** * <p> * Obtain the variable expression evaluator (implementation of {@link IStandardVariableExpressionEvaluator}) * registered by the Standard Dialect that is being currently used. * </p> * <p> * Normally, there should be no need to obtain this object from the developers' code (only internally from * {@link IStandardExpression} implementations). * </p> * * @param configuration the configuration object for the current template execution environment. * @return the variable expression evaluator object. */ public static IStandardVariableExpressionEvaluator getVariableExpressionEvaluator(final Configuration configuration) { final Object expressionEvaluator = configuration.getExecutionAttributes().get(STANDARD_VARIABLE_EXPRESSION_EVALUATOR_ATTRIBUTE_NAME); if (expressionEvaluator == null || (!(expressionEvaluator instanceof IStandardVariableExpressionEvaluator))) { throw new TemplateProcessingException( "No Standard Variable Expression Evaluator has been registered as an execution argument. " + "This is a requirement for using Standard Expressions, and might happen " + "if neither the Standard or the SpringStandard dialects have " + "been added to the Template Engine and none of the specified dialects registers an " + "attribute of type " + IStandardVariableExpressionEvaluator.class.getName() + " with name " + "\"" + STANDARD_VARIABLE_EXPRESSION_EVALUATOR_ATTRIBUTE_NAME + "\""); } return (IStandardVariableExpressionEvaluator) expressionEvaluator; }