Packagecom.developmentarc.framework.utils
Classpublic class BrowserLocationUtil

Class is a utility class that provides a mix of functionaltity from Flex's BrowserManager and URLUtil classes. The goal of the class is to give an application a mechinism to query the browser's current url (like one can with BrowserManager), but without leveraging the history managment system that flex provides. This allows application that do not include history.js a way to retreive the current runtime url and parse all the various parts pieces. Below is a breakdown of a typical url and all the properties one can access.
     https://google.com:8080/path/is/here/?param1=value1#page2
     \___/   \________/ \__/\____________/ \___________/ \__/
       |        |        |       |               |        |
       |   server name  port    path           query   fragment    
    protocal 
  



Public Properties
 PropertyDefined by
  fragment : String
[static][read-only] Method returns the fragment portion of the url which is all data after the "#".
BrowserLocationUtil
  parameters : Object
[static][read-only] Method breaks down the query string of the current url passing back a generic object with each key/value pair.
BrowserLocationUtil
  path : String
[static][read-only] Method returns the path portion of the current url br/> Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns /path/is/here/
BrowserLocationUtil
  port : uint
[static][read-only] Method returns the port number specificed in the current url.
BrowserLocationUtil
  protocal : String
[static][read-only] Method encapsulates the URLUtil's getProtocal method returning the protocal of the current url.
BrowserLocationUtil
  query : String
[static][read-only] Method return the current query string of the url, which is the protion of the url after the servername and/or port and before the framgment of the url.
BrowserLocationUtil
  serverName : String
[static][read-only] Method returns the server name in the current url of the application.
BrowserLocationUtil
  url : String
[static][read-only] Method returns the current full url in the application.
BrowserLocationUtil
Property detail
fragmentproperty
fragment:String  [read-only]

Method returns the fragment portion of the url which is all data after the "#".
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns page2

Implementation
    public static function get fragment():String
parametersproperty 
parameters:Object  [read-only]

Method breaks down the query string of the current url passing back a generic object with each key/value pair.
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns {param1:'value1'}
Note: This method utilizes the mx.utils.URLUtil.stringToObject() method, which overrides parameters of the same name with the last value found in the string.
Example: Example: http://google.com:8080/path/is/here/?param1=value1¶m1=value2#page2 returns {param1:'value2'}

Implementation
    public static function get parameters():Object
pathproperty 
path:String  [read-only]

Method returns the path portion of the current url br/> Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns /path/is/here/

Implementation
    public static function get path():String
portproperty 
port:uint  [read-only]

Method returns the port number specificed in the current url. If no port is provided 0 will be returned. This method utilizes the Flex URLUtil.getPort() method. See that method for more details.
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns 8080

Implementation
    public static function get port():uint
protocalproperty 
protocal:String  [read-only]

Method encapsulates the URLUtil's getProtocal method returning the protocal of the current url.
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns http

Implementation
    public static function get protocal():String
queryproperty 
query:String  [read-only]

Method return the current query string of the url, which is the protion of the url after the servername and/or port and before the framgment of the url.
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns param1=value1

Implementation
    public static function get query():String
serverNameproperty 
serverName:String  [read-only]

Method returns the server name in the current url of the application.
Example: http://google.com:8080/path/is/here/?param1=value1#page2 returns google.com

Implementation
    public static function get serverName():String
urlproperty 
url:String  [read-only]

Method returns the current full url in the application. The functionality of this method relies on ExternalInterface to call 'window.location.href.toString' to gather the current url.

Implementation
    public static function get url():String