use of org.springframework.context.expression.MapAccessor in project spring-boot-admin by codecentric.
the class OpsGenieNotifier method getMessage.
@Nullable
protected String getMessage(InstanceEvent event, Instance instance) {
Map<String, Object> root = new HashMap<>();
root.put("event", event);
root.put("instance", instance);
root.put("lastStatus", getLastStatus(event.getInstance()));
StandardEvaluationContext context = new StandardEvaluationContext(root);
context.addPropertyAccessor(new MapAccessor());
return description.getValue(context, String.class);
}
use of org.springframework.context.expression.MapAccessor in project spring-boot-admin by codecentric.
the class HipchatNotifier method getMessage.
@Nullable
protected String getMessage(InstanceEvent event, Instance instance) {
Map<String, Object> root = new HashMap<>();
root.put("event", event);
root.put("instance", instance);
root.put("lastStatus", getLastStatus(event.getInstance()));
StandardEvaluationContext context = new StandardEvaluationContext(root);
context.addPropertyAccessor(new MapAccessor());
return description.getValue(context, String.class);
}
use of org.springframework.context.expression.MapAccessor in project spring-boot-admin by codecentric.
the class MicrosoftTeamsNotifier method createEvaluationContext.
protected StandardEvaluationContext createEvaluationContext(InstanceEvent event, Instance instance) {
Map<String, Object> root = new HashMap<>();
root.put("event", event);
root.put("instance", instance);
root.put("lastStatus", getLastStatus(event.getInstance()));
StandardEvaluationContext context = new StandardEvaluationContext(root);
context.addPropertyAccessor(new MapAccessor());
return context;
}
use of org.springframework.context.expression.MapAccessor in project spring-boot-admin by codecentric.
the class PagerdutyNotifier method getDescription.
@Nullable
protected String getDescription(InstanceEvent event, Instance instance) {
Map<String, Object> root = new HashMap<>();
root.put("event", event);
root.put("instance", instance);
root.put("lastStatus", getLastStatus(event.getInstance()));
StandardEvaluationContext context = new StandardEvaluationContext(root);
context.addPropertyAccessor(new MapAccessor());
return description.getValue(context, String.class);
}
use of org.springframework.context.expression.MapAccessor in project cas by apereo.
the class AbstractCasWebflowConfigurer method getSpringExpressionParser.
/**
* Gets spring expression parser.
*
* @return the spring expression parser
*/
public SpringELExpressionParser getSpringExpressionParser() {
val configuration = new SpelParserConfiguration();
val spelExpressionParser = new SpelExpressionParser(configuration);
val parser = new SpringELExpressionParser(spelExpressionParser, this.flowBuilderServices.getConversionService());
parser.addPropertyAccessor(new ActionPropertyAccessor());
parser.addPropertyAccessor(new BeanFactoryPropertyAccessor());
parser.addPropertyAccessor(new FlowVariablePropertyAccessor());
parser.addPropertyAccessor(new MapAdaptablePropertyAccessor());
parser.addPropertyAccessor(new MessageSourcePropertyAccessor());
parser.addPropertyAccessor(new ScopeSearchingPropertyAccessor());
parser.addPropertyAccessor(new BeanExpressionContextAccessor());
parser.addPropertyAccessor(new MapAccessor());
parser.addPropertyAccessor(new MapAdaptablePropertyAccessor());
parser.addPropertyAccessor(new EnvironmentAccessor());
parser.addPropertyAccessor(new ReflectivePropertyAccessor());
return parser;
}
Aggregations