docs: private String validateEntity(Entity entity) throws WIMException {
          String METHODNAME = "validateEntity";
          String type = null;
          String secName = null;
          String uniqueId = null;
          String uniqueName = null;
  
          if (entity.getIdentifier().isSet(SchemaConstants.PROP_UNIQUE_NAME)) {
              uniqueName = entity.getIdentifier().getUniqueName();
          } else if (entity.getIdentifier().isSet(SchemaConstants.PROP_EXTERNAL_NAME)) {
              uniqueName = entity.getIdentifier().getExternalName();
          } else if (entity.getIdentifier().isSet(SchemaConstants.PROP_UNIQUE_ID)) {
              uniqueId = entity.getIdentifier().getUniqueId();
          } else if (entity.getIdentifier().isSet(SchemaConstants.PROP_EXTERNAL_ID)) {
              uniqueId = entity.getIdentifier().getExternalId();
          }
  
          if (uniqueName != null) {
              secName = uniqueName; // stripRDN(uniqueName);
          }
  
          if (uniqueId != null && uniqueId.trim().length() > 0) {
              if (isValidUserOrGroup(uniqueId)) {
                  uniqueName = uniqueId;
                  secName = uniqueId;
              } else {
                  secName = getSecNameFromUniqueID(uniqueId);
                  uniqueName = secName;
              }
          }
  
          if (secName != null && secName.trim().length() > 0) {
              String rdnAttr = getRDN(entity.getIdentifier().getUniqueName());
              Set<String> EntityTypes = entityConfigMap.keySet();
              List<String> entities = new ArrayList<String>();
              Iterator<String> it = EntityTypes.iterator();
  
              while (it.hasNext()) {
                  String entityType = it.next();
                  if ((rdnAttr == null) || (rdnAttr.equalsIgnoreCase(entityConfigMap.get(entityType)))) {
                      entities.add(entityType);
                  }
              }
              //handle if entities.size== or >1 then respect entity.getType from input DO
              //this is better than just letting the last matching type be returned.
              String inputType = entity.getTypeName();
              type = getEntityTypeFromUniqueName(secName, entities, inputType);
              entity.getIdentifier().setUniqueName(uniqueName);
          }
  
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, METHODNAME + " The entity type for " + secName + " is " + type);
          }
          if (type == null) {
              throw new EntityNotFoundException(WIMMessageKey.ENTITY_NOT_FOUND, Tr.formatMessage(tc, WIMMessageKey.ENTITY_NOT_FOUND,
                                                                                                 WIMMessageHelper.generateMsgParms(secName)));
          }
          return type;
      }