Package org.apache.felix.ipojo.metadata

Examples of org.apache.felix.ipojo.metadata.Attribute


        return elem;       
    }
   
    private Element getElementHandlerFactoryWithNoClassName() {
        Element elem = new Element("handler", "");
        elem.addAttribute(new Attribute("name", "noclassname"));
        return elem;       
    }
View Full Code Here


        return elem;       
    }
  
    private Element getElementHandlerFactoryWithNoName() {
        Element elem = new Element("handler", "");
        elem.addAttribute(new Attribute("className", "noclassname"));
        return elem;       
    }
View Full Code Here

        }
    }
   
    public void testNoManipulationMetadata() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", "org.apache.felix.ipojo.test.scenarios.component.CallbackCheckService"));
        try {
            ComponentFactory fact = new ComponentFactory(getContext(), elem);
            fact.stop();
            fail("A factory with no manipulation metadata must be rejected");
        } catch (ConfigurationException e) {
View Full Code Here

    }
   
   
    private Element getNothing() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
View Full Code Here

        return elem;
    }
   
    private Element getNoField() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("filter", "(foo=bar)"));
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

        return elem;
    }
   
    private Element getBadField() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("field", "BAD_FIELD")); // missing field.
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

        return elem;
    }
   
    private Element getBadFilter() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("field", "fs"));
        callback.addAttribute(new Attribute("filter", "(foo=bar)&(bar=foo)")); // Incorrect filter
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

        return elem;
    }
   
    private Element getBadFrom() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("field", "fs"));
        callback.addAttribute(new Attribute("from", "ba(d&_")); // Incorrect from
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

        return elem;
    }
   
    private Element getBadType() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("field", "fs"));
        callback.addAttribute(new Attribute("interface", BarService.class.getName()));
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

        return elem;
    }
   
    private Element getBadAggregate() {
        Element elem = new Element("component", "");
        elem.addAttribute(new Attribute("classname", clazz));
       
        Element callback = new Element("requires", "");
        callback.addAttribute(new Attribute("field", "fs"));
        callback.addAttribute(new Attribute("aggregate", "true"));
        elem.addElement(callback);
        elem.addElement(manipulation);
        return elem;
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.metadata.Attribute

Copyright © 2018 www.massapicom. 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.