Package org.auraframework.instance

Examples of org.auraframework.instance.Attribute


        if (component != null) {
            AttributeSet componentAttributes = component.getAttributes();
            if (componentAttributes.getValue(name) != null) {
                Iterator<Attribute> iterator = componentAttributes.iterator();
                while (iterator.hasNext()) {
                    Attribute attribute = iterator.next();
                    if (attribute.getName().equalsIgnoreCase(name)) {
                        iterator.remove();
                        break;
                    }
                }
            }
View Full Code Here


        for (DefDescriptor<AttributeDef> desc : attrs.keySet()) {
            Object val = lookup.get(desc);
            if (val != null) {
                if (val instanceof Attribute) {
                    Attribute attribute = (Attribute) val;
                    setExpression(attribute.getDescriptor(), new PropertyReferenceImpl("v." + attribute.getName(),
                            SUPER_PASSTHROUGH));
                } else if (val instanceof AttributeDefRef) {
                    set((AttributeDefRef) val);
                }
            }
View Full Code Here

    @Override
    public Object getExpression(String name) {
        DefDescriptor<AttributeDef> desc = DefDescriptorImpl.getInstance(name, AttributeDef.class);

        Attribute at = attributes.get(desc);
        if (at != null) {
            return at.getValue();
        }
        return null;
    }
View Full Code Here

    public AttributeImplTest(String name) {
        super(name);
    }

    public void testAttribute() throws Exception {
        Attribute testAttribute = vendor.makeAttribute("testAttribute");
        assertNotNull(testAttribute);
    }
View Full Code Here

        Attribute testAttribute = vendor.makeAttribute("testAttribute");
        assertNotNull(testAttribute);
    }

    public void testGetName() throws Exception {
        Attribute testAttribute = vendor.makeAttribute("testAttribute");
        assertEquals("testAttribute", testAttribute.getName());
    }
View Full Code Here

    }

    public void testSetAndGetValue() throws Exception {
        String valString = "-1";
        int valInt = -1;
        Attribute testAttribute = vendor.makeAttribute("testAttribute");

        testAttribute.setValue(null);
        assertNull(testAttribute.getValue());
        assertFalse(valString.equals(testAttribute.getValue()));
        assertFalse(Integer.valueOf(valInt).equals(testAttribute.getValue()));

        testAttribute.setValue(valString);
        assertNotNull(testAttribute.getValue());
        assertEquals(valString, testAttribute.getValue());
        assertFalse(Integer.valueOf(valInt).equals(testAttribute.getValue()));

        testAttribute.setValue(valInt);
        assertNotNull(testAttribute.getValue());
        assertFalse(valString.equals(testAttribute.getValue()));
        assertEquals(Integer.valueOf(valInt), testAttribute.getValue());
    }
View Full Code Here

        assertFalse(valString.equals(testAttribute.getValue()));
        assertEquals(Integer.valueOf(valInt), testAttribute.getValue());
    }

    public void testSerialize() throws Exception {
        Attribute testAttribute = vendor.makeAttribute("testAttribute");
        testAttribute.setValue("hello");
        serializeAndGoldFile(testAttribute);
    }
View Full Code Here

TOP

Related Classes of org.auraframework.instance.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.