use of org.nhind.config.CertPolicyGroup in project nhin-d by DirectProject.
the class ClientProxyCertificatePolicyTest method cleanUp.
@Before
public void cleanUp() throws Exception {
Domain[] domains = proxy.listDomains(null, 1000);
int idx = 0;
Long[] ids;
if (domains != null)
for (Domain domain : domains) proxy.removeDomainById(domain.getId());
CertPolicy[] retrievedPolicies = proxy.getPolicies();
if (retrievedPolicies != null && retrievedPolicies.length > 0) {
idx = 0;
ids = new Long[retrievedPolicies.length];
for (CertPolicy policy : retrievedPolicies) ids[idx++] = policy.getId();
proxy.deletePolicies(ids);
}
CertPolicyGroup[] retrievedGroups = proxy.getPolicyGroups();
if (retrievedGroups != null && retrievedGroups.length > 0) {
idx = 0;
ids = new Long[retrievedGroups.length];
for (CertPolicyGroup group : retrievedGroups) ids[idx++] = group.getId();
proxy.deletePolicyGroups(ids);
}
}
Aggregations