Examples of MapEntryConfig


Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

  {
    ReferenceParticleConfig xml = ReferenceParticleConfig.Factory.newInstance();
    xml.setReference( referenceQName );
    for( Map.Entry<String, String> entry : attributes.entrySet() )
    {
      MapEntryConfig mapEntry = xml.addNewAttribute();
      mapEntry.setKey( entry.getKey() );
      mapEntry.setValue( entry.getValue() );
    }
    return xml;
  }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

  {
    ElementParticleConfig xml = ElementParticleConfig.Factory.newInstance();
    xml.setName( name );
    for( Map.Entry<String, String> entry : attributes.entrySet() )
    {
      MapEntryConfig mapEntry = xml.addNewAttribute();
      mapEntry.setKey( entry.getKey() );
      mapEntry.setValue( entry.getValue() );
    }
    TypeConfig xml2 = type.save();
    xml.setType( xml2 );
    return xml;
  }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

  {
    AttributeParticleConfig xml = AttributeParticleConfig.Factory.newInstance();
    xml.setName( name );
    for( Map.Entry<String, String> entry : attributes.entrySet() )
    {
      MapEntryConfig mapEntry = xml.addNewAttribute();
      mapEntry.setKey( entry.getKey() );
      mapEntry.setValue( entry.getValue() );
    }
    xml.setType( type.save() );
    return xml;
  }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

  public void save( SchemaConfig xml )
  {
    xml.setNamespace( namespace );
    for( Map.Entry<String, String> entry : prefixes.entrySet() )
    {
      MapEntryConfig mapEntry = xml.addNewPrefix();
      mapEntry.setKey( entry.getKey() );
      mapEntry.setValue( entry.getValue() );
    }
    List<ParticleConfig> particleList = new ArrayList<ParticleConfig>();
    for( Particle item : particles )
      particleList.add( item.save() );
    xml.setParticleArray( particleList.toArray( new ParticleConfig[0] ) );
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

     * @param xml A blank XmlObject to save to.
     */
    public void save(SchemaConfig xml) {
        xml.setNamespace(namespace);
        for (Map.Entry<String, String> entry : prefixes.entrySet()) {
            MapEntryConfig mapEntry = xml.addNewPrefix();
            mapEntry.setKey(entry.getKey());
            mapEntry.setValue(entry.getValue());
        }
        List<ParticleConfig> particleList = new ArrayList<ParticleConfig>();
        for (Particle item : particles) {
            particleList.add(item.save());
        }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

    public ReferenceParticleConfig save() {
        ReferenceParticleConfig xml = ReferenceParticleConfig.Factory.newInstance();
        xml.setReference(referenceQName);
        for (Map.Entry<String, String> entry : attributes.entrySet()) {
            MapEntryConfig mapEntry = xml.addNewAttribute();
            mapEntry.setKey(entry.getKey());
            mapEntry.setValue(entry.getValue());
        }
        return xml;
    }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

    public ElementParticleConfig save() {
        ElementParticleConfig xml = ElementParticleConfig.Factory.newInstance();
        xml.setName(name);
        for (Map.Entry<String, String> entry : attributes.entrySet()) {
            MapEntryConfig mapEntry = xml.addNewAttribute();
            mapEntry.setKey(entry.getKey());
            mapEntry.setValue(entry.getValue());
        }
        TypeConfig xml2 = type.save();
        xml.setType(xml2);
        return xml;
    }
View Full Code Here

Examples of com.eviware.soapui.inferredSchema.MapEntryConfig

    public AttributeParticleConfig save() {
        AttributeParticleConfig xml = AttributeParticleConfig.Factory.newInstance();
        xml.setName(name);
        for (Map.Entry<String, String> entry : attributes.entrySet()) {
            MapEntryConfig mapEntry = xml.addNewAttribute();
            mapEntry.setKey(entry.getKey());
            mapEntry.setValue(entry.getValue());
        }
        xml.setType(type.save());
        return xml;
    }
View Full Code Here

Examples of org.apache.shale.tiger.managed.config.MapEntryConfig

    public void testMap() throws Exception {

        ManagedBeanConfig mb = null;
        ManagedPropertyConfig mp = null;
        MapEntriesConfig entries = null;
        MapEntryConfig entry = null;

        // Wire up our FacesConfigConfig instance
        parser.setFacesConfig(facesConfig);
        assertTrue(facesConfig == parser.getFacesConfig());

        // Make sure we do validating parses
        parser.setValidating(true);
        assertTrue(parser.isValidating());

        // Parse resource 5
        parser.setResource(this.getClass().getResource
                ("/org/apache/shale/tiger/config/test-config-5.xml"));
        assertNotNull(parser.getResource());
        parser.parse();
        assertEquals(2, facesConfig.getManagedBeans().size());

        // Validate bean "stringDateMap"
        mb = facesConfig.getManagedBean("stringIntegerMap");
        assertNotNull(mb);
        assertEquals("stringIntegerMap", mb.getName());
        assertEquals("none", mb.getScope());
        assertEquals("java.util.TreeMap", mb.getType());
        assertNull(mb.getListEntries());
        assertNotNull(mb.getMapEntries());
        assertEquals(0, mb.getProperties().size());

        entries = mb.getMapEntries();
        assertEquals("java.lang.String", entries.getKeyType());
        assertEquals("java.lang.Integer", entries.getValueType());
        assertEquals(4, entries.getEntries().size());

        entry = entries.getEntries().get(0);
        assertEquals("First", entry.getKey());
        assertEquals("123", entry.getValue());
        assertTrue(!entry.isExpression());
        assertTrue(!entry.isNullValue());

        entry = entries.getEntries().get(1);
        assertEquals("Second", entry.getKey());
        assertEquals("234", entry.getValue());
        assertTrue(!entry.isExpression());
        assertTrue(!entry.isNullValue());

        entry = entries.getEntries().get(2);
        assertEquals("Third", entry.getKey());
        assertNull(entry.getValue());
        assertTrue(!entry.isExpression());
        assertTrue(entry.isNullValue());

        entry = entries.getEntries().get(3);
        assertEquals("Fourth", entry.getKey());
        assertEquals("345", entry.getValue());
        assertTrue(!entry.isExpression());
        assertTrue(!entry.isNullValue());

        // Validate bean "mapPropertiesBean"
        mb = facesConfig.getManagedBean("mapPropertiesBean");
        assertNotNull(mb);
        assertEquals("mapPropertiesBean", mb.getName());
        assertEquals("application", mb.getScope());
        assertEquals("org.apache.shale.tiger.config.TestBean5", mb.getType());
        assertNull(mb.getListEntries());
        assertNull(mb.getMapEntries());
        assertEquals(2, mb.getProperties().size());

        mp = mb.getProperty("emptyMap");
        assertNotNull(mp);
        assertEquals("emptyMap", mp.getName());
        assertNull(mp.getValue());
        assertTrue(!mp.isExpression());
        assertTrue(!mp.isNullValue());
        assertNull(mp.getListEntries());
        assertNotNull(mp.getMapEntries());

        entries = mp.getMapEntries();
        assertNull(entries.getKeyType());
        assertNull(entries.getValueType());
        assertEquals(3, entries.getEntries().size());

        entry = entries.getEntries().get(0);
        assertTrue(!entry.isExpression());
        assertEquals("First Key", entry.getKey());
        assertEquals("First Value", entry.getValue());

        entry = entries.getEntries().get(1);
        assertTrue(!entry.isExpression());
        assertEquals("Second Key", entry.getKey());
        assertEquals("Second Value", entry.getValue());

        entry = entries.getEntries().get(2);
        assertTrue(!entry.isExpression());
        assertEquals("Third Key", entry.getKey());
        assertEquals("Third Value", entry.getValue());

        mp = mb.getProperty("fullMap");
        assertNotNull(mp);
        assertEquals("fullMap", mp.getName());
        assertNull(mp.getValue());
        assertTrue(!mp.isExpression());
        assertTrue(!mp.isNullValue());
        assertNull(mp.getListEntries());
        assertNotNull(mp.getMapEntries());

        entries = mp.getMapEntries();
        assertNull(entries.getKeyType());
        assertNull(entries.getValueType());
        assertEquals(3, entries.getEntries().size());

        entry = entries.getEntries().get(0);
        assertTrue(!entry.isExpression());
        assertEquals("First Key", entry.getKey());
        assertEquals("First Value", entry.getValue());

        entry = entries.getEntries().get(1);
        assertTrue(!entry.isExpression());
        assertEquals("Second Key", entry.getKey());
        assertEquals("Second Value", entry.getValue());

        entry = entries.getEntries().get(2);
        assertTrue(!entry.isExpression());
        assertEquals("Third Key", entry.getKey());
        assertEquals("Third Value", entry.getValue());

    }
View Full Code Here

Examples of org.apache.shale.tiger.managed.config.MapEntryConfig

     *  of the correct type
     * @exception Exception if a different error occurs
     */
    public void end(String namespace, String name) throws Exception {

        MapEntryConfig config = (MapEntryConfig) digester.pop();
        MapEntriesConfig parent = (MapEntriesConfig) digester.peek();
        MapEntryConfig previous = parent.getEntry(config.getKey());
        if (previous == null) {
            parent.addEntry(config);
        } else {
            merge(config, previous);
        }
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.