Servoy 3.5.x Public API

com.servoy.j2db.plugins
Interface IClientPluginAccess

All Superinterfaces:
IPluginAccess, IUIBlocker
All Known Subinterfaces:
IDeveloperPluginAccess, IWebClientPluginAccess

public interface IClientPluginAccess
extends IPluginAccess, IUIBlocker

Default client plugin api


Field Summary
static int CLIENT
          Constant returned by getApplicationType
static int WEB_CLIENT
          Constant returned by getApplicationType
 
Method Summary
 Object executeMethod(String context, String methodname, Object[] arguments, boolean async)
          Executes a method with methodname and arguments in the given context If context is a formname a form method is executed, if null a global method will be assumed.
 String getApplicationName()
          Get the application name.
 int getApplicationType()
          Get the application type.
 IBeanManager getBeanManager()
          Get the bean manager (used to control beans).
 String getClientID()
          Get the clientID.
 ICmdManager getCmdManager()
          Get the cmd manager (used to execute undoable cmd).
 Window getCurrentWindow()
          Get the current showing window (Dialog or Frame) Use this one as a parent if you want to display a dialog or other frame.
 JMenu getExportMenu()
          Get the export menu, used by plugins to add export menu items (actions).
 IFormManager getFormManager()
          Get the form manager (used to control the forms, show etc).
 String getI18NMessage(String i18nKey, Object[] arguments)
          Get a message for the specified i18n key
 JMenu getImportMenu()
          Get the import menu, used by plugins to add import menu items (actions).
 ResourceBundle getResourceBundle(Locale locale)
          ResourceBundle containing all the messages of the current loaded solution.
 Map getRuntimeProperties()
          Map containing runtime properties (will never be stored, and live one session)
 Remote getServerService(String name)
          Get a remote service, will not work in the Servoy Runtime product!
 URL getServerURL()
          Get the http server url
 String getSolutionName()
          Get the current solution name
 IToolbarPanel getToolbarPanel()
          Get the toolbar panel (used to control toolbars).
 String getTransactionID(String serverName)
          Get the transaction id, the client may have.
 Object getUserUID()
          Get the userUID.
 void handleException(String msg, Exception detail)
          Invoke the Servoy solution error handler with a msg and exception.
 void output(Object msg)
          Output something on the out stream and in log.
 void registerURLStreamHandler(String protocolName, URLStreamHandler handler)
          Register a URLStreamHandler for a protocol
 void reportWarningInStatus(String s)
          Report a warning in the status (will be shown in red).
 void setStatusText(String txt)
          set a status text in the status area.
 
Methods inherited from interface com.servoy.j2db.plugins.IPluginAccess
getReleaseNumber, getSettings, getThreadPool, getVersion
 
Methods inherited from interface com.servoy.j2db.util.IUIBlocker
blockGUI, releaseGUI
 

Field Detail

CLIENT

static final int CLIENT
Constant returned by getApplicationType

See Also:
Constant Field Values

WEB_CLIENT

static final int WEB_CLIENT
Constant returned by getApplicationType

See Also:
Constant Field Values
Method Detail

executeMethod

Object executeMethod(String context,
                     String methodname,
                     Object[] arguments,
                     boolean async)
                     throws Exception
Executes a method with methodname and arguments in the given context If context is a formname a form method is executed, if null a global method will be assumed.

Returns:
null if called with "true" for async flag, otherwise the method result is returned
Throws:
Exception

getApplicationName

String getApplicationName()
Get the application name.

Returns:
String

getApplicationType

int getApplicationType()
Get the application type.

Returns:
int the type

getBeanManager

IBeanManager getBeanManager()
Get the bean manager (used to control beans).

Returns:
IBeanManager

getClientID

String getClientID()
Get the clientID.

Returns:
String the client id, for use in dataserver.

getCmdManager

ICmdManager getCmdManager()
Get the cmd manager (used to execute undoable cmd).

Returns:
ICmdManager

getCurrentWindow

Window getCurrentWindow()
Get the current showing window (Dialog or Frame) Use this one as a parent if you want to display a dialog or other frame.

Returns:
Window

getExportMenu

JMenu getExportMenu()
Get the export menu, used by plugins to add export menu items (actions).

Returns:
JMenu

getFormManager

IFormManager getFormManager()
Get the form manager (used to control the forms, show etc). Note: the form manager can be casted to a ISwingFormManager for more usage

Returns:
the form manager

getI18NMessage

String getI18NMessage(String i18nKey,
                      Object[] arguments)
Get a message for the specified i18n key

Parameters:
i18nKey - The key
arguments - Arguments to be used that are inserted in the found message (null if no args).
Returns:
the string if the key is found.

getImportMenu

JMenu getImportMenu()
Get the import menu, used by plugins to add import menu items (actions).

Returns:
JMenu

getResourceBundle

ResourceBundle getResourceBundle(Locale locale)
ResourceBundle containing all the messages of the current loaded solution.

Parameters:
locale - The locale for which the resource bundle must be created, null if it has to use the default from the client.
Since:
Servoy 3.5.3

getRuntimeProperties

Map getRuntimeProperties()
Map containing runtime properties (will never be stored, and live one session)

Since:
Servoy 3.5

getServerService

Remote getServerService(String name)
                        throws Exception
Get a remote service, will not work in the Servoy Runtime product!

Throws:
Exception

getServerURL

URL getServerURL()
Get the http server url


getSolutionName

String getSolutionName()
Get the current solution name

Returns:
the name, returns null if no solution is open
Since:
2.2rc4

getToolbarPanel

IToolbarPanel getToolbarPanel()
Get the toolbar panel (used to control toolbars).

Returns:
IToolbarPanel

getTransactionID

String getTransactionID(String serverName)
Get the transaction id, the client may have.

Parameters:
serverName - the server name for which a transaction id is requested
Returns:
String the transaction id, returns null if none present.

getUserUID

Object getUserUID()
Get the userUID.

Returns:
int the user id, null if not logged in

handleException

void handleException(String msg,
                     Exception detail)
Invoke the Servoy solution error handler with a msg and exception. Shows a dialog if no solution error handler present (reports in log for headless/web-client)

Parameters:
msg -
detail -
Since:
3.5

output

void output(Object msg)
Output something on the out stream and in log. (if running in debugger view output tab)

Parameters:
msg -

registerURLStreamHandler

void registerURLStreamHandler(String protocolName,
                              URLStreamHandler handler)
Register a URLStreamHandler for a protocol

Parameters:
protocolName -
handler -

reportWarningInStatus

void reportWarningInStatus(String s)
Report a warning in the status (will be shown in red).
Note:Status will be cleared automatically

Parameters:
s - the warning

setStatusText

void setStatusText(String txt)
set a status text in the status area.


Copyright © 2009 Servoy B.V.