Package org.auraframework.def

Examples of org.auraframework.def.InterfaceDef


                extDesc = (DefDescriptor<T>) extDef.getExtendsDescriptor();
            }
        }

        for (DefDescriptor<InterfaceDef> intf : interfaces) {
            InterfaceDef interfaze = intf.getDef();
            if (interfaze == null) {
                throw new DefinitionNotFoundException(intf, getLocation());
            }

            registry.assertAccess(descriptor, interfaze);
View Full Code Here


        if (extendsDescriptor != null) {
            ret.putAll(getSuperDef().getRegisterEventDefs());
        }

        for (DefDescriptor<InterfaceDef> intf : interfaces) {
            InterfaceDef intfDef = intf.getDef();
            ret.putAll(intfDef.getRegisterEventDefs());
        }

        if (ret.isEmpty()) {
            return events;
        } else {
View Full Code Here

        if (extendsDescriptor != null) {
            map.putAll(getSuperDef().getAttributeDefs());
        }

        for (DefDescriptor<InterfaceDef> intf : interfaces) {
            InterfaceDef intfDef = intf.getDef();
            for (Map.Entry<DefDescriptor<AttributeDef>, AttributeDef> entry : intfDef.getAttributeDefs().entrySet()) {
                DefDescriptor<AttributeDef> desc = entry.getKey();
                if (map.containsKey(desc)) {
                    // FIXMEDLP - do some validation #W-690040
                }
                map.put(desc, entry.getValue());
View Full Code Here

        // If the definition does not exist or isn't accessible, the template definition
        // will be considered invalid.
        MasterDefRegistry registry = Aura.getDefinitionService().getDefRegistry();
        if (!allowedInterfaces.isEmpty()) {
            for (DefDescriptor<InterfaceDef> intf : allowedInterfaces) {
                InterfaceDef interfaze = intf.getDef();
                if (interfaze == null) {
                    throw new DefinitionNotFoundException(intf, getLocation());
                }
                registry.assertAccess(descriptor, interfaze);
            }
View Full Code Here

    public void validateReferences() throws QuickFixException {
        super.validateReferences();

        MasterDefRegistry registry = Aura.getDefinitionService().getDefRegistry();
        for (DefDescriptor<InterfaceDef> extended : extendsDescriptors) {
            InterfaceDef def = extended.getDef();
            if (def == null) {
                throw new DefinitionNotFoundException(extended, getLocation());
            }
           
            if (extended.equals(descriptor)) {
View Full Code Here

    @Override
    public Map<String, RegisterEventDef> getRegisterEventDefs()
            throws org.auraframework.throwable.quickfix.QuickFixException {
        Map<String, RegisterEventDef> ret = new LinkedHashMap<String, RegisterEventDef>();
        for (DefDescriptor<InterfaceDef> extendsDescriptor : extendsDescriptors) {
            InterfaceDef extendsDef = extendsDescriptor.getDef();
            ret.putAll(extendsDef.getRegisterEventDefs());
            ret.putAll(events);
        }

        if (ret.isEmpty()) {
            return events;
View Full Code Here

    @Override
    public Map<DefDescriptor<AttributeDef>, AttributeDef> getAttributeDefs() throws QuickFixException {

        Map<DefDescriptor<AttributeDef>, AttributeDef> ret = new LinkedHashMap<DefDescriptor<AttributeDef>, AttributeDef>();
        for (DefDescriptor<InterfaceDef> extendsDescriptor : extendsDescriptors) {
            InterfaceDef extendsDef = extendsDescriptor.getDef();
            ret.putAll(extendsDef.getAttributeDefs());
            ret.putAll(attributeDefs);
        }

        if (ret.isEmpty()) {
            return attributeDefs;
View Full Code Here

                    throw e;
                }

                DefDescriptor<InterfaceDef> intfDescriptor = DefDescriptorImpl.getInstance(
                        descriptor.getQualifiedName(), InterfaceDef.class);
                InterfaceDef intfDef = intfDescriptor.getDef();
                if (intfDef != null) {
                    this.intfDescriptor = intfDescriptor;
                    desc = intfDescriptor;
                } else {
                    // def not found
View Full Code Here

        DefDescriptor<InterfaceDef> descriptor = DefDescriptorImpl.getInstance("test:fakeparser", InterfaceDef.class);
        StringSource<InterfaceDef> source = new StringSource<>(
                descriptor,
                "<aura:interface><aura:attribute name='mystring' type='String'/><aura:registerevent name='click' type='aura:click' description='The Description'/></aura:interface>",
                "myID", Format.XML);
        InterfaceDef def = parser.parse(descriptor, source);
        assertEquals(1, def.getAttributeDefs().size());
        assertTrue(def.getAttributeDefs().containsKey(DefDescriptorImpl.getInstance("mystring", AttributeDef.class)));
        assertEquals(1, def.getRegisterEventDefs().size());
        assertNotNull(def.getRegisterEventDefs().get("click"));
    }
View Full Code Here

    public void testInterfaceDefHandlerWithExtension() throws Exception {
        XMLParser parser = XMLParser.getInstance();
        DefDescriptor<InterfaceDef> descriptor = DefDescriptorImpl.getInstance("test:fakeparser", InterfaceDef.class);
        StringSource<InterfaceDef> source = new StringSource<>(descriptor,
                "<aura:interface extends='aura:testinterfaceparent'></aura:interface>", "myID", Format.XML);
        InterfaceDef def = parser.parse(descriptor, source);
        assertEquals(1, def.getExtendsDescriptors().size());
        assertEquals("testinterfaceparent", def.getExtendsDescriptors().iterator().next().getName());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.def.InterfaceDef

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.