Package org.auraframework.def

Examples of org.auraframework.def.Definition


    @Override
    public Instance<?> getInstance(String qualifiedName, Map<String, Object> attributes, DefType... defTypes)
            throws QuickFixException {
        Aura.getContextService().assertEstablished();

        Definition d = Aura.getDefinitionService().getDefinition(qualifiedName, defTypes);
        Instance<?> i = this.<Instance<Definition>, Definition> getInstance(d, attributes);
        return i;
    }
View Full Code Here


        final MockUtil mockUtil = new MockUtil();
        for (DefRegistry<?> subReg : registry.getAllRegistries()) {
            Mockito.doAnswer(new Answer<Definition>() {
                @Override
                public Definition answer(InvocationOnMock invocation) throws Throwable {
                    Definition ret = (Definition) invocation.callRealMethod();
                    if (ret == null) {
                        return ret;
                    }
                    if (mockUtil.isMock(ret)) {
                        return ret;
View Full Code Here

        // check all dependencies
        MockUtil mockUtil = new MockUtil();
        Set<DefDescriptor<?>> dependencies = registry.getDependencies(uid);
        for (DefDescriptor<?> dep : dependencies) {
            Definition depDef = registry.getDef(dep);
            if (mockUtil.isMock(depDef)) {
                // why not controllers?
                if (dep.getDefType().equals(DefType.CONTROLLER)) {
                    continue;
                }
View Full Code Here

        // check all dependencies
        MockUtil mockUtil = new MockUtil();
        Set<DefDescriptor<?>> dependencies = registry.getDependencies(uid);
        for (DefDescriptor<?> dep : dependencies) {
            Definition depDef = registry.getDef(dep);
            if (mockUtil.isMock(depDef)) {
                assertCompiledDef(depDef);
            }
        }
    }
View Full Code Here

        DefType defType = DefType.valueOf(((String) component.getAttributes().getValue("defType")).toUpperCase());
        DefinitionService definitionService = Aura.getDefinitionService();
    DefDescriptor<?> descriptor = definitionService.getDefDescriptor(desc, defType.getPrimaryInterface());

        Definition def = descriptor.getDef();
    ReferenceTreeModel.assertAccess(def);
   
        Map<DefType, List<DefModel>> depsMap = Maps.newEnumMap(DefType.class);

        Set<DefDescriptor<?>> deps = Sets.newHashSet();

        def.appendDependencies(deps);

        for (DefDescriptor<?> dep : deps) {
            DefType type = dep.getDefType();

            List<DefModel> depsList = depsMap.get(type);
View Full Code Here

                List<DefDescriptor<?>> deps = ((RootDefinition) definition).getBundle();

                for (DefDescriptor<?> dep : deps) {
                    // we already surface the documentation--users don't need to see the source for it.
                    if (dep.getDefType() != DefType.DOCUMENTATION) {
                        Definition def = dep.getDef();
                        if (ReferenceTreeModel.hasAccess(def)) {
                            defs.add(new DefModel(dep));
                        }
                    }
                }
View Full Code Here

        DefType defType = DefType.valueOf(((String) component.getAttributes().getValue("defType")).toUpperCase());
        DefDescriptor<? extends RootDefinition> descriptor = (DefDescriptor<? extends RootDefinition>) Aura
                .getDefinitionService().getDefDescriptor(desc, defType.getPrimaryInterface());

        Definition def = descriptor.getDef();

        defs.add(new DefModel(descriptor));

        if (def instanceof RootDefinition) {
            List<DefDescriptor<?>> deps = ((RootDefinition) def).getBundle();
View Full Code Here

        String desc = (String) component.getAttributes().getValue("descriptor");

        DefType defType = DefType.valueOf(((String) component.getAttributes().getValue("defType")).toUpperCase());
        DefDescriptor<?> descriptor = Aura.getDefinitionService().getDefDescriptor(desc, defType.getPrimaryInterface());

        Definition def = descriptor.getDef();
        ReferenceTreeModel.assertAccess(def);

        Map<DefType, List<DefModel>> depsMap = Maps.newEnumMap(DefType.class);

        Set<DefDescriptor<?>> deps = Sets.newHashSet();

        def.appendDependencies(deps);

        for (DefDescriptor<?> dep : deps) {
          if (ReferenceTreeModel.hasAccess(dep.getDef())) {
              DefType type = dep.getDefType();
 
View Full Code Here

        getDefDescriptorName(testConsumer, false),
        (testConsumerNamespace == TestNamespace.System || testConsumerNamespace == TestNamespace.SystemOther ? true : false));

    Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptorConsumer);
    try {
      Definition def = parser.parse(descriptorConsumer, source);
      def.validateDefinition();

      descriptorConsumer.getDef();

      if (!isValidTestCase()) {
        fail("Should have thrown Exception when " + testResourceNamespace + "." + testResource + " is " + testCase + " and used in "
View Full Code Here

        getDefDescriptorName(testResource, true),
        (testResourceNamespace == TestNamespace.System || testResourceNamespace == TestNamespace.SystemOther ? true : false));
   
    Source<? extends Definition> source = StringSourceLoader.getInstance().getSource(descriptor);
    try {
      Definition def = parser.parse(descriptor, source);
      def.validateDefinition();

      descriptor.getDef();
     
    } catch (AuraHandledException e) {
      fail("Should not have thrown Exception when " + testResourceNamespace + "." + testResource);
View Full Code Here

TOP

Related Classes of org.auraframework.def.Definition

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.