Interface JavaClientApi


public interface JavaClientApi
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 "JC_API" as an attribute of the window object. (Usage: window.JC_API)
Since:
5.0.104
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(@NotNull String identifier)
    Executes a script or executable specified by the given identifier.
    execute(@NotNull String identifier, @NotNull Map<String,Object> params)
    Executes a script or executable specified by the given identifier.
    void
    Reloads the current url of the belonging browser app.
  • Method Details

    • execute

      Object execute(@NotNull @NotNull String identifier)
      Executes a script or executable specified by the given identifier. Usage in javascript:
           JC_API.execute('script:SCRIPT_UID');                 // uid of the script existing in the project
           JC_API.execute('class:NAME_OF_PUBLIC_EXECUTABLE');   // name of public hotspot related to an executable class
           JC_API.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:
      5.0.104
    • execute

      Object execute(@NotNull @NotNull String identifier, @NotNull @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:
           JC_API.execute('class:FSAPI-Caller', {'param1':value1}, function(value){ alert(value); });
           JC_API.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:
      5.0.104
    • reload

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