private void deleteCustomUserInfo(IdentityService identityService) throws SIdentityException { // only definitions will be deleted because values are deleted on cascade from DB List<SCustomUserInfoDefinition> customUserInfoDefinitions; do { // the start index is always zero because the current page will be deleted customUserInfoDefinitions = identityService.getCustomUserInfoDefinitions(0, pageSize); deleteCustomUserInfo(customUserInfoDefinitions, identityService); } while (customUserInfoDefinitions.size() == pageSize); }
private void deleteCustomUserInfo(IdentityService identityService) throws SIdentityException { // only definitions will be deleted because values are deleted on cascade from DB List<SCustomUserInfoDefinition> customUserInfoDefinitions; do { // the start index is always zero because the current page will be deleted customUserInfoDefinitions = identityService.getCustomUserInfoDefinitions(0, pageSize); deleteCustomUserInfo(customUserInfoDefinitions, identityService); } while (customUserInfoDefinitions.size() == pageSize); }
private void deleteOrganizationElements(final ActivityInstanceService activityInstanceService) throws SBonitaException { final IdentityService identityService = tenantAccessor.getIdentityService(); final ActorMappingService actorMappingService = tenantAccessor.getActorMappingService(); final ProfileService profileService = tenantAccessor.getProfileService(); final SupervisorMappingService supervisorService = tenantAccessor.getSupervisorService(); final ExternalIdentityMappingService externalIdentityMappingService = tenantAccessor.getExternalIdentityMappingService(); deleteCustomUserInfo(identityService); actorMappingService.deleteAllActorMembers(); profileService.deleteAllProfileMembers(); activityInstanceService.deleteAllPendingMappings(); supervisorService.deleteAllProcessSupervisors(); externalIdentityMappingService.deleteAllExternalIdentityMappings(); identityService.deleteAllUserMemberships(); identityService.deleteAllGroups(); identityService.deleteAllRoles(); identityService.deleteAllUsers(); }
private void deleteOrganizationElements(final ActivityInstanceService activityInstanceService) throws SBonitaException { final IdentityService identityService = tenantAccessor.getIdentityService(); final ActorMappingService actorMappingService = tenantAccessor.getActorMappingService(); final ProfileService profileService = tenantAccessor.getProfileService(); final SupervisorMappingService supervisorService = tenantAccessor.getSupervisorService(); final ExternalIdentityMappingService externalIdentityMappingService = tenantAccessor.getExternalIdentityMappingService(); deleteCustomUserInfo(identityService); actorMappingService.deleteAllActorMembers(); profileService.deleteAllProfileMembers(); activityInstanceService.deleteAllPendingMappings(); supervisorService.deleteAllProcessSupervisors(); externalIdentityMappingService.deleteAllExternalIdentityMappings(); identityService.deleteAllUserMemberships(); identityService.deleteAllGroups(); identityService.deleteAllRoles(); identityService.deleteAllUsers(); }