Package org.wso2.carbon.governance.api.policies

Examples of org.wso2.carbon.governance.api.policies.PolicyManager.updatePolicy()


        String oldPolicyPath = newPolicy.getPath();
        assertEquals(oldPolicyPath, "/policies/policy.xml");
        assertTrue(registry.resourceExists("/policies/policy.xml"));

        newPolicy.setName("my-policy.xml");
        policyManager.updatePolicy(newPolicy);

        assertEquals("/policies/my-policy.xml", newPolicy.getPath());
        assertFalse(registry.resourceExists("/policies/policy.xml"));

        // doing an update without changing anything.
View Full Code Here


        assertEquals("/policies/my-policy.xml", newPolicy.getPath());
        assertFalse(registry.resourceExists("/policies/policy.xml"));

        // doing an update without changing anything.
        policyManager.updatePolicy(newPolicy);

        assertEquals("/policies/my-policy.xml", newPolicy.getPath());
        assertEquals("0.01", newPolicy.getAttribute("version"));

        newPolicy = policyManager.getPolicy(policy.getId());
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.