Servoy 4.1.x Public API

com.servoy.j2db.plugins
Interface IClientPluginAccess

All Superinterfaces:
IPluginAccess, IUIBlocker
All Known Subinterfaces:
IWebClientPluginAccess

public interface IClientPluginAccess
extends IPluginAccess, IUIBlocker

Default client plugin api


Field Summary
static int CLIENT
          Constant returned by getApplicationType
static int DEVELOPER
          Deprecated.  
static int WEB_CLIENT
          Constant returned by getApplicationType
 
Method Summary
 void executeMethod(String formname, String methodname, Object[] arguments)
          Deprecated.  
 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).
 JFrame getMainApplicationFrame()
          Deprecated. use getCurrentWindow if possible (gives the real current window)
 String getMessage(String i18nKey)
          Deprecated.  
 String getMessage(String i18nKey, Object[] arguments)
          Deprecated.  
 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 getUserID()
          Deprecated. Get the userID.
 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 reportError(Component parentComponent, String msg, Object detail)
          Deprecated.  
 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
getExecutor, getPluginManager, getReleaseNumber, getSettings, getThreadPool, getVersion, reportError
 
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

DEVELOPER

static final int DEVELOPER
Deprecated. 
Constant returned by getApplicationType

Since:
Servoy 3.5
See Also:
Constant Field Values
Method Detail

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

getApplicationType

int getApplicationType()
Get the application type.

Returns:
int the type

getApplicationName

String getApplicationName()
Get the application name.

Returns:
String

getRuntimeProperties

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

Since:
Servoy 3.5

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

setStatusText

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


getUserUID

Object getUserUID()
Get the userUID.

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

getClientID

String getClientID()
Get the clientID.

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

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.

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.

getCmdManager

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

Returns:
ICmdManager

getBeanManager

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

Returns:
IBeanManager

getImportMenu

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

Returns:
JMenu

getExportMenu

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

Returns:
JMenu

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

getToolbarPanel

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

Returns:
IToolbarPanel

output

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

Parameters:
msg -

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

getServerService

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

Throws:
Exception

registerURLStreamHandler

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

Parameters:
protocolName -
handler -

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

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

executeMethod

void executeMethod(String formname,
                   String methodname,
                   Object[] arguments)
Deprecated. 

Executes a method with methodname and arguments (async).

Since:
3.5

reportError

void reportError(Component parentComponent,
                 String msg,
                 Object detail)
Deprecated. 

Parameters:
parentComponent -
msg -
detail -
Since:
3.5 Report an error when in a dialog. (use handleException)

getMainApplicationFrame

JFrame getMainApplicationFrame()
Deprecated. use getCurrentWindow if possible (gives the real current window)

Get the main application frame.

Returns:
JFrame

getMessage

String getMessage(String i18nKey)
Deprecated. 

Get a message for the specified i18n key

Parameters:
i18nKey - The key
Returns:
the string if the key is found.

getMessage

String getMessage(String i18nKey,
                  Object[] arguments)
Deprecated. 

Get a message for the specified i18n key

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

getUserID

Object getUserID()
Deprecated. Get the userID.

Returns:
int the user id

Copyright © 2009 Servoy B.V.

>