Examples of assertAccess()


Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

        }

        MasterDefRegistry defRegistry = Aura.getDefinitionService().getDefRegistry();
        if (parent != null) {
            // Insure that the parent is allowed to create an instance of this component
            defRegistry.assertAccess(parent.getDescriptor(), desc.getDef());
        }

        LoggingService loggingService = Aura.getLoggingService();
        loggingService.startTimer(LoggingService.TIMER_COMPONENT_CREATION);
        try {
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

            // def can be null if a definition not found exception was thrown for that definition. Odd.
            if (def != null) {
                ControllerDef cd = def.getDeclaredControllerDef();
                if (cd != null) {
                    // Insure that this def is allowed to create an instance of the controller
                    defRegistry.assertAccess(descriptor, cd);

                    this.valueProviders.put(ValueProviderType.CONTROLLER.getPrefix(), cd);
                }
            }
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

       
        AuraContext context = Aura.getContextService().getCurrentContext();
        DefDescriptor<?> referencingDesc = context.getCurrentCallingDescriptor();
      if (referencingDesc != null) {
          MasterDefRegistry registry = Aura.getDefinitionService().getDefRegistry();
        registry.assertAccess(referencingDesc, event);
      }       
    }

    @Override
    public boolean equals(Object o) {
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

                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();
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

            InterfaceDef interfaze = intf.getDef();
            if (interfaze == null) {
                throw new DefinitionNotFoundException(intf, getLocation());
            }

            registry.assertAccess(descriptor, interfaze);
        }

        for (RegisterEventDef def : events.values()) {
            def.validateReferences();
        }
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

        // and bah
        validateExpressionRefs();

        for (ClientLibraryDef def : this.clientLibraries) {
            def.validateReferences();
            registry.assertAccess(descriptor, def);
        }
    }

    /**
     * Does all the validation of the expressions defined in this component
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

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

    @Override
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

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

        // make sure the registered events actually exist
        for (RegisterEventDef reg : this.events.values()) {
            reg.validateReferences();
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

    public void testAssertAccess_IfGlobalAccessThenPassesCheck() throws Exception {
        when(globalDef.getAccess()).thenReturn(defAccess);
        when(defAccess.isGlobal()).thenReturn(true);
        MasterDefRegistry mdr = getAuraMDR();
        mdr.assertAccess(null, globalDef);

        verify(globalDef).getAccess();
        verify(defAccess).isGlobal();
    }
View Full Code Here

Examples of org.auraframework.system.MasterDefRegistry.assertAccess()

        when(globalDef.getAccess()).thenReturn(defAccess);
        when(defAccess.isGlobal()).thenReturn(false);
        when(defAccess.requiresAuthentication()).thenReturn(true);
        when(referencingDesc.getPrefix()).thenReturn("aura");
        MasterDefRegistry mdr = getAuraMDR();
        mdr.assertAccess(referencingDesc, globalDef);

        verify(referencingDesc).getPrefix();
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.