Package sun.security.provider

Examples of sun.security.provider.PolicyFile$PolicyInfo


        System.setProperty("java.security.policy",
                        "=" +
                        policyDir +
                        File.separatorChar +
                        "Comparator.Principal.Policy");
        PolicyFile policy = new PolicyFile();
        testnum = doPrincipalTest(policy, testnum);
        System.out.println("============ Principal Test Passed ============");

        // do comparator-only tests
        System.setProperty("java.security.policy",
                        "=" +
                        policyDir +
                        File.separatorChar +
                        "Comparator.Comparator.Policy");
        policy = new PolicyFile();
        testnum = doComparatorTest(policy, testnum);
        System.out.println("============ Comparator Test Passed ============");

        // combined principal/comparator tests
        System.setProperty("java.security.policy",
                        "=" +
                        policyDir +
                        File.separatorChar +
                        "Comparator.Combined.Policy");
        policy = new PolicyFile();
        testnum = doCombinedTest(policy, testnum);
        System.out.println("============ Combined Test Passed ============");
    }
View Full Code Here


   
   
    private static PermissionCollection getEEPolicyPermissions(URL fileUrl) throws IOException {
       
        //System.out.println("Loading policy from " + fileUrl);
        PolicyFile pf = new PolicyFile(fileUrl);
       
        CodeSource cs =
            new CodeSource(
                    new URL(SMGlobalPolicyUtil.CLIENT_TYPE_CODESOURCE), (Certificate[])null );
        PermissionCollection pc = pf.getPermissions(cs);

        return pc;       
    }
View Full Code Here

        URL furl = new URL("file:" + policyFilename);
           
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loading policy from " + furl);
        }
        PolicyFile pf = new PolicyFile(furl);

        CodeSource cs = new CodeSource(new URL(EJB_TYPE_CODESOURCE), (Certificate[])null );
        PermissionCollection pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.ejb, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded EJB policy = " + pc);
        }

        cs = new CodeSource(new URL(WEB_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.war, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded WEB policy =" + pc);
        }
       
        cs = new CodeSource(new URL(RAR_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.rar, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded rar policy =" + pc);
        }
       
        cs = new CodeSource(new URL(CLIENT_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.car, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded car policy =" + pc);
        }

        cs = new CodeSource(new URL(EAR_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.ear, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded ear policy =" + pc);
        }
View Full Code Here

        URL furl = new URL("file:" + policyFilename);
           
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loading policy from " + furl);
        }
        PolicyFile pf = new PolicyFile(furl);

        CodeSource cs = new CodeSource(new URL(EJB_TYPE_CODESOURCE), (Certificate[])null );
        PermissionCollection pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.ejb, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded EJB policy = " + pc);
        }

        cs = new CodeSource(new URL(WEB_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.war, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded WEB policy =" + pc);
        }
       
        cs = new CodeSource(new URL(RAR_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.rar, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded rar policy =" + pc);
        }
       
        cs = new CodeSource(new URL(CLIENT_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.car, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded car policy =" + pc);
        }

        cs = new CodeSource(new URL(EAR_TYPE_CODESOURCE), (Certificate[])null );
        pc = pf.getPermissions(cs);
        policyMap.put(CommponentType.ear, pc);
        if (logger.isLoggable(Level.FINE)){
            logger.fine("Loaded ear policy =" + pc);
        }
View Full Code Here

TOP

Related Classes of sun.security.provider.PolicyFile$PolicyInfo

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.