se.kmr.scam.client.http.util
Class URLUtil

java.lang.Object
  extended byse.kmr.scam.client.http.util.URLUtil

public class URLUtil
extends Object

Title:

Description:

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
jand
Created:
den 10 december 2002

Constructor Summary
URLUtil()
           
 
Method Summary
static Collection fromURI(Model model, Collection subjectURIs)
          Creates a collection of uri values for a collection of Resource objects.
static String getQueryString(HttpServletRequest request, boolean encode)
          Gets the queryString attribute of the URLUtil class
static String getRequestURL(HttpServletRequest request)
          Gets the requestURL attribute of the URLUtil class
static int parseInt(String value, int defaultValue)
          Parse a integer value from a java.lang.String object.
static int parseInt(String value, int minValue, int defaultValue)
          Parse a integer value from a String object.
static List toURI(Collection subjects)
          Creates a collection of uri values for a collection of Resource objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLUtil

public URLUtil()
Method Detail

getRequestURL

public static String getRequestURL(HttpServletRequest request)
Gets the requestURL attribute of the URLUtil class

Parameters:
request - Description of the Parameter
Returns:
The requestURL value

getQueryString

public static String getQueryString(HttpServletRequest request,
                                    boolean encode)
Gets the queryString attribute of the URLUtil class

Parameters:
request - Description of the Parameter
encode - Description of the Parameter
Returns:
The queryString value

toURI

public static List toURI(Collection subjects)
Creates a collection of uri values for a collection of Resource objects.

Parameters:
subjects - Use this collection of Resource objects
Returns:
A collection of the uri values.

fromURI

public static Collection fromURI(Model model,
                                 Collection subjectURIs)
Creates a collection of uri values for a collection of Resource objects.

Parameters:
model - Description of the Parameter
subjectURIs - Description of the Parameter
Returns:
A collection of the uri values.

parseInt

public static int parseInt(String value,
                           int defaultValue)
Parse a integer value from a java.lang.String object. This function will always return a integer value, either the parsed value or the default value.

Parameters:
value - Parse this object
defaultValue - Default integer value
Returns:
The integer value of the String object, if the String object represents a integer, otherwise the default value.

parseInt

public static int parseInt(String value,
                           int minValue,
                           int defaultValue)
Parse a integer value from a String object.
If the object does not represent a integer value will the parsed value be replaced by the defaultValue.
The result will satisfy minValue <= x <= MAX_INTEGER where x denotes parsed value

Parameters:
value - Parse this value
minValue - minimum value of the integer value
defaultValue - use this value if the given object does not represent a integer value
Returns:
a integer value as described above


Copyright © 2003 SCAM. All Rights Reserved.