Package org.auraframework.throwable.quickfix

Examples of org.auraframework.throwable.quickfix.DefinitionNotFoundException


        DefType defType = DefType.valueOf(((String)component.getAttributes().getValue("defType")).toUpperCase());

        desc = "js://" + desc.replace(':', '.');
        descriptor = defService.getDefDescriptor(desc, TestSuiteDef.class);
        def = descriptor.getDef();
        if (def == null) { throw new DefinitionNotFoundException(descriptor); }
        long nonce = System.currentTimeMillis();

        url = String.format("/%s/%s.%s?aura.nonce=%s&aura.mode=AUTO%s&aura.testReset=true", descriptor.getNamespace(),
                descriptor.getName(), defType == DefType.COMPONENT ? "cmp" : "app", nonce, context.getMode().name());
View Full Code Here


            context.getAccess() != Authentication.AUTHENTICATED) {
            def = null;
        }
       
        if (def == null) {
            throw new DefinitionNotFoundException(descriptor);
        }
       
        return def;
    }
View Full Code Here

            }
            if (ret != null) {
                return ret;
            }
        }
        throw new DefinitionNotFoundException(desc);
    }
View Full Code Here

        //
        if (loading != null && !loaded.contains(loading) && !context.getLoaded().containsKey(loading)) {
            String uid = mdr.getUid(null, loading);

            if (uid == null) {
                throw new DefinitionNotFoundException(loading, null);
            } else {
                context.addLoaded(loading, uid);
            }
        }
    }
View Full Code Here

                if (intfDef != null) {
                    this.intfDescriptor = intfDescriptor;
                    desc = intfDescriptor;
                } else {
                    // def not found
                    throw new DefinitionNotFoundException(descriptor);
                }
            }
        } else {
            desc = descriptor;
        }
View Full Code Here

                defaultValue.validateReferences();

            }
        } catch (AuraRuntimeException e) {
            if (e.getCause() instanceof ClassNotFoundException) {
                throw new DefinitionNotFoundException(typeDefDescriptor, getLocation());
            } else {
                throw e; // Don't try to be clever about unknown bad things!
            }
        }
    }
View Full Code Here

    @Override
    public Action createAction(String actionName, Map<String, Object> paramValues) throws DefinitionNotFoundException {
        JavascriptActionDef actionDef = actionMap.get(actionName);
        if(actionDef == null){
            DefDescriptor<ActionDef> desc = SubDefDescriptorImpl.getInstance(actionName, getDescriptor(), ActionDef.class);
            throw new DefinitionNotFoundException(desc);
        }
        return new JavascriptPseudoAction(actionDef);
    }
View Full Code Here

    @Override
    public Action createAction(String actionName, Map<String, Object> paramValues) throws DefinitionNotFoundException {
      JavaActionDef actionDef = actionMap.get(actionName);
      if(actionDef == null){
            DefDescriptor<ActionDef> desc = SubDefDescriptorImpl.getInstance(actionName, getDescriptor(), ActionDef.class);
            throw new DefinitionNotFoundException(desc);
        }
        Object controller = null;
        if (bean) {
            controller = Aura.getBeanAdapter().getControllerBean(this);
        }
View Full Code Here

        MasterDefRegistry registry = Aura.getDefinitionService().getDefRegistry();
        if (extendsDescriptor != null) {
            T parentDef = extendsDescriptor.getDef();

            if (parentDef == null) {
                throw new DefinitionNotFoundException(extendsDescriptor, getLocation());
            }

            if (parentDef.getDescriptor().equals(descriptor)) {
                throw new InvalidDefinitionException(String.format(
                        "%s cannot extend itself", getDescriptor()), getLocation());
            }

            if (!parentDef.isExtensible()) {
                throw new InvalidDefinitionException(String.format(
                        "%s cannot extend non-extensible component %s", getDescriptor(), extendsDescriptor),
                        getLocation());
            }

            registry.assertAccess(descriptor, parentDef);

            SupportLevel support = getSupport();
            DefDescriptor<T> extDesc = extendsDescriptor;
            while (extDesc != null) {
                T extDef = extDesc.getDef();
                if (support.ordinal() > extDef.getSupport().ordinal()) {
                    throw new InvalidDefinitionException(
                            String.format("%s cannot widen the support level to %s from %s's level of %s",
                                    getDescriptor(),
                                    support, extDesc, extDef.getSupport()), getLocation());
                }

                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

        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

TOP

Related Classes of org.auraframework.throwable.quickfix.DefinitionNotFoundException

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.