docs: @Override
      public Set<String> getQueryAttributes(ExternalContext externalContext) {
          final PortletRequest portletRequest = (PortletRequest) externalContext.getNativeRequest();
          final PortletPreferences preferences = portletRequest.getPreferences();
  
          final Set<String> queryAttributes;
          final String[] configuredAttributes =
                  preferences.getValues(PERSON_LOOKUP_PERSON_LOOKUP_QUERY_ATTRIBUTES, null);
          final String[] excludedAttributes =
                  preferences.getValues(PERSON_LOOKUP_PERSON_LOOKUP_QUERY_ATTRIBUTES_EXCLUDES, null);
  
          // If attributes are configured in portlet prefs just use them
          if (configuredAttributes != null) {
              queryAttributes = new LinkedHashSet<>(Arrays.asList(configuredAttributes));
          }
          // Otherwise provide all available attributes from the IPersonAttributeDao
          else {
              final Set<String> availableAttributes =
                      this.personAttributeDao.getAvailableQueryAttributes();
              queryAttributes = new TreeSet<>(availableAttributes);
          }
  
          // Remove excluded attributes
          if (excludedAttributes != null) {
              for (final String excludedAttribute : excludedAttributes) {
                  queryAttributes.remove(excludedAttribute);
              }
          }
  
          return queryAttributes;
      }