org.infolayer.templates
Class IlUrl

java.lang.Object
  extended byorg.infolayer.templates.IlUrl

public class IlUrl
extends java.lang.Object

Infolayer URL encapsulation. Provides simple access to the (relative) path and query values


Constructor Summary
IlUrl(IlRequest context, java.lang.String path)
          Sets the given url. if the absolute flag is set to false, the url is trated relative to the context base path, absolute otherwise.
 
Method Summary
 java.lang.Object getObject(java.lang.String name, UmlClassifier type)
           
 OclCollection getParameterValues(java.lang.String name)
           
 java.lang.String getPath()
          Returns the path.
 java.lang.String getProperty(java.lang.String name)
          Returns the URL parameter with the given name.
 java.util.Properties getQuery()
          returns a copy of the query properties
 boolean isLocal()
           
 java.lang.String toString()
           
static java.lang.String urlDecode(java.lang.String url, java.lang.String enc)
          Decodes the given url parameter resolving the %-escaped characters
static java.lang.String urlEncode(java.lang.String value, java.lang.String encoding)
           
 IlUrl withObject(java.lang.String name, java.lang.Object value)
           
 IlUrl withPath(java.lang.String path)
           
 IlUrl withProperty(java.lang.String name, java.lang.String value)
          returns a new IlUrl with the given property set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlUrl

public IlUrl(IlRequest context,
             java.lang.String path)
Sets the given url. if the absolute flag is set to false, the url is trated relative to the context base path, absolute otherwise. Use this constructor for creating external URLs. For most cases, it will make sense to use IlRequest.createUrl(Object obj).

Method Detail

urlDecode

public static java.lang.String urlDecode(java.lang.String url,
                                         java.lang.String enc)
Decodes the given url parameter resolving the %-escaped characters


urlEncode

public static java.lang.String urlEncode(java.lang.String value,
                                         java.lang.String encoding)

getPath

public java.lang.String getPath()
Returns the path. If local, relative to request.getBasePath().

Returns:
String

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the URL parameter with the given name.

Returns:
String

getParameterValues

public OclCollection getParameterValues(java.lang.String name)

getObject

public java.lang.Object getObject(java.lang.String name,
                                  UmlClassifier type)

isLocal

public boolean isLocal()

withProperty

public IlUrl withProperty(java.lang.String name,
                          java.lang.String value)
returns a new IlUrl with the given property set


withPath

public IlUrl withPath(java.lang.String path)

withObject

public IlUrl withObject(java.lang.String name,
                        java.lang.Object value)

toString

public java.lang.String toString()

getQuery

public java.util.Properties getQuery()
returns a copy of the query properties