/** @throws Exception */
  @AfterClass()
  public void clear() throws Exception {
    String servicePathToDelete = absPath;
    if (wsRegistryServiceClient.resourceExists(servicePathToDelete)) {
      resourceAdminServiceClient.deleteResource(servicePathToDelete);
    }
    /*        String schemaPathToDelete = "/_system/governance/trunk/schemas/org/bar/purchasing/purchasing.xsd";
    if (wsRegistryServiceClient.resourceExists(schemaPathToDelete)) {
        resourceAdminServiceClient.deleteResource(schemaPathToDelete);
    }
    String wsdlPathToDelete = "/_system/governance/trunk/wsdls/com/foo/IntergalacticService.wsdl";
    if (wsRegistryServiceClient.resourceExists(wsdlPathToDelete)) {
        resourceAdminServiceClient.deleteResource(wsdlPathToDelete);
    }*/
    lifeCycleManagementClient.deleteLifeCycle(LC_NAME);

    if (userManagementClient.roleNameExists("archrole")) {
      userManagementClient.deleteRole("archrole");
    }
    if (userManagementClient.roleNameExists("managerrole")) {
      userManagementClient.deleteRole("managerrole");
    }

    governanceServiceClient = null;
    wsRegistryServiceClient = null;
    lifeCycleAdminServiceClient = null;
    lifeCycleManagementClient = null;
    governanceServiceClient = null;
    listMetadataServiceClient = null;
    resourceAdminServiceClient = null;
    resourceAdminServiceClient = null;
    userManagementClient = null;
  }
Beispiel #2
0
 @AfterClass(alwaysRun = true)
 public void cleanup() throws Exception {
   adminUserManagementClient.deleteRole(ROLE_NAME);
   adminUserManagementClient.updateUserListOfRole(EXISTING_ROLE, ROLE_USERS, new String[] {});
   if (adminUserManagementClient.roleNameExists(NEW_ROLE)) {
     adminUserManagementClient.deleteRole(NEW_ROLE);
   }
   FlaggedName[] flaggedNames = adminUserManagementClient.getRolesOfUser(NEW_USER, "*", 100);
   for (FlaggedName name : flaggedNames) {
     if (name.getItemName().equals(PermissionTestConstants.EVERYONE_ROLE)) {
       adminUserManagementClient.deleteUser(NEW_USER);
     }
   }
   adminUserManagementClient = null;
   user1UserManagementClient = null;
 }