public void joinOrUpdateRoleInLanguageTeam(String locale, Long personId,
boolean isTranslator, boolean isReviewer, boolean isCoordinator)
throws ZanataServiceException {
LocaleId localeId = new LocaleId(locale);
HPerson currentPerson = personDAO.findById(personId, false);
boolean alreadyJoined =
localeMemberDAO.isLocaleMember(personId, localeId);
HLocaleMember localeMember;
if (!alreadyJoined) {
if (currentPerson.getLanguageMemberships().size() >= MAX_NUMBER_MEMBERSHIP) {
throw new ZanataServiceException(
"You can only be a member of up to "
+ MAX_NUMBER_MEMBERSHIP
+ " languages at one time.");
}