docs: public Attributes getAttributesByUniqueName(String uniqueName, String[] attrIds, List<String> entityTypes) throws WIMException {
  
          String DN = null;
          Attributes attributes = null;
          uniqueName = iLdapConfigMgr.switchToLdapNode(uniqueName);
          boolean needTranslate = false;
          if (iLdapConfigMgr.needTranslateRDN()) {
              if (entityTypes != null && entityTypes.size() > 0) {
                  for (int i = 0; i < entityTypes.size(); i++) {
                      if (iLdapConfigMgr.needTranslateRDN(entityTypes.get(i))) {
                          needTranslate = true;
                          break;
                      }
                  }
              } else {
                  needTranslate = true;
              }
          }
          if (!needTranslate) {
              DN = uniqueName;
              attributes = checkAttributesCache(DN, attrIds);
              attributes.put(LDAP_DN, DN);
              return attributes;
          }
  
          boolean readFromCache = false;
          String uniqueNameKey = "UNIQUENAME::" + toKey(uniqueName);
          if (getAttributesCache() != null) {
              readFromCache = true;
              Object cached = getAttributesCache().get(uniqueNameKey);
  
              if (cached != null) {
                  if (cached instanceof String) {
                      /*
                       * This may be a uniqueName to distinguished name mapping entry. Use the distinguished
                       * name to look up the attributes.
                       */
                      DN = (String) cached;
                      try {
                          attributes = checkAttributesCache(DN, attrIds);
                          attributes.put(LDAP_DN, DN);
                          return attributes;
  
                      } catch (EntityNotFoundException e) {
                          // Name not found, invalidate this entry and continue doing search
                          getAttributesCache().invalidate(uniqueNameKey);
                      }
                  }
              }
          }
  
          /*
           * We didn't find any cached attributes, so search for the entity and it's attributes.
           */
          String filter = "objectclass=*";
          SearchControls controls = new SearchControls();
          controls.setTimeLimit(iTimeLimit);
          controls.setCountLimit(iCountLimit);
          controls.setSearchScope(SearchControls.OBJECT_SCOPE);
          controls.setReturningAttributes(attrIds); // Only retrieve requested attributes
          controls.setReturningObjFlag(false);
  
          TimedDirContext ctx = iContextManager.getDirContext();
          NamingEnumeration<SearchResult> neu = null;
          try {
              try {
                  neu = ctx.search(uniqueName, filter, controls);
              } catch (NamingException e) {
                  if (!ContextManager.isConnectionException(e)) {
                      throw e;
                  }
                  ctx = iContextManager.reCreateDirContext(ctx, e.toString());
                  neu = ctx.search(uniqueName, filter, controls);
              }
              if (neu.hasMoreElements()) {
                  SearchResult thisEntry = neu.nextElement();
                  if (thisEntry != null) {
                      DN = LdapHelper.prepareDN(thisEntry.getNameInNamespace(), null);
                      attributes = thisEntry.getAttributes();
                      if (iAttrRangeStep > 0) {
                          supportRangeAttributes(attributes, DN, ctx);
                      }
                  }
              }
  
          } catch (NameNotFoundException e) {
              String msg = Tr.formatMessage(tc, WIMMessageKey.ENTITY_NOT_FOUND, WIMMessageHelper.generateMsgParms(uniqueName));
              throw new EntityNotFoundException(WIMMessageKey.ENTITY_NOT_FOUND, msg, e);
          } catch (NamingException e) {
              String msg = Tr.formatMessage(tc, WIMMessageKey.NAMING_EXCEPTION, WIMMessageHelper.generateMsgParms(e.toString(true)));
              throw new WIMSystemException(WIMMessageKey.NAMING_EXCEPTION, msg, e);
          } finally {
              iContextManager.releaseDirContext(ctx);
          }
  
          if (attributes != null) {
              if (readFromCache) {
                  updateAttributesCache(uniqueNameKey, DN, attributes, attrIds);
              }
              attributes.put(LDAP_DN, DN);
          } else {
              String msg = Tr.formatMessage(tc, WIMMessageKey.ENTITY_NOT_FOUND, WIMMessageHelper.generateMsgParms(uniqueName));
              throw new EntityNotFoundException(WIMMessageKey.ENTITY_NOT_FOUND, msg);
          }
  
          return attributes;
      }