docs: @Override
      public JsonEntityBean getEntity(IGroupMember member) {
  
          // get the type of this member entity
          EntityEnum entityEnum = getEntityType(member);
  
          // construct a new entity bean for this entity
          JsonEntityBean entity;
          if (entityEnum.isGroup()) {
              entity = new JsonEntityBean((IEntityGroup) member, entityEnum);
          } else {
              entity = new JsonEntityBean(member, entityEnum);
          }
  
          // if the name hasn't been set yet, look up the entity name
          if (entity.getName() == null) {
              entity.setName(lookupEntityName(entity));
          }
  
          if (EntityEnum.GROUP.equals(entity.getEntityType())
                  || EntityEnum.PERSON.equals(entity.getEntityType())) {
              IAuthorizationPrincipal principal = getPrincipalForEntity(entity);
              entity.setPrincipalString(principal.getPrincipalString());
          }
          return entity;
      }