mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixing policy deletion
This commit is contained in:
parent
54290e0ab3
commit
535c4e4717
@ -1181,7 +1181,7 @@ public class PolicyDAOImpl implements PolicyDAO {
|
|||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
|
|
||||||
|
|
||||||
String locationPolicy = "DELETE FROM DM_LOCATION WHERE POLICY_ID = ?";
|
/*String locationPolicy = "DELETE FROM DM_LOCATION WHERE POLICY_ID = ?";
|
||||||
stmt = conn.prepareStatement(locationPolicy);
|
stmt = conn.prepareStatement(locationPolicy);
|
||||||
stmt.setInt(1, policyId);
|
stmt.setInt(1, policyId);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();
|
||||||
@ -1196,7 +1196,7 @@ public class PolicyDAOImpl implements PolicyDAO {
|
|||||||
String datePolicy = "DELETE FROM DM_DATE WHERE POLICY_ID = ?";
|
String datePolicy = "DELETE FROM DM_DATE WHERE POLICY_ID = ?";
|
||||||
stmt = conn.prepareStatement(datePolicy);
|
stmt = conn.prepareStatement(datePolicy);
|
||||||
stmt.setInt(1, policyId);
|
stmt.setInt(1, policyId);
|
||||||
stmt.executeUpdate();
|
stmt.executeUpdate();*/
|
||||||
|
|
||||||
|
|
||||||
String deleteCriteria = "DELETE FROM DM_POLICY_CRITERIA WHERE POLICY_ID = ?";
|
String deleteCriteria = "DELETE FROM DM_POLICY_CRITERIA WHERE POLICY_ID = ?";
|
||||||
|
|||||||
@ -405,4 +405,13 @@ public class PolicyDAOTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test(dependsOnMethods = ("getRoleRelatedPolicyThirdTime"))
|
||||||
|
public void deletPolicy() throws PolicyManagementException {
|
||||||
|
PolicyAdministratorPoint policyAdministratorPoint = new PolicyAdministratorPointImpl();
|
||||||
|
policyAdministratorPoint.deletePolicy(1);
|
||||||
|
|
||||||
|
log.debug("First policy deleted.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user