wrcsc2c2.setName("sc2.c2");
sc2.getResourceCollections().add(wrcsc2c2);
wrcsc2c2.getUrlPatterns().add("/b/*");
wrcsc2c2.getHttpMethods().add("POST");
AuthConstraintMetaData ac = new AuthConstraintMetaData();
ArrayList<String> roles = new ArrayList<String>();
roles.add("R1");
ac.setRoleNames(roles);
sc2.setAuthConstraint(ac);
UserDataConstraintMetaData udc = new UserDataConstraintMetaData();
udc.setTransportGuarantee(TransportGuaranteeType.CONFIDENTIAL);
sc2.setUserDataConstraint(udc);
securityContraints.add(sc2);