de.espirit.firstspirit.client.gui
Interface Fs4Bridge


public interface Fs4Bridge

Api object which will be injected as javascript proxy object in the browser apps of FirstSpirit (e.g. InlinePreview or BrowserApps in JavaClient). The created javascript object will be injected into the current web page with name "FS4BRIDGE" as an attribute of the window object. (Usage: window.FS4BRIDGE)


Attention: This part of the API isn't released yet and may change during the ramp up time.

Since:
4.2.436

Method Summary
 Object execute(String identifier)
          Executes a script or executable specified by the given identifier.
 Object execute(String identifier, Map<String,Object> params)
          Executes a script or executable specified by the given identifier.
 void reload()
          Reloads the current url of the belonging browser app.
 

Method Detail

execute

Object execute(@NotNull
               String identifier)
Executes a script or executable specified by the given identifier. Usage in javascript:
     FS4BRIDGE.execute('script:SCRIPT_UID');                                    // uid of the script existing in the project
     FS4BRIDGE.execute('class:NAME_OF_PUBLIC_EXECUTABLE');          // name of public hotspot related to an executable class
     FS4BRIDGE.execute('class:FULL_QUALIFIED_CLASSNAME');               // FQN of an executable class
 

Parameters:
identifier - the identifier of the executable ("script:SCRIPT_UID" or "class:NAME_OF_PUBLIC_EXECUTABLE" or "class:FULL_QUALIFIED_CLASSNAME")
Returns:
the result of the excutable execution
Since:
4.2.436

execute

Object execute(@NotNull
               String identifier,
               @NotNull
               Map<String,Object> params)
Executes a script or executable specified by the given identifier. The execution of the specified executable is done asynchronously. Because of that any return value is given to an additional javascript callback function at the end of parameters. Usage in javascript:
     FS4BRIDGE.execute('class:FSAPI-Caller', {'param1':value1}, function(value){ alert(value); });
     FS4BRIDGE.execute('script:fsapiscript', {'param1':value1}, function(value){ alert(value); });
 

Parameters:
identifier - the identifier of the executable ("script:SCRIPT_UID" or "class:NAME_OF_PUBLIC_EXECUTABLE" or "class:FULL_QUALIFIED_CLASSNAME")
params - the parameter map which should be passed to the executable
Since:
4.2.436

reload

void reload()
Reloads the current url of the belonging browser app.

Since:
4.2.436


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480