Package org.auraframework.impl.root

Examples of org.auraframework.impl.root.AttributeDefRefImpl$Builder


    @Override
    protected void handleChildTag() throws XMLStreamException, QuickFixException {

        String tag = getTagName();
        if (AttributeDefRefHandler.TAG.equalsIgnoreCase(tag)) {
            AttributeDefRefImpl attributeDefRef = new AttributeDefRefHandler<P>(getParentHandler(), xmlReader, source)
                    .getElement();
            builder.setAttribute(attributeDefRef.getDescriptor(), attributeDefRef);
        } else {
            body.add(getDefRefHandler(getParentHandler()).getElement());
        }
    }
View Full Code Here


    }

    public ThemeDef makeThemeDef(Map<String, String> variables) {
            ThemeDefImpl.Builder builder = new ThemeDefImpl.Builder();
            for (Entry<String, String> entry : variables.entrySet()) {
                    AttributeDefRefImpl value = makeAttributeDefRef(entry.getKey(),
                                    entry.getValue(), null);
                    AttributeDefImpl attr = makeAttributeDef(entry.getKey(),
                                    DefDescriptorImpl.getInstance("String", TypeDef.class),
                                    value, false, null, null, null);
                    builder.addAttributeDef(attr.getDescriptor(), attr);
View Full Code Here

                "<aura:set attribute='mystring' value='testing'/>", "myID", Format.XML);
        XMLStreamReader xmlReader = XMLParser.getInstance().createXMLStreamReader(source.getHashingReader());
        xmlReader.next();
        AttributeDefRefHandler<ComponentDef> adrHandler = new AttributeDefRefHandler<>(null, xmlReader,
                source);
        AttributeDefRefImpl adr = adrHandler.getElement();
        assertEquals("mystring", adr.getName());
        Object o = adr.getValue();
        assertEquals("testing", o);
    }
View Full Code Here

                "<aura:set attribute='mystring'><aura:foo/></aura:set>", "myID", Format.XML);
        XMLStreamReader xmlReader = XMLParser.getInstance().createXMLStreamReader(source.getHashingReader());
        xmlReader.next();
        AttributeDefRefHandler<ComponentDef> adrHandler = new AttributeDefRefHandler<>(null, xmlReader,
                source);
        AttributeDefRefImpl adr = adrHandler.getElement();
        ComponentDefRef value = (ComponentDefRef) ((List<?>) adr.getValue()).get(0);
        assertEquals("foo", value.getName());
    }
View Full Code Here

                "<aura:set attribute='mystring'>Child Text</aura:set>", "myID", Format.XML);
        XMLStreamReader xmlReader = XMLParser.getInstance().createXMLStreamReader(source.getHashingReader());
        xmlReader.next();
        AttributeDefRefHandler<ComponentDef> adrHandler = new AttributeDefRefHandler<>(null, xmlReader,
                source);
        AttributeDefRefImpl adr = adrHandler.getElement();
        ComponentDefRef value = (ComponentDefRef) ((List<?>) adr.getValue()).get(0);
        assertEquals("Child Text", value.getAttributeDefRef("value").getValue());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.AttributeDefRefImpl$Builder

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.