serializationConfigBuilder.addPropertyValue("dataSerializableFactoryClasses", classNames);
serializationConfigBuilder.addPropertyValue("dataSerializableFactories", factories);
}
protected void handleSerializers(final Node node, final BeanDefinitionBuilder serializationConfigBuilder) {
BeanDefinitionBuilder globalSerializerConfigBuilder = null;
String implementation = "implementation";
String className = "class-name";
String typeClassName = "type-class";
ManagedList serializers = new ManagedList();
for (Node child : new IterableNodeList(node, Node.ELEMENT_NODE)) {
final String name = cleanNodeName(child);
if ("global-serializer".equals(name)) {
globalSerializerConfigBuilder = createBeanBuilder(GlobalSerializerConfig.class);
final NamedNodeMap attrs = child.getAttributes();
final Node implRef = attrs.getNamedItem(implementation);
final Node classNode = attrs.getNamedItem(className);
if(implRef != null) {
globalSerializerConfigBuilder.addPropertyReference(xmlToJavaName(implementation), getTextContent(implRef));
}
if(classNode != null) {
globalSerializerConfigBuilder.addPropertyValue(xmlToJavaName(className), getTextContent(classNode));
}
}
if ("serializer".equals(name)) {
BeanDefinitionBuilder serializerConfigBuilder = createBeanBuilder(SerializerConfig.class);
fillAttributeValues(child, serializerConfigBuilder);
final NamedNodeMap attrs = child.getAttributes();
final Node implRef = attrs.getNamedItem(implementation);
final Node classNode = attrs.getNamedItem(className);
final Node typeClass = attrs.getNamedItem(typeClassName);
if(typeClass != null){
serializerConfigBuilder.addPropertyValue( "typeClassName",getTextContent(typeClass));
}
if(implRef != null) {
serializerConfigBuilder.addPropertyReference(xmlToJavaName(implementation), getTextContent(implRef));
}
if(classNode != null) {
serializerConfigBuilder.addPropertyValue(xmlToJavaName(className), getTextContent(classNode));
}
serializers.add(serializerConfigBuilder.getBeanDefinition());
}
}
if(globalSerializerConfigBuilder != null) {
serializationConfigBuilder.addPropertyValue("globalSerializerConfig", globalSerializerConfigBuilder.getBeanDefinition());
}