Package org.auraframework.def

Examples of org.auraframework.def.DefinitionAccess.validate()


    }
   
    public void testValidation_AccessLevelAndStaticMethodSpecified()throws Exception{
        DefinitionAccess access = definitionParser.parseAccess(null, "org.auraframework.test.TestAccessMethods.allowGlobal, PRIVATE");
        try{
            access.validate(null, false, false);
            fail("Access attribute may not specify enum value when a static method is also specified");
        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_AuthenticationAllowedOnlyInSystemNamespace()throws Exception{
View Full Code Here


        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_AuthenticationAllowedOnlyInSystemNamespace()throws Exception{
        DefinitionAccess access = definitionParser.parseAccess(null, "AUTHENTICATED");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, true, false);
       
        //AUTHENTICATED/UNAUTHENTICATED not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, true, false);
            fail("Authentication values for access should not be allowed in custom namespaces");
View Full Code Here

        DefinitionAccess access = definitionParser.parseAccess(null, "AUTHENTICATED");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, true, false);
       
        //AUTHENTICATED/UNAUTHENTICATED not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, true, false);
            fail("Authentication values for access should not be allowed in custom namespaces");
        }catch(InvalidAccessValueException expected){          
        }
    }
View Full Code Here

     */
    public void testValidation_AuthenticationCannotBeUsedWhenNotAllowed()throws Exception{
        Boolean allowAuthentication = false;
        DefinitionAccess access = definitionParser.parseAccess(null, "AUTHENTICATED");
        try{
            access.validate(StringSourceLoader.DEFAULT_NAMESPACE, allowAuthentication, false);
            fail("Should not have processed athentication");
        }catch(InvalidAccessValueException expected){}
    }
   
   
View Full Code Here

   
   
    public void testValidation_PrivateAccess()throws Exception{
        boolean allowPrivate = true;
        DefinitionAccess access = definitionParser.parseAccess(null, "PRIVATE");
        access.validate(null, false, allowPrivate);
       
        allowPrivate = false;
        try{
            access.validate(null, false, allowPrivate);
            fail("PRIVATE access should not be allowed");
View Full Code Here

        DefinitionAccess access = definitionParser.parseAccess(null, "PRIVATE");
        access.validate(null, false, allowPrivate);
       
        allowPrivate = false;
        try{
            access.validate(null, false, allowPrivate);
            fail("PRIVATE access should not be allowed");
        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_InternalAccess()throws Exception{
View Full Code Here

        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_InternalAccess()throws Exception{
        DefinitionAccess access = definitionParser.parseAccess(null, "INTERNAL");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, false, false);
       
        //INTERNAL not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, false, false);
            fail("INTERNAL should not be allowed in custom namespaces");
View Full Code Here

        DefinitionAccess access = definitionParser.parseAccess(null, "INTERNAL");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, false, false);
       
        //INTERNAL not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, false, false);
            fail("INTERNAL should not be allowed in custom namespaces");
        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_StaticMethodsUsageRestriction() throws Exception{
View Full Code Here

        }catch(InvalidAccessValueException expected){}
    }
   
    public void testValidation_StaticMethodsUsageRestriction() throws Exception{
        DefinitionAccess access = definitionParser.parseAccess(null, "org.auraframework.test.TestAccessMethods.allowGlobal");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, false, false);
       
        //static methods not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, false, false);
            fail("static methods should not be allowed in custom namespaces");
View Full Code Here

        DefinitionAccess access = definitionParser.parseAccess(null, "org.auraframework.test.TestAccessMethods.allowGlobal");
        access.validate(StringSourceLoader.DEFAULT_NAMESPACE, false, false);
       
        //static methods not supported in custom namespaces
        try{
            access.validate(StringSourceLoader.DEFAULT_CUSTOM_NAMESPACE, false, false);
            fail("static methods should not be allowed in custom namespaces");
        }catch(InvalidAccessValueException expected){}
       
    }
}
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.