public static boolean hasProtocol(String url) {
    return url.matches("^[^:]+://.*$");
  }
Checks if URL has the protocol
@param url url
@return true if protocol is present
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/Services.java