Examples of addMapping()


Examples of javax.servlet.ServletRegistration.Dynamic.addMapping()

    /**
     * Uses dynamic servlet registartaion for registering PushServlet automatically
     */
    private static void registerPushServlet(ServletContext context) {
        Dynamic dynamicRegistration = context.addServlet("AutoRegisteredPushServlet", PushServlet.class);
        dynamicRegistration.addMapping(PUSH_CONTEXT_DEFAULT_MAPPING);
        dynamicRegistration.setAsyncSupported(true);

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Auto-registered servlet " + PushServlet.class.getSimpleName() + " with mapping '" + PUSH_CONTEXT_DEFAULT_MAPPING + "'");
        }
View Full Code Here

Examples of javax.servlet.ServletRegistration.Dynamic.addMapping()

        }
    }

    private static void registerServlet(ServletContext context) {
        Dynamic dynamicRegistration = context.addServlet("AutoRegisteredResourceServlet", ResourceServlet.class);
        dynamicRegistration.addMapping(RICHFACES_RESOURCES_DEFAULT_MAPPING);

        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Auto-registered servlet " + ResourceServlet.class.getSimpleName() + " with mapping '" + RICHFACES_RESOURCES_DEFAULT_MAPPING + "'");
        }
    }
View Full Code Here

Examples of javax.validation.Configuration.addMapping()

    }

    if (this.mappingLocations != null) {
      for (Resource location : this.mappingLocations) {
        try {
          configuration.addMapping(location.getInputStream());
        }
        catch (IOException ex) {
          throw new IllegalStateException("Cannot read mapping resource: " + location);
        }
      }
View Full Code Here

Examples of jifx.commons.mapper.ejb.IMapper.addMapping()

      IMapper remote = (IMapper) context.lookup("MapperImp/remote");
      MapElement element = new MapElement();
      element.setKey("858");
      element.setValue("UY");
      element.setDescription("C�digo de moneda en pesos");
      remote.addMapping(element);
      MapElement mm = remote.getMapElement("m","858");
      System.out.println("Moneda: " + mm.getValue());
  } catch (NamingException e) {
      e.printStackTrace();
  }
View Full Code Here

Examples of net.datacrow.core.migration.itemimport.ItemImporter.addMapping()

       
        for (int i = 0; i < table.getRowCount(); i++) {
          String source = (String) table.getValueAt(i, 1, true);
          DcField target = (DcField) table.getValueAt(i, 2, true);
          if (target != null)
            importer.addMapping(source,  target);
        }
        return wizard.getDefinition();
    }

    @Override
View Full Code Here

Examples of org.andromda.core.mapping.Mappings.addMapping()

        mapping1.setTo(TO_1);
        mapping1.addFrom(FROM_1);
        mapping1.addFrom(FROM_2);
        mapping1.addFrom(FROM_3);
        mapping1.addFrom(FROM_4);
        mappings1.addMapping(mapping1);
        TypeMappings typeMappings1 = TypeMappings.getInstance(mappings1);

        // make sure the to == from when passing in a mappings1 that don't exist
        assertNotNull(typeMappings1.getTo(NOT_MAPPED_1));
        assertEquals(NOT_MAPPED_1, typeMappings1.getTo(NOT_MAPPED_1));
View Full Code Here

Examples of org.andromda.core.mapping.Mappings.addMapping()

        Mappings mappings2 = new Mappings();
        Mapping mapping2 = new Mapping();
        mapping2.setTo(TO_2);
        mapping2.addFrom(FROM_5);
        mappings2.addMapping(mapping2);
        TypeMappings typeMappings2 = TypeMappings.getInstance(mappings2);
        typeMappings2.setArraySuffix(ARRAY_SUFFIX);

        assertEquals(TO_2, typeMappings2.getTo(FROM_5));
        assertEquals(TO_2 + ARRAY_SUFFIX, typeMappings2.getTo(FROM_5 + ARRAY_SUFFIX));
View Full Code Here

Examples of org.andromda.core.mapping.Mappings.addMapping()

        Mappings mappings3 = new Mappings();
        Mapping mapping3 = new Mapping();
        mapping3.setTo(TO_3);
        mapping3.addFrom(FROM_6);
        mappings3.addMapping(mapping3);
        TypeMappings typeMappings3 = TypeMappings.getInstance(mappings3);
        // make sure whitespace isn't deleted, only trimmed (Java generics would fail compilation otherwise for example)
        assertEquals(
            TO_3,
            typeMappings3.getTo(FROM_6));
View Full Code Here

Examples of org.andromda.core.mapping.Mappings.addMapping()

        mapping1.setTo(TO_1);
        mapping1.addFrom(FROM_1);
        mapping1.addFrom(FROM_2);
        mapping1.addFrom(FROM_3);
        mapping1.addFrom(FROM_4);
        mappings1.addMapping(mapping1);

        // make sure the to == from when passing in a mappings1 that don't exist
        assertNotNull(mappings1.getTo(NOT_MAPPED_1));
        assertEquals(
            NOT_MAPPED_1,
View Full Code Here

Examples of org.andromda.core.mapping.Mappings.addMapping()

        Mappings mappings2 = new Mappings();
        Mapping mapping2 = new Mapping();
        mapping2.setTo(TO_2);
        mapping2.addFrom(FROM_5);
        mappings2.addMapping(mapping2);
        assertEquals(
            TO_2,
            mappings2.getTo(FROM_5));

        Mappings mappings3 = new Mappings();
View Full Code Here
TOP
Copyright © 2015 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.