telosys.objects
Class TelosysEnv

java.lang.Object
  extended bytelosys.objects.TelosysEnv

public class TelosysEnv
extends java.lang.Object

Telosys environment object. This object stores the absolute URLs to access the server side with AJAX calls. It provides different kind of objects ( Screen, Service, Actions, ... )


Constructor Summary
TelosysEnv()
           
 
Method Summary
 object getActions(object oScreen)
          Creates and returns a new 'ScreenActions' object
 ScreenActions getActions(string sScreenName, string sScreenId)
          Creates and returns a new 'ScreenActions' object
 string getAjaxUrl()
          Returns the absolute URL for Screen actions calls ( AJAX calls )
 Browser getBrowser()
          Returns the browser object
 ScreenActions getCurrentActions()
          Returns the current 'Actions' instance Runtime error if not defined
 Screen getCurrentScreen()
          Returns the current 'Screen' instance Runtime error if no current screen
 Keyboard getKeyboard()
          Returns the keyboard object
 string getRootUrl()
          Returns the absolute root URL of the WebApp
 Screen getScreen(string sScreenName, string sContextId)
          Creates and returns a new 'Screen' object for the given name and id
 string getScreenMapUrl(string sName, string sType, string sContextId, string sContextType, string sAction)
          Return the absolute URL for screenmap calls with optional parameters.
 ScreenService getService(string sServiceName, function callbackFunction)
          Creates and returns a new 'ScreenService' object
 string toString_()
          Returns all URLs (root, screen map, AJAX URLs)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TelosysEnv

public TelosysEnv()
Method Detail

getRootUrl

public string getRootUrl()
Returns the absolute root URL of the WebApp

Returns:
the root URL

getScreenMapUrl

public string getScreenMapUrl(string sName,
                              string sType,
                              string sContextId,
                              string sContextType,
                              string sAction)
Return the absolute URL for screenmap calls with optional parameters. This method can be used with 0 or 5 arguments.

Parameters:
sName - Screen Map name
sType - Screen Map type ( "html", "xul" )
sContextId - Context id
sContextType - Context type
sAction - Context action ( "open", "use", "none" )
Returns:
the URL

getAjaxUrl

public string getAjaxUrl()
Returns the absolute URL for Screen actions calls ( AJAX calls )

Returns:
the URL

getCurrentScreen

public Screen getCurrentScreen()
Returns the current 'Screen' instance Runtime error if no current screen

Returns:
the Screen instance ( or null after runtime error )

getCurrentActions

public ScreenActions getCurrentActions()
Returns the current 'Actions' instance Runtime error if not defined

Returns:
the Actions instance ( or null after runtime error )

getScreen

public Screen getScreen(string sScreenName,
                        string sContextId)
Creates and returns a new 'Screen' object for the given name and id

Parameters:
sScreenName - the screen name
sContextId - the Screen Context id
Returns:
the Screen instance ( or null if error )

getService

public ScreenService getService(string sServiceName,
                                function callbackFunction)
Creates and returns a new 'ScreenService' object

Parameters:
sServiceName - the service's name
callbackFunction - Callback function to call to process the service response
Returns:
the Service instance ( or null if error )

getActions

public object getActions(object oScreen)
Creates and returns a new 'ScreenActions' object

Parameters:
oScreen - the Screen object
Returns:
the ScreenActions instance ( or null if error )

getActions

public ScreenActions getActions(string sScreenName,
                                string sScreenId)
Creates and returns a new 'ScreenActions' object

Parameters:
sScreenName - the Screen name
sScreenId - the Screen id
Returns:
the ScreenActions instance ( or null if error )

getKeyboard

public Keyboard getKeyboard()
Returns the keyboard object

Returns:
the keyboard object

getBrowser

public Browser getBrowser()
Returns the browser object

Returns:
the browser object

toString_

public string toString_()
Returns all URLs (root, screen map, AJAX URLs)

Returns:
all URLs