> +      }
> +
> +      MessagesWithHref messagesWithHref = json.apply(response);
> +
> +      // change the hrefs to ids
> +      List<Message> messages = Lists.newArrayList();
> +
> +      for (MessageWithHref messageWithHref: messagesWithHref) {
> +         Message message = 
> messageWithHref.toBuilder().id(getMessageId(messageWithHref.getId())).build();
> +         messages.add(message);
> +      }
> +
> +      return new Messages(messages, messagesWithHref.getLinks());
> +   }
> +
> +   protected static String getMessageId(String rawMessageHref) {

At the OpenStack Summit I attended some Marconi sessions and learned that 
they're going to be dropping the full HREF and just returning the Id. That 
means eventually all of this annoying parsing code will go away. Yay! But in 
the meantime I don't want to expose an injectable function.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/46/files#r7657274

Reply via email to