Spring Framework ManagedMap - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ManagedMap class.

This code example shows how to use the following methods:put
 
		// Register the handler 
		RegisteredBeanDefinition resourceHandler = helper.register(FacesResourceRequestHandler.class);
 
		// Register the mapping 
		Map<String, String> urlMap = new ManagedMap<String, String>();
		urlMap.put("/javax.faces.resource/**", resourceHandler.getName());
		RootBeanDefinition mapping = helper.rootBeanDefinition(SimpleUrlHandlerMapping.class);
		mapping.getPropertyValues().addPropertyValue("urlMap", urlMap);
		mapping.getPropertyValues().addPropertyValue("order", element.getAttribute("order"));
		helper.register(mapping);
 
		return null; 
	} 
} 
6
CodeRank
This code example shows how to use the following methods:
		return XPathHeaderEnricher.class.getName();
	} 
 
	@Override 
	protected void parseTransformer(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
		ManagedMap<String, Object> headers = new ManagedMap<String, Object>();
		this.processHeaders(element, headers, parserContext);
		builder.addConstructorArgValue(headers);
		IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "default-overwrite");
		IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "should-skip-nulls");
	} 
 
	protected void processHeaders(Element element, ManagedMap<String, Object> headers, ParserContext parserContext) {
		Object source = parserContext.extractSource(element);
		NodeList childNodes = element.getChildNodes();
		for (int i = 0; i < childNodes.getLength(); i++) {
			Node node = childNodes.item(i);
			if (node.getNodeType() == Node.ELEMENT_NODE) {
				Element headerElement = (Element) node;
				String elementName = node.getLocalName();
5
CodeRank
This code example shows how to use the following methods:
 * @author Artem Bilan 
 * @since 3.0 
 */ 
public class SpelPropertyAccessorsParser implements BeanDefinitionParser {
 
	private final Map<String, Object> propertyAccessors = new ManagedMap<String, Object>();
 
	private volatile boolean initialized;
 
	@Override 
	public BeanDefinition parse(Element element, ParserContext parserContext) {
		this.initializeSpelPropertyAccessorRegistrarIfNecessary(parserContext);
 
		BeanDefinitionParserDelegate delegate = parserContext.getDelegate();
 
		NodeList children = element.getChildNodes();
 
		for (int i = 0; i < children.getLength(); i++) {
			Node node = children.item(i);
			String propertyAccessorName = null;
5
CodeRank
This code example shows how to use the following methods:put
	 *  
	 * @return 
	 */ 
	static BeanDefinitionBuilder getWriteConcernPropertyEditorBuilder() {
 
		Map<String, Class<?>> customEditors = new ManagedMap<String, Class<?>>();
		customEditors.put("com.mongodb.WriteConcern", WriteConcernPropertyEditor.class);
 
		BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CustomEditorConfigurer.class);
		builder.addPropertyValue("customEditors", customEditors);
 
		return builder;
	} 
} 
4
CodeRank
This code example shows how to use the following methods:put
	 * AbstractSingleBeanDefinitionParser but have the side effect of registering a 'default' property editor with the 
	 * container. 
	 */ 
	private BeanDefinitionBuilder registerServerAddressPropertyEditor() {
 
		Map<String, String> customEditors = new ManagedMap<String, String>();
		customEditors.put("com.mongodb.ServerAddress[]",
				"org.springframework.data.mongodb.config.ServerAddressPropertyEditor"); 
 
		BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CustomEditorConfigurer.class);
		builder.addPropertyValue("customEditors", customEditors);
		return builder;
	} 
} 
4
CodeRank
This code example shows how to use the following methods:
	} 
 
	@Override 
	@SuppressWarnings({"unchecked", "rawtypes"}) 
	protected void parseTransformer(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
		ManagedMap headers = new ManagedMap();
		this.processHeaders(element, headers, parserContext);
		builder.addConstructorArgValue(headers);
		IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "default-overwrite");
		IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "should-skip-nulls");
		this.postProcessHeaderEnricher(builder, element, parserContext);
	} 
 
	protected void processHeaders(Element element, ManagedMap<String, Object> headers, ParserContext parserContext) {
		NodeList childNodes = element.getChildNodes();
		for (int i = 0; i < childNodes.getLength(); i++) {
			Node node = childNodes.item(i);
			if (node.getNodeType() == Node.ELEMENT_NODE) {
				String headerName = null;
				Element headerElement = (Element) node;
4
CodeRank
See Code Examples for Spring Framework ManagedMap Methods: