com.atlassian.bamboo.util
Class UrlUtils

java.lang.Object
  extended by com.atlassian.bamboo.util.UrlUtils

public class UrlUtils
extends java.lang.Object


Constructor Summary
UrlUtils()
           
 
Method Summary
static java.lang.String appendSlashIfDoesntExist(java.lang.String theString)
          Checks whether or not the given string has a '/' character as the last character, and appends one if it doesn't
static java.lang.String correctlyFormatUrl(java.lang.String host)
           
static java.lang.String replaceOrInsertParamValue(java.lang.String queryString, java.lang.String paramField, java.lang.String newParamValue)
           
static java.lang.String stripLeadingSlashes(java.lang.String toStrip)
          Strips any leading '/' characters off the front of the string, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlUtils

public UrlUtils()
Method Detail

replaceOrInsertParamValue

public static java.lang.String replaceOrInsertParamValue(java.lang.String queryString,
                                                         java.lang.String paramField,
                                                         java.lang.String newParamValue)

correctlyFormatUrl

public static java.lang.String correctlyFormatUrl(java.lang.String host)

stripLeadingSlashes

@NotNull
public static java.lang.String stripLeadingSlashes(@Nullable
                                                           java.lang.String toStrip)
Strips any leading '/' characters off the front of the string, if any.

Parameters:
toStrip - - the string to strip
Returns:
the string without the leading '/' characters

appendSlashIfDoesntExist

@NotNull
public static java.lang.String appendSlashIfDoesntExist(@Nullable
                                                                java.lang.String theString)
Checks whether or not the given string has a '/' character as the last character, and appends one if it doesn't

Parameters:
theString - to check and append.
Returns:
the original string with the extra '/' if required.


Copyright © 2010 Atlassian. All Rights Reserved.