Examples of ConverterFactory


Examples of org.axonframework.serializer.ConverterFactory

    public void testUpcastObject_NoTypeConversionRequired() {
        Upcaster mockUpcaster12 = new StubUpcaster<byte[]>(intermediate1.getType(), intermediate2, byte[].class);
        Upcaster mockUpcasterFake = mock(Upcaster.class, "Fake upcaster");
        Upcaster mockUpcaster23 = new StubUpcaster<byte[]>(intermediate2.getType(), intermediate3, byte[].class);

        final ConverterFactory converterFactory = mock(ConverterFactory.class);
        UpcasterChain chain = createUpcasterChain(converterFactory, mockUpcaster12, mockUpcasterFake, mockUpcaster23);

        List<SerializedObject> actual1 = chain.upcast(object1, upcastingContext);
        assertEquals(object3.getType(), actual1.get(0).getType());
View Full Code Here

Examples of org.jamesii.core.model.symbolic.convert.plugintype.ConverterFactory

   * @return the converter
   */
  private IConverter getConverter(Class<?> targetFormat) {
    ParameterBlock pb = new ParameterBlock();
    pb.addSubBl(AbstractConverterFactory.TYPE, targetFormat);
    ConverterFactory cF = null;
    try {
      cF =
          SimSystem.getRegistry()
              .getFactory(AbstractConverterFactory.class, pb);
    } catch (NoFactoryFoundException nothingFound) {
      if (targetFormat.equals(SimpleDocument.class)) {
        return new DefaultConverter();
      }

      throw new ConversionException("Configuration problem: No converter for "
          + this.getClass().getCanonicalName() + " to a document of type "
          + targetFormat + " exists!", nothingFound);
    }
    pb.setValue(this);
    return cF.create(pb, SimSystem.getRegistry().createContext());
  }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

         // Set Default Value
         if (!"".equals(atts.defaultValue()))
         {
            ExportedInstance<ConverterFactory> exportedInstance = addonRegistry
                     .getExportedInstance(ConverterFactory.class);
            ConverterFactory converterFactory = exportedInstance.get();
            try
            {
               InputComponents.setDefaultValueFor(converterFactory, (InputComponent<?, Object>) input,
                        atts.defaultValue());
            }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

         // Set Default Value
         if (!"".equals(atts.defaultValue()))
         {
            Imported<ConverterFactory> instance = addonRegistry.getServices(ConverterFactory.class);
            ConverterFactory converterFactory = instance.get();
            try
            {
               InputComponents.setDefaultValueFor(converterFactory, (InputComponent<?, Object>) input,
                        atts.defaultValue());
            }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

         // Set Default Value
         if (!"".equals(atts.defaultValue()))
         {
            Imported<ConverterFactory> instance = addonRegistry.getServices(ConverterFactory.class);
            ConverterFactory converterFactory = instance.get();
            try
            {
               InputComponents.setDefaultValueFor(converterFactory, (InputComponent<?, Object>) input,
                        atts.defaultValue());
            }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

         // Set Default Value
         if (!"".equals(option.defaultValue()))
         {
            Imported<ConverterFactory> instance = addonRegistry.getServices(ConverterFactory.class);
            ConverterFactory converterFactory = instance.get();
            try
            {
               InputComponents.setDefaultValueFor(converterFactory, (InputComponent<?, Object>) input,
                        option.defaultValue());
            }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

   @Override
   public ShellUIPromptImpl createPrompt(UIContext context)
   {
      ShellContext shellContext = (ShellContext) context;
      ConverterFactory converterFactory = addonRegistry.getServices(ConverterFactory.class).get();
      return new ShellUIPromptImpl(shellContext, converterFactory);
   }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

   @Override
   public ShellUIPromptImpl createPrompt(UIContext context)
   {
      ShellContext shellContext = (ShellContext) context;
      ConverterFactory converterFactory = addonRegistry.getServices(ConverterFactory.class).get();
      return new ShellUIPromptImpl(shellContext, converterFactory);
   }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

   @Override
   public ShellUIPromptImpl createPrompt(UIContext context)
   {
      ShellContext shellContext = (ShellContext) context;
      ConverterFactory converterFactory = addonRegistry.getServices(ConverterFactory.class).get();
      return new ShellUIPromptImpl(shellContext, converterFactory);
   }
View Full Code Here

Examples of org.jboss.forge.addon.convert.ConverterFactory

         // Set Default Value
         if (!"".equals(atts.defaultValue()))
         {
            Imported<ConverterFactory> instance = addonRegistry.getServices(ConverterFactory.class);
            ConverterFactory converterFactory = instance.get();
            try
            {
               InputComponents.setDefaultValueFor(converterFactory, (InputComponent<?, Object>) input,
                        atts.defaultValue());
            }
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.