Examples of ImportImpl


Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

    @Test
    public void extendGroup_import_notFound() throws Exception {
        group1.setParentGroup("group2");

        group2.setImports(createImportList(new ImportImpl("group3", null)));

        try {
            initForm(createGroupList(group1, group2));
            fail();
        } catch (IllegalArgumentException e) {
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

    @Test
    public void extendGroup_import_cycle() throws Exception {
        group1.setParentGroup("group2");
        group2.setParentGroup("group3");

        group3.setImports(createImportList(new ImportImpl("group1", null)));

        try {
            initForm(createGroupList(group1, group2, group3));
            fail();
        } catch (IllegalArgumentException e) {
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

    public void extendAndImportGroup() throws Exception {
        // group1 -> group2
        group1.setParentGroup("group2");

        // group2 imports group3.*
        group2.setImports(createImportList(new ImportImpl("group3", null)));

        // group3 imports group4.field4
        group3.setImports(createImportList(new ImportImpl("group4", "field4")));

        initForm(createGroupList(group1, group2, group3, group4));

        assertFields(group1, "field1", "field2", "field3", "field4");
        assertFields(group2, "field2", "field3", "field4");
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

    public void getImports() throws Exception {
        // default is empty
        assertTrue(group.getImports().isEmpty());

        // setImports
        List<Import> imports = createImportList(new ImportImpl("groupName", "fieldName"));
        group.setImports(imports);

        assertEquals(1, group.getImports().size());
        assertSame(imports.get(0), group.getImports().get(0));
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

        assertEquals(expectedValue, group2.isPostOnly());
    }

    @Test
    public void import_fieldNotFound() throws Exception {
        group2.setImports(createImportList(new ImportImpl("group1", "notExistField")));

        formConfig.setGroupConfigImplList(createGroupList(group1, group2));

        try {
            formConfig.afterPropertiesSet();
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

        group2 = new GroupConfigImpl();
        group2.setName("group2");
        group2.setFieldConfigImplList(createFieldList(field2, field3));

        if (importAll) {
            imports = createImportList(new ImportImpl("group1", null));
        } else {
            imports = createImportList(new ImportImpl("group1", "field1"));
        }

        group2.setImports(imports);
        group2.afterPropertiesSet();
View Full Code Here

Examples of com.alibaba.citrus.service.form.impl.configuration.GroupConfigImpl.ImportImpl

        assertEquals("GroupConfig[name: group1, fields: 3]", group.toString());
    }

    @Test
    public void toString_import() {
        assertEquals("group1", new ImportImpl("group1", null).toString());
        assertEquals("group1", new ImportImpl(" group1 ", "  ").toString());
        assertEquals("group1.field1", new ImportImpl("group1", " field1 ").toString());
    }
View Full Code Here

Examples of org.eclipse.wst.wsdl.internal.impl.ImportImpl

        return result;
      }     
     
      Iterator<?> it = defn.getImports(qname.getNamespaceURI()).iterator();
      while (it.hasNext() && result == null) {
             ImportImpl imp = (ImportImpl) it.next();
             imp.importDefinitionOrSchema();              
             Definition importedDefinition = (Definition) imp.getDefinition();
             if (importedDefinition != null) {
                 result = resolveUsingFinder (importedDefinition, qname, finder, seen );                         
             }
        }
      return result;
View Full Code Here

Examples of org.eclipse.wst.wsdl.internal.impl.ImportImpl

        // TODO: I think I need to check all imports, not just those
        // matching the same namespace...
       
        Iterator<?> it = definition.getImports(qname.getNamespaceURI()).iterator();
        while (it.hasNext()) {
            ImportImpl imp = (ImportImpl) it.next();
            imp.importDefinitionOrSchema();
            schema = imp.getESchema();
            if (schema != null) {
                result = finder.find(schema, qname);
                if (result != null)
                    return result;
            }
            Definition importedDefinition = imp.getEDefinition();
            if (importedDefinition != null) {
                result = resolveXSD(importedDefinition, qname, finder, seen );
                if (result != null) {
                    return result;
                }               
View Full Code Here

Examples of org.jboss.forge.parser.java.impl.ImportImpl

        public boolean isWildcard() { return false; }
       
    }

    private Import buildImport(String importName) {
        return new ImportImpl(JavaParser.parse("public class MockClass {}")).setName(importName);
    }
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.