Examples of addMappings()


Examples of com.denimgroup.threadfix.framework.engine.partial.PartialMappingDatabase.addMappings()

  @Test
  public void testBasicPartialMappingsForAppScan() {
    PartialMappingDatabase test = PartialMappingsDatabaseFactory.getPartialMappingsDatabase(
        TestUtils.getMappings(petClinicAppScanData), FrameworkType.SPRING_MVC);
   
    test.addMappings(TestUtils.getMappings(petClinicFortifyData));
   
    for (String[] stringArray : springMvcQueries) {
     
      String testDescription = "Path = " + stringArray[0] + ", expected " + stringArray[1];
      PartialMapping result = test.findBestMatch(new DefaultPartialMapping(null, stringArray[0]));
View Full Code Here

Examples of com.sun.cli.jmx.cmd.CmdFactoryIniter.addMappings()

    final java.util.Iterator  iter  = list.iterator();
    while ( iter.hasNext() )
    {
      final String  classname  = (String)iter.next();
     
      initer.addMappings( ClassUtil.getClassFromName( classname ) );
    }
  }
 
    void
  handleSingle( String [] args )
View Full Code Here

Examples of io.undertow.servlet.api.ServletInfo.addMappings()

                s = new ServletInfo(servlet.getServletName(), (Class<? extends Servlet>) servlet.getServletClass(), new ImmediateInstanceFactory<>(servlet.getServlet()));
            }
            if (servlet.isForceInit()) {
                s.setLoadOnStartup(1);
            }
            s.addMappings(servlet.getUrlMappings());
            for (Map.Entry<String, String> param : servlet.getInitParams().entrySet()) {
                s.addInitParam(param.getKey(), param.getValue());
            }
            d.addServlet(s);
        }
View Full Code Here

Examples of org.modelmapper.ModelMapper.addMappings()

        map().setStreet(source.getAddress().getStreet());
        map(source.getAddress().city, destination.city);
      }
    };

    modelMapper.addMappings(personMap);
    PersonDTO dto = modelMapper.map(person, PersonDTO.class);

    assertEquals(dto.getStreet(), person.getAddress().getStreet());
    assertEquals(dto.getCity(), person.getAddress().getCity());
View Full Code Here

Examples of org.modelmapper.ModelMapper.addMappings()

        map().getAddress().setStreet(source.getStreet());
        map().address.setCity(source.city);
      }
    };

    modelMapper.addMappings(orderMap);
    Order order = modelMapper.map(orderDTO, Order.class);

    assertEquals(order.getAddress().getStreet(), orderDTO.getStreet());
    assertEquals(order.getAddress().getCity(), orderDTO.getCity());
View Full Code Here

Examples of org.modelmapper.ModelMapper.addMappings()

   * Order to OrderDTO.
   */
  static void mapExplicitly() {
    Order order = createOrder();
    ModelMapper modelMapper = new ModelMapper();
    modelMapper.addMappings(new PropertyMap<Order, OrderDTO>() {
      @Override
      protected void configure() {
        map().setBillingStreet(source.getBillingAddress().getStreet());
        map(source.billingAddress.getCity(), destination.billingCity);
      }
View Full Code Here

Examples of org.modelmapper.ModelMapper.addMappings()

  public void shouldSupportMultipleSourceMappings() {
    ModelMapper mapper = new ModelMapper();
    mapper.getConfiguration().setMatchingStrategy(MatchingStrategies.LOOSE);
    mapper.getConfiguration().setAmbiguityIgnored(true);

    mapper.addMappings(new PropertyMap<FromOuter, ToOuter>() {
      protected void configure() {
        map(source.getInner().getOne()).getInner().setA(null);
        map(source.getInner().getTwo()).getInner().setB(null);
        map(source.getInner().getThree()).getInner().setC(null);
      }
View Full Code Here

Examples of org.modelmapper.ModelMapper.addMappings()

  };

  public void test() {
    ModelMapper modelMapper;
    modelMapper = new ModelMapper();
    modelMapper.addMappings(map);

    Source src = new Source();
    src.setBI(BigInteger.valueOf(4));
    src.setBd(new BigDecimal("123.123"));
View Full Code Here

Examples of org.ocpsoft.rewrite.servlet.ServletRegistration.addMappings()

         List<ServletRegistration> result = new ArrayList<ServletRegistration>();

         for (javax.servlet.ServletRegistration r : context.getServletRegistrations().values()) {
            ServletRegistration registration = new ServletRegistration();
            registration.setClassName(r.getClassName());
            registration.addMappings(r.getMappings());
            result.add(registration);
         }

         return result;
View Full Code Here

Examples of org.ocpsoft.rewrite.servlet.ServletRegistration.addMappings()

            reg.setClassName(servletEntry.servletClass);

            // we can lookup the mappings from the mappings map
            ServletMappingEntry mapping = servletMappings.get(servletEntry.servletName);
            if (mapping != null) {
               reg.addMappings(mapping.mappings);
            }

            registrations.add(reg);

         }
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.