Package javax.security.jacc

Examples of javax.security.jacc.PolicyConfiguration.commit()


        }

        //commit
        for (Iterator iterator = contextIdToPolicyConfigurationMap.values().iterator(); iterator.hasNext();) {
            PolicyConfiguration policyConfiguration = (PolicyConfiguration) iterator.next();
            policyConfiguration.commit();
        }

        //refresh policy
        Policy policy = Policy.getPolicy();
        policy.refresh();
View Full Code Here


            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
        } catch (PolicyContextException e) {
            throw new OpenEJBException("JACC PolicyConfiguration failed: ContextId=" + policyContext.getContextID(), e);
        }
View Full Code Here

      DelegatingPolicy policy = new DelegatingPolicy();
      Policy.setPolicy(policy);
      JBossPolicyConfigurationFactory pcf = new JBossPolicyConfigurationFactory();
      pc = pcf.getPolicyConfiguration("UncheckedWebConstraintsUnitTestCase", true);
      WebPermissionMapping.createPermissions(metaData, pc);
      pc.commit();
      System.out.println(policy.listContextPolicies());
      PolicyContext.setContextID("UncheckedWebConstraintsUnitTestCase");
   }

   /*
 
View Full Code Here

      permColl.add(getPortalObjectPermission("/")); //Add all possible permissions
      permColl.add(new DummyPortalPermission("/default", "view")); //Add a dummy permission
      pc.addToRole("employee", permColl);
      pc.addToRole("admin", permColl);
      pc.addToRole("janitor", permColl);
      pc.commit();
     
      Policy policy = Policy.getPolicy();
      policy.refresh();
     
      //Act like the Portal Container and check perm
View Full Code Here

      PortalObjectPermission windowPerm = new PortalObjectPermission("/default/default/a","view");
      pc.addToRole("janitor", windowPerm);
     
      PortalObjectPermission contextPerm = new PortalObjectPermission("/","view");
      pc.addToRole("admin", contextPerm);
      pc.commit();
     
      Policy policy = Policy.getPolicy();
      policy.refresh();
     
      //Act like the Portal Container and check perm for portal
View Full Code Here

      PolicyConfigurationFactory policyConfigurationFactory =
         PolicyConfigurationFactory.getPolicyConfigurationFactory();
      PolicyConfiguration policyConfiguration =
         policyConfigurationFactory.getPolicyConfiguration(depName, false);
      WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
      policyConfiguration.commit();
   }
}
View Full Code Here

            }
        }

        //commit
        for (PolicyConfiguration policyConfiguration : contextIdToPolicyConfigurationMap.values()) {
            policyConfiguration.commit();
        }

        //refresh policy
        Policy policy = Policy.getPolicy();
        policy.refresh();
View Full Code Here

            for (Map.Entry<String, PermissionCollection> entry : policyContext.getRolePermissions().entrySet()) {
                policy.addToRole(entry.getKey(), entry.getValue());
            }

            policy.commit();
        } catch (ClassNotFoundException e) {
            throw new OpenEJBException("PolicyConfigurationFactory class not found", e);
        } catch (PolicyContextException e) {
            throw new OpenEJBException("JACC PolicyConfiguration failed: ContextId=" + policyContext.getContextID(), e);
        }
View Full Code Here

            }
        }

        //commit
        for (PolicyConfiguration policyConfiguration : contextIdToPolicyConfigurationMap.values()) {
            policyConfiguration.commit();
        }

        //refresh policy
        Policy policy = Policy.getPolicy();
        policy.refresh();
View Full Code Here

        }

        //commit
        for (Iterator iterator = contextIdToPolicyConfigurationMap.values().iterator(); iterator.hasNext();) {
            PolicyConfiguration policyConfiguration = (PolicyConfiguration) iterator.next();
            policyConfiguration.commit();
        }

        //refresh policy
        Policy policy = Policy.getPolicy();
        policy.refresh();
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.