protected WSRPConsumer importWSRPConsumer(
      PortletDataContext portletDataContext, Element wsrpConsumerElement, WSRPConsumer wsrpConsumer)
      throws Exception {

    WSRPConsumer importedWSRPConsumer = null;

    try {
      importedWSRPConsumer = WSRPConsumerLocalServiceUtil.getWSRPConsumer(wsrpConsumer.getUuid());

      importedWSRPConsumer.setName(wsrpConsumer.getName());
      importedWSRPConsumer.setUrl(wsrpConsumer.getUrl());
      importedWSRPConsumer.setWsdl(wsrpConsumer.getWsdl());
      importedWSRPConsumer.setForwardCookies(wsrpConsumer.getForwardCookies());

      WSRPConsumerLocalServiceUtil.updateWSRPConsumer(importedWSRPConsumer, false);
    } catch (NoSuchConsumerException nsce) {
      ServiceContext serviceContext =
          portletDataContext.createServiceContext(wsrpConsumerElement, wsrpConsumer, _NAMESPACE);

      serviceContext.setUuid(wsrpConsumer.getUuid());

      importedWSRPConsumer =
          WSRPConsumerLocalServiceUtil.addWSRPConsumer(
              portletDataContext.getCompanyId(),
              null,
              wsrpConsumer.getName(),
              wsrpConsumer.getUrl(),
              wsrpConsumer.getForwardCookies(),
              null,
              serviceContext);
    }

    return importedWSRPConsumer;
  }
  @Override
  public int compareTo(WSRPConsumer wsrpConsumer) {
    int value = 0;

    value = getName().compareTo(wsrpConsumer.getName());

    if (value != 0) {
      return value;
    }

    return 0;
  }