void setOutcome(Set<Role> roleSet, AuthorizationConstraint ac, UserDataConstraint udc) { if (ac == null) { setPredefinedOutcome(true); } else { Enumeration eroles = ac.getSecurityRoles(); if (!eroles.hasMoreElements()) { setPredefinedOutcome(false); } else while (eroles.hasMoreElements()) { SecurityRoleDescriptor srd = (SecurityRoleDescriptor)eroles.nextElement(); String roleName = srd.getName(); if ("*".equals(roleName)) { Iterator it = roleSet.iterator(); while(it.hasNext()) { setRole(((Role)it.next()).getName()); } } else { setRole(roleName); } } } addConnectType(udc == null? null : udc.getTransportGuarantee()); if (WebPermissionUtil.logger.isLoggable(Level.FINE)){ WebPermissionUtil.logger.log (Level.FINE,"JACC: setOutcome yields: " + toString()); } }
/** Copy constructor.*/ public SecurityConstraintImpl(SecurityConstraintImpl other) { if (other.webResourceCollections != null) { this.webResourceCollections = new HashSet<WebResourceCollection>(); for (WebResourceCollection wrc : other.webResourceCollections) { webResourceCollections.add(new WebResourceCollectionImpl((WebResourceCollectionImpl)wrc)); } } if (other.authorizationConstraint != null) { this.authorizationConstraint = new AuthorizationConstraintImpl((AuthorizationConstraintImpl) other.authorizationConstraint); } if (other.userDataConstraint != null) { this.userDataConstraint = new UserDataConstraintImpl(); this.userDataConstraint.setTransportGuarantee(other.userDataConstraint.getTransportGuarantee()); } }
udc.setTransportGuarantee( ((transportGuarantee == TransportGuarantee.CONFIDENTIAL) ? UserDataConstraint.CONFIDENTIAL_TRANSPORT :
udc.setTransportGuarantee( ((sc.getDataConstraint() == TransportGuarantee.CONFIDENTIAL) ? UserDataConstraint.CONFIDENTIAL_TRANSPORT :
addConnectType(udc == null? null : udc.getTransportGuarantee());
next.getUserDataConstraint(); String guarantee = (dataConstraint != null) ? dataConstraint.getTransportGuarantee() : null;
if (udc != null) { logger.finest(" Transport guarantee: "+ udc.getTransportGuarantee());
next.getUserDataConstraint(); String guarantee = (dataConstraint != null) ? dataConstraint.getTransportGuarantee() : null;
if (udc != null) { logger.finest(" Transport guarantee: "+ udc.getTransportGuarantee());
next.getUserDataConstraint(); String guarantee = (dataConstraint != null) ? dataConstraint.getTransportGuarantee() : null;
public SecurityConstraintDecorator(SecurityConstraint securityConstraint, WebModule webModule){ this.securityConstraint = securityConstraint; if (securityConstraint.getAuthorizationConstraint() != null){ setAuthConstraint(true); Enumeration enumeration = securityConstraint .getAuthorizationConstraint().getSecurityRoles(); SecurityRole securityRole; while (enumeration.hasMoreElements()){ securityRole = (SecurityRole)enumeration.nextElement(); super.addAuthRole(securityRole.getName()); if ( !securityRole.getName().equals("*")){ webModule.addSecurityRole(securityRole.getName()); } } setDisplayName(securityConstraint.getAuthorizationConstraint().getName()); } if (securityConstraint.getUserDataConstraint() != null){ setUserConstraint(securityConstraint.getUserDataConstraint() .getTransportGuarantee()); } }