Package org.auraframework.impl.root.component.ComponentDefImpl

Examples of org.auraframework.impl.root.component.ComponentDefImpl.Builder


        qualifiedDescriptorName = "test:component";
    }

    @Override
    protected Builder getBuilder() {
        return new Builder();
    }
View Full Code Here


            String hash = "HASH";
            String hashName = String.format("layout://%s_%s_%s_%s_%s:c", "rl",
                    "001", "VIEW", "ACCOUNT", hash);
            DefDescriptor<ComponentDef> hashedDescriptor = DefDescriptorImpl.getInstance(hashName,
                    ComponentDef.class);
            Builder builder = new ComponentDefImpl.Builder();
            builder.setDescriptor(hashedDescriptor);
            //set up attribute definitions. we don't need "whatToDo" any more, but the build still require it
            Map<DefDescriptor<AttributeDef>, AttributeDef> attributeDefs = new HashMap<>();
            DefDescriptor<TypeDef> type = DefDescriptorImpl.getInstance("String", TypeDef.class);
            attributeDefs.put(DefDescriptorImpl.getInstance("whatToDo", AttributeDef.class), new AttributeDefImpl(
                    DefDescriptorImpl.getInstance("whatToDo", AttributeDef.class), null, type, null, true,
                    AttributeDef.SerializeToType.BOTH, null, null));
      builder.attributeDefs = attributeDefs;
            ComponentDef cmpDef = builder.build();
            AuraContext context = Aura.getContextService().getCurrentContext();
            //add dynamic namespace to MasterDefRegistry so later we can getDef from it during the injectComponent();
            MasterDefRegistry mdr = context.getDefRegistry();
            mdr.addLocalDef(cmpDef);
            config.setDescriptor(cmpDef.getDescriptor());
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.component.ComponentDefImpl.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.