Examples of addConverter()


Examples of org.eclipse.persistence.oxm.mappings.XMLChoiceCollectionMapping.addConverter()

                mapping.addChoiceElement(xpath.getName(), type.getQualifiedName());
                if(!originalType.getQualifiedName().equals(type.getQualifiedName())) {
                    if(mapping.getClassNameToFieldMappings().get(originalType.getQualifiedName()) == null) {
                        mapping.getClassNameToFieldMappings().put(originalType.getQualifiedName(), xpath);
                    }
                    mapping.addConverter(xpath, converter);
                }
               
            }
                       
            if(xmlField !=null){
View Full Code Here

Examples of org.eclipse.persistence.oxm.mappings.XMLChoiceObjectMapping.addConverter()

                mapping.addChoiceElement(xpath, type.getQualifiedName());
                if(!originalType.getQualifiedName().equals(type.getQualifiedName())) {
                    if(mapping.getClassNameToFieldMappings().get(originalType.getQualifiedName()) == null) {
                        mapping.getClassNameToFieldMappings().put(originalType.getQualifiedName(), xpath);
                    }
                    mapping.addConverter(xpath, converter);
                }
                Mapping nestedMapping = (Mapping) mapping.getChoiceElementMappings().get(xpath);
                if(nestedMapping instanceof BinaryDataMapping){
                  ((BinaryDataMapping)nestedMapping).getNullPolicy().setNullRepresentedByEmptyNode(false);
                }
View Full Code Here

Examples of org.jcodings.transcode.EConv.addConverter()

            } else {
                sname[0] = NULL_BYTE_ARRAY;
                dname[0] = elt.convertToString().getBytes();
            }
            if (DECORATOR_P(sname[0], dname[0])) {
                boolean ret = ec.addConverter(sname[0], dname[0], ec.numTranscoders);
                if (!ret) {
                    throw runtime.newArgumentError("decoration failed: " + new String(dname[0]));
                }
            } else {
                int j = ec.numTranscoders;
View Full Code Here

Examples of org.springframework.binding.convert.service.DefaultConversionService.addConverter()

    AbstractMvcView view = new MockMvcView(mvcView, context);
    view.setExpressionParser(createExpressionParser());
    DefaultConversionService conversionService = new DefaultConversionService();
    StringToDate stringToDate = new StringToDate();
    stringToDate.setPattern("MM-dd-yyyy");
    conversionService.addConverter("customDateConverter", stringToDate);
    view.setConversionService(conversionService);
    BinderConfiguration binderConfiguration = new BinderConfiguration();
    binderConfiguration.addBinding(new Binding("dateProperty", "customDateConverter", true));
    view.setBinderConfiguration(binderConfiguration);
    view.processUserEvent();
View Full Code Here

Examples of org.springframework.binding.convert.service.GenericConversionService.addConverter()

   * implementations, setting the externally-provided builder services conversion service as its parent.
   * @return the flow builder conversion service
   */
  protected ConversionService createConversionService() {
    GenericConversionService service = new GenericConversionService();
    service.addConverter(new TextToTransitionCriteria(this));
    service.addConverter(new TextToTargetStateResolver(this));
    service.setParent(new ParentConversionServiceProxy());
    return service;
  }

View Full Code Here

Examples of org.springframework.binding.convert.service.GenericConversionService.addConverter()

   * @return the flow builder conversion service
   */
  protected ConversionService createConversionService() {
    GenericConversionService service = new GenericConversionService();
    service.addConverter(new TextToTransitionCriteria(this));
    service.addConverter(new TextToTargetStateResolver(this));
    service.setParent(new ParentConversionServiceProxy());
    return service;
  }

  private void initFlowAttributes(AttributeMap flowAttributes) {
View Full Code Here

Examples of org.springframework.binding.convert.support.DefaultConversionService.addConverter()

  protected ConversionService createConversionService() {
    DefaultConversionService service = new DefaultConversionService();
    service.addConverter(new TextToDate(getFormatterFactory(), true));
    service.addConverter(new DateToText(getFormatterFactory(), true));
    service.addConverter(new TextToNumber(getFormatterFactory(), true));
    service.addConverter(new NumberToText(getFormatterFactory(), true));
    service.addConverter(new BooleanToText());
    service.addConverter(new TextToBoolean());
    service.addConverter(new CollectionConverter());
    service.addConverter(new ListModelConverter());
    return service;
View Full Code Here

Examples of org.springframework.core.convert.converter.ConverterRegistry.addConverter()

            }
            else {
                converterRegistry = (ConverterRegistry)existingConversionService;
            }

            converterRegistry.addConverter(new Converter<GrailsApplication, org.codehaus.groovy.grails.commons.GrailsApplication>() {
                @Override
                public org.codehaus.groovy.grails.commons.GrailsApplication convert(GrailsApplication source) {
                    return new LegacyGrailsApplication(source);
                }
            });
View Full Code Here

Examples of org.springframework.core.convert.support.ConfigurableConversionService.addConverter()

  protected ConfigurableConversionService createDefaultConversionService() {

    ConfigurableConversionService conversionService = new DefaultConversionService();

    for (Converter<?, ?> converter : DEFAULT_CONVERTERS) {
      conversionService.addConverter(converter);
    }

    return conversionService;
  }
View Full Code Here

Examples of org.springframework.core.convert.support.DefaultConversionService.addConverter()

  public static class Config {

    @Bean
    public ConversionService webSocketConversionService() {
      GenericConversionService conversionService = new DefaultConversionService();
      conversionService.addConverter(new MyTypeToStringConverter());
      conversionService.addConverter(new MyTypeToBytesConverter());
      conversionService.addConverter(new StringToMyTypeConverter());
      conversionService.addConverter(new BytesToMyTypeConverter());
      return conversionService;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.