private TreeMap<String, String> createForeignKeyMap(Map<String, Object> properties) throws AmbariException {
    TreeMap<String, String> foreignKeys = new TreeMap<>();
    for (String keyProperty : keyPropertyIds.values()) {
      if (! keyProperty.equals(ARTIFACT_NAME_PROPERTY)) {
        String origValue = (String) properties.get(keyProperty);
        if (origValue != null && ! origValue.isEmpty()) {
          TypeRegistration typeRegistration = typeRegistrationsByFK.get(keyProperty);
          foreignKeys.put(typeRegistration.getShortFKPropertyName(), typeRegistration.toPersistId(origValue));
        }
      }
    }
    return foreignKeys;
  }
Create a map of foreign keys and values which can be persisted.
This map will include the short fk names of the key properties as well
as the 'persist id' representation of the value which is returned
by the type registration.

@param properties  request properties
@return an ordered map of key name to value

@throws AmbariException an unexpected exception occurred
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java