@Test @SuppressWarnings("deprecation") public void testFactory() throws Exception { Policy p = PolicyFactory.getPolicy("managedTransaction.Global"); Assert.assertEquals(TransactionPolicy.MANAGED_TRANSACTION_GLOBAL, p); Assert.assertTrue(p.supports(PolicyType.IMPLEMENTATION)); p = PolicyFactory.getPolicy("managedTransaction.Local"); Assert.assertEquals(TransactionPolicy.MANAGED_TRANSACTION_LOCAL, p); Assert.assertTrue(p.supports(PolicyType.IMPLEMENTATION)); p = PolicyFactory.getPolicy("noManagedTransaction"); Assert.assertEquals(TransactionPolicy.NO_MANAGED_TRANSACTION, p); Assert.assertTrue(p.supports(PolicyType.IMPLEMENTATION)); p = PolicyFactory.getPolicy("propagatesTransaction"); Assert.assertEquals(TransactionPolicy.PROPAGATES_TRANSACTION, p); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); p = PolicyFactory.getPolicy("suspendsTransaction"); Assert.assertEquals(TransactionPolicy.SUSPENDS_TRANSACTION, p); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); p = PolicyFactory.getPolicy("authorization"); Assert.assertEquals(SecurityPolicy.AUTHORIZATION, p); Assert.assertTrue(p.supports(PolicyType.IMPLEMENTATION)); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); p = PolicyFactory.getPolicy("clientAuthentication"); Assert.assertEquals(SecurityPolicy.CLIENT_AUTHENTICATION, p); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); p = PolicyFactory.getPolicy("confidentiality"); Assert.assertEquals(SecurityPolicy.CONFIDENTIALITY, p); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); p = PolicyFactory.getPolicy("myGenericPolicy"); Assert.assertEquals("myGenericPolicy", p.getName()); Assert.assertTrue(p.supports(PolicyType.IMPLEMENTATION)); Assert.assertTrue(p.supports(PolicyType.INTERACTION)); }
@Deprecated public static Policy getPolicy(String name) throws Exception { return getPolicy(new QName(name)); }
PolicyFactory { @Deprecated public static Policy getPolicy(String name) throws Exception { return getPolicy(new QName(name)); } }
PolicyFactory { @Deprecated public static Policy getPolicy(String name) throws Exception { return getPolicy(new QName(name)); } private  PolicyFactory(); }
PolicyFactory { @Deprecated public static Policy getPolicy(String name) throws Exception { return getPolicy(new QName(name)); } private  PolicyFactory(); @Deprecated static Policy getPolicy(String name); static Policy getPolicy(final QName qname); static Set<Policy> getAllAvailablePolicies(); static Set<Policy> getAvailableInteractionPolicies(); static Set<Policy> getAvailableImplementationPolicies(); }
PolicyFactory { @Deprecated public static Policy getPolicy(String name) throws Exception { return getPolicy(new QName(name)); } private  PolicyFactory(); @Deprecated static Policy getPolicy(String name); static Policy getPolicy(final QName qname); static Set<Policy> getAllAvailablePolicies(); static Set<Policy> getAvailableInteractionPolicies(); static Set<Policy> getAvailableImplementationPolicies();  }