// Check to see whether given membershiptype is mandatory or not
UserACL acl = uiMembership.getApplicationComponent(UserACL.class);
List<String> mandatories = acl.getMandatoryMSTypes();
if (!mandatories.isEmpty() && mandatories.contains(name)) {
UIApplication uiApp = event.getRequestContext().getUIApplication();
uiApp.addMessage(new ApplicationMessage("UIMembershipList.msg.DeleteMandatory", null));
return;
}
OrganizationService service = uiMembership.getApplicationComponent(OrganizationService.class);
MembershipType membershipType = service.getMembershipTypeHandler().findMembershipType(name);