@Test public void testGetPolicyId() { String name = "A very invalid $^%#@* ''policy NAME\"1"; String policyId = PolicyTemplateEngine.getPolicyId(name); assertEquals("urn:surfconext:xacml:policy:id:a_very_invalid_policy_name_1", policyId); }
public static String getPolicyId(String name) { if (name == null) { return null; } return "urn:surfconext:xacml:policy:id:" + name.replaceAll("[^\\w]+", "_").toLowerCase(); }
PolicyTemplateEngine { public static String getPolicyId(String name) { if (name == null) { return null; } return "urn:surfconext:xacml:policy:id:" + name.replaceAll("[^\\w]+", "_").toLowerCase(); } }
PolicyTemplateEngine { public static String getPolicyId(String name) { if (name == null) { return null; } return "urn:surfconext:xacml:policy:id:" + name.replaceAll("[^\\w]+", "_").toLowerCase(); }  }
PolicyTemplateEngine { public static String getPolicyId(String name) { if (name == null) { return null; } return "urn:surfconext:xacml:policy:id:" + name.replaceAll("[^\\w]+", "_").toLowerCase(); }  String createPolicyXml(PdpPolicyDefinition pdpPolicyDefintion); static String getPolicyId(String name); }
PolicyTemplateEngine { public static String getPolicyId(String name) { if (name == null) { return null; } return "urn:surfconext:xacml:policy:id:" + name.replaceAll("[^\\w]+", "_").toLowerCase(); }  String createPolicyXml(PdpPolicyDefinition pdpPolicyDefintion); static String getPolicyId(String name);  }