Arquillian Warp Extension: Implementation 1.0.0.Alpha1

org.jboss.arquillian.warp.utils
Class URLUtils

java.lang.Object
  extended by org.jboss.arquillian.warp.utils.URLUtils

public final class URLUtils
extends Object

Provides URL manipulations and functionality.

Author:
Lukas Fryc

Method Summary
static URL buildUrl(String context, String... relocations)
          Use URL context and one or more relocations to build end URL.
static URL buildUrl(URL context, String... relocations)
          Use URL context and one or more relocations to build end URL.
static URL changeBase(URL url, URL base)
           
static URL getUrlBase(URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildUrl

public static URL buildUrl(String context,
                           String... relocations)
Use URL context and one or more relocations to build end URL.

Parameters:
context - first URL used like a context root for all relocation changes
relocations - array of relocation URLs
Returns:
end url after all changes made on context with relocations
Throws:
AssertionError - when context or some of relocations are malformed URLs

buildUrl

public static URL buildUrl(URL context,
                           String... relocations)
Use URL context and one or more relocations to build end URL.

Parameters:
context - first URL used like a context root for all relocation changes
relocations - array of relocation URLs
Returns:
end url after all changes made on context with relocations
Throws:
AssertionError - when context or some of relocations are malformed URLs

getUrlBase

public static URL getUrlBase(URL url)

changeBase

public static URL changeBase(URL url,
                             URL base)

Arquillian Warp Extension: Implementation 1.0.0.Alpha1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.