public interface ServerExports
| Modifier and Type | Method and Description |
|---|---|
boolean |
applyEnhancedConfig(int browseId,
EnhancedBrowseConfig config)
Apply the given enhanced browse configuration to the given browse.
|
int |
connectEvent(long resourceId,
long clientSocketId)
Called by the P2J client side, it will inform the server that a server event was generated.
|
long |
createExternal()
Create an external resource to be used by a remote, non P2J, side.
|
long |
createSocket(int id)
Create a socket and associated with the given ID.
|
void |
deleteHandle(long handleId,
boolean noError)
Delete the resource associated with the specified handle.
|
ServerReturnValue |
emitComEvent(int widgetId,
java.lang.String eventName,
BaseDataType... args)
Emits the supplied COM event.
|
void |
endSpreadsheetBatch(int contextId)
Ends the current batch of spreadsheet commands.
|
void |
forkNewSession()
Creates a new session forked from the current one.
|
java.lang.String[] |
getColumnFiltersMappedDataTypes(int browseId)
For enhanced filtering: get data types of the fields mapped using
DB-FILTER-FIELD-MAPPING. |
int |
getCurrentRow(int browseId)
Get current row in the query.
|
java.util.Map<java.lang.String,byte[]> |
getCustomFontData()
Returns font data in a form of map where key is the lower-cased name as defined in server
directory "custom-font" container and map value is the raw file data of respective font
files.
|
WidgetConfig[] |
getEditorsConfigs(int browseId)
Get configurations of widgets used for in-browse editing (fill-ins, toggle-boxes or
combo-boxes).
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseResetTargets(int browseId)
Get enhanced browse configuration reset targets available for the target browse and the
current user.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseSaveTargets(int browseId)
Get save targets for an enhanced browse configuration, which are available for the current
user.
|
boolean |
getForceDialogsInCenter(boolean defaultValue)
Gets the value for the flag indicating whether or not dialogs should appear in the center
of the screen,
|
int |
getGuiSubMenuDelay(int defaultDelay)
Gets the value for sub menu show/hide delay in GUI mode.
|
java.lang.Integer |
getHTMLBrowserLoadTimeout()
Retrieve the number of milliseconds to wait when loading a HTML web page.
|
KeyboardLayoutsSettings |
getKeyboardLayoutsSettings()
Gets the supported keyboard layouts defined by the directory.
|
int[] |
getLegacyTextMetrics(java.lang.String text,
java.lang.String key)
Get the legacy metrics for the given text, using the font specified by the given key.
|
java.lang.String[] |
getProgressStackTrace()
Get the Progress stack trace
|
java.lang.String |
getRequiredTheme()
Returns the theme class / name configured in directory as "theme/name" or
null if it
isn't configured or isn't a valid class / short name (for built-in themes). |
java.lang.Long |
getResourceIdByWidgetId(int widgetId)
Gets the widget's resource id.
|
int |
getRowCount(int browseId)
Get the number of rows iterated by the query (for preselect queries - matches result size,
for adaptive queries - matches the size of the part of the result set the query has already
iterated over).
|
int |
getRowCount(int browseId,
int startRow)
Get number of available rows starting from the given one.
|
BrowseRow[] |
getRows(int browseId,
char searchChar,
int searchColumn,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb)
This function is used when search by key is performed in a browse.
|
BrowseRow[] |
getRows(int browseId,
int startRowIndex,
int count,
boolean forward,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Retrieves several subsequent rows from the database.
|
boolean |
getSessionTooltips()
Accesses the SESSION:TOOLTIPS attribute for this session.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getSupportedHelperApplications()
Gets the supported helper applications with their mime types.
|
java.util.List<ThemeOption> |
getThemes()
Returns a collection of all the valid themes configured in directory as @available-themes@.
|
int[] |
getUploadFileSizeLimits()
Gets the values for uploaded file size limits from server.
|
void |
help(int lastKey,
ScreenBuffer[] buffer)
Locates and executes a preconfigured HELP application.
|
ServerReturnValue |
invoke(InvocationRequestPayload request)
This API is used when P2J client runs in embedded mode (i.e.
|
ServerReturnValue |
invokeInProcedure(java.lang.String procedure,
java.lang.String inProcHandle,
java.lang.Object... params)
Invoke an internal procedure with the specified name.
|
ServerReturnValue |
invokeProcedure(java.lang.String procedure,
java.lang.Object... params)
Invoke an internal procedure with the specified name.
|
ServerReturnValue |
invokeServerEvent(int id)
Called from the client-side, it executes the server-side event by calling
ServerEvent.invoke(int). |
boolean |
isBypassDefaultWindowShowInPauseNoMessage(boolean defaultValue)
Gets the value for the flag indicating whether or not pause x no message should enable the
default-window
|
boolean |
isOldBrowseSelectionBar()
Returns
true if the selected browse row is drawn in the "old" mode, which is drawing it
opaque using the highlight colors, rather than drawing it translucent. |
boolean |
isRowAvailable(int browseId,
int rowIndex)
Determines if the specified browse row is "available", i.e.
|
byte[] |
loadEnvironment(java.lang.String env)
Load the specified environment as resource.
|
void |
messageBlasterEvent(long id,
int msgVal,
int wParam,
int lParam,
int lplRetVal)
Sends a
MessageBlaster notification back to server. |
void |
moveColumnServer(int browseId,
int src,
int dest)
Implements the server-side MOVE-COLUMN() widget method.
|
void |
notifyBrowseLayoutPerformed(int browseId)
Notify server that browse layout has been performed on the client side.
|
void |
openHyperlink(int columnWidgetId,
java.lang.String hyperlinkText)
Open the hyperlink in the browse column by raising the event previously set for this column
using the HYPERLINK attribute (FWD extension).
|
void |
publishExternal(java.lang.String event,
long publisher,
java.lang.String[] args)
Notify all subscribers (to the given event) that the event has occurred.
|
ColorTable.EnvironmentColorTable |
readColorTable(java.lang.String envName)
Get color table of the specified environment.
|
FontDetails<?>[] |
readDefaultFonts(boolean useIni)
Read the default fonts.
|
FontDetails<?>[] |
readFontTable()
Read the entire font-table.
|
java.util.Map<java.lang.String,java.net.URI> |
readHtmlBrowserWhitelist()
Retrieve all local paths whitelisted as resource-base for html web browser.
|
java.util.Map<java.lang.String,int[]> |
readLegacyTextMetrics()
Read the legacy text metrics for all the texts and each font defined in the font table, for
this user.
|
int |
readResponseEvent(long resourceId)
Called by the P2J client side, it will inform the server that a server-event was generated.
|
ColorTableEntry[] |
readSystemColorTable()
Get system colors.
|
FontDetails<?>[] |
readSystemFontTable()
Read the font-table with the name of the legacy system fonts.
|
ScreenBuffer[] |
refresh(int frameId)
Obtains the latest screen buffer associated with the given frame.
|
void |
refreshBuffers(ScreenBuffer[] buff)
Refresh the server-side screen buffer for the given frame.
|
void |
requestNodeExpand(int treeWidgetId,
int nodeId,
boolean expand,
boolean allChildren)
Clients use this method to request node expansion status change.
|
EhBrowseConfigKey |
resetEnhancedConfig(int browseId,
EnhancedBrowseSaveTarget resetTarget)
Reset (delete) an enhanced configuration at the certain level for this browse.
|
void |
resetWaitState()
Resets wait-state previously set by
LogicalTerminal.setWaitState(String). |
boolean |
runReport(int browseId,
java.lang.String outputFileName,
MediaType outputFormat,
ScreenBuffer[] sb)
Run browse report.
|
EnhancedBrowseConfig |
saveOrCacheEnhancedConfig(int browseId,
EnhancedBrowseSaveTarget saveTarget)
Save the current enhanced browse configuration using the specified save target.
|
void |
setClientMetrics(ClientMetrics metrics)
Sets the client metrics in the current session.
|
int |
setCurrentRow(int browseId,
int rowIndex)
Inform server about current row in the browse.
|
void |
setDynamicFiltering(int browseId,
int[] columnOrdinals,
BaseDataType[] values)
Set dynamic filtering for the browse.
|
void |
setDynamicSorting(int browseId,
int[] columnOrdinals,
boolean[] ascending)
Set dynamic sorting for the browse.
|
void |
setThemePreferredFonts(java.util.Map<java.lang.String,java.lang.String> themeFonts,
java.util.Map<java.lang.String,java.lang.String> themeFontAliases)
Set the theme preferred fonts.
|
void |
sortTreeList(int widgetId,
int index,
boolean resetSorting)
Sorts a tree list widget by a column.
|
long |
subscribeExternal(boolean global,
java.lang.Long subscriber,
java.lang.String event,
java.lang.Long publisher,
boolean noError)
Create a new subscription to the given event for a specified external resource.
|
ServerReturnValue |
trigger(int triggerId,
int eventId,
int sourceId,
int otherId,
long resourceId,
int matchedWidgetId,
int rowSourceId,
ScreenBuffer[] sb)
Signals a trigger to the application.
|
void |
unsubscribeExternal(boolean global,
java.lang.Long subscriber,
java.lang.String event,
java.lang.Long publisher)
Delete a subscription to the given event for the specified external resource.
|
void |
updateRow(int browseId,
int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
Updates selected cells in the given row.
|
ValidationResult |
validate(int sourceId,
ScreenBuffer[] sb)
Signals a validation event to the application.
|
boolean |
validResource(long id)
Check if the resource with the given id is still valid to be used in a WAIT-FOR statement.
|
ServerReturnValue invokeServerEvent(int id)
ServerEvent.invoke(int).id - The id of the server event.boolean validResource(long id)
false if:
false.trueid - The resource id.java.lang.Long getResourceIdByWidgetId(int widgetId)
widgetId - The widget id.ServerReturnValue trigger(int triggerId, int eventId, int sourceId, int otherId, long resourceId, int matchedWidgetId, int rowSourceId, ScreenBuffer[] sb)
triggerId - The trigger to be called.eventId - The event which was generated.sourceId - The widget which generated the event.otherId - The companion widget id (for ENTER/LEAVE).resourceId - The resource which generated the event.matchedWidgetId - Id of the widget that actually matched the trigger.rowSourceId - Id of the WIDGET-ENTER/WIDGET-LEAVE widget
for a ROW-ENTRY/ROW-LEAVE event.sb - The editable frames ScreenBuffer arrayScreenBuffer
representing the latest screen values of all widgets and the
consume flag.ValidationResult validate(int sourceId, ScreenBuffer[] sb)
This signal is used to trigger validation execution on the server.
sourceId - widget ID of the widget generated the trigger.sb - The ScreenBuffer array for current and other editable buffers.ValidationResult representing the validation
result, error message and screen value changes.void help(int lastKey,
ScreenBuffer[] buffer)
lastKey - The most recent key event codebuffer - The screen buffer array associated with the FOCUS as before HELP is invoked and
other editable frames.ScreenBuffer[] refresh(int frameId)
frameId - The frame for which the screen buffer should be returned.ScreenBuffer array representing the current screen
values of all widgets in the given frame and other editable frames.WidgetConfig[] getEditorsConfigs(int browseId)
browseId - ID of the browse which should handle the request.null if the column is not
editable. Return value is null if the browse is read-only.int getRowCount(int browseId)
browseId - ID of the browse which should handle the request.int getRowCount(int browseId,
int startRow)
browseId - ID of the browse which should handle the request.startRow - Initial row to start count rows from.BrowseRow[] getRows(int browseId, int startRowIndex, int count, boolean forward, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
browseId - ID of the browse which should handle the request.startRowIndex - Index of the first row to retrieve (0-based).count - Maximum count of rows to return. -1 for no limit.forward - true if rows are retrieved in the forward direction,
false if rows are retrieved in the backward direction,rowDisplayTriggerId - Trigger ID of the ROW-DISPLAY trigger. -1 if there is no ROW-DISPLAY
trigger for this browse.sb - Screen buffer for the ROW-DISPLAY trigger. null if there is no
ROW-DISPLAY trigger for this browse.displayStrategy - Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null is returned.BrowseRow[] getRows(int browseId, char searchChar, int searchColumn, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb)
browseId - ID of the browse which should handle the request.searchChar - Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null for
non-search mode.searchColumn - For search mode: 0-based index of the column to be searched.viewportTopRow - For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow - For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId - Trigger ID of the ROW-DISPLAY trigger. -1 if there is no ROW-DISPLAY
trigger for this browse.sb - Screen buffer for the ROW-DISPLAY trigger. null if there is no
ROW-DISPLAY trigger for this browse.null is returned.void updateRow(int browseId,
int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
throws DataValidationException
browseId - ID of the browse which should handle the request.rowIndex - Index of the row to update.cellIndices - Cells for update indexes.cellValues - Cells for update new values.onlyNotifyRowReleased - Only notify server that the row has been released. Data is not updated.DataValidationException - New values don't passed database validation rules.int setCurrentRow(int browseId,
int rowIndex)
browseId - ID of the browse which should handle the request.rowIndex - 0-based index of the current row.int getCurrentRow(int browseId)
browseId - ID of the browse which should handle the request.boolean isRowAvailable(int browseId,
int rowIndex)
browseId - ID of the browse which should handle the request.rowIndex - 0-base index of the target row in the browse model.true if the row is "available", i.e. it is not deleted.boolean runReport(int browseId,
java.lang.String outputFileName,
MediaType outputFormat,
ScreenBuffer[] sb)
browseId - ID of the browse which should handle the request.outputFileName - Name of the output file.outputFormat - Format of the output format.sb - The screen buffer array data.true on success.EnhancedBrowseSaveTarget[] getEnhancedBrowseSaveTargets(int browseId)
browseId - ID of the browse which should handle the request.java.lang.String[] getColumnFiltersMappedDataTypes(int browseId)
DB-FILTER-FIELD-MAPPING.
They are used in column filters. E.g. if a column has DB-FILTER-FIELD-MAPPING set to
"some-table.some-date-field", data type from this column would be "date".browseId - ID of the browse which should handle the request.DB-FILTER-FIELD-MAPPING set, corresponding array element is null.EnhancedBrowseSaveTarget[] getEnhancedBrowseResetTargets(int browseId)
browseId - ID of the browse which should handle the request.EhBrowseConfigKey resetEnhancedConfig(int browseId, EnhancedBrowseSaveTarget resetTarget)
browseId - ID of the browse which should handle the request.resetTarget - Defines the level at which the configuration will be reset.null if there is
no configuration at this level.boolean applyEnhancedConfig(int browseId,
EnhancedBrowseConfig config)
browseId - ID of the browse which should handle the request.config - Enhanced browse configuration to apply.true on success.EnhancedBrowseConfig saveOrCacheEnhancedConfig(int browseId, EnhancedBrowseSaveTarget saveTarget)
browseId - ID of the browse which should handle the request.saveTarget - Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").null on error.void moveColumnServer(int browseId,
int src,
int dest)
Repositions a column in the browse widget.
browseId - ID of the browse which should handle the request.src - 0-based position of the column to be moved (column ordinal).dest - 0-based position to which the column is moved (column ordinal).void notifyBrowseLayoutPerformed(int browseId)
browseId - ID of the browse which should handle the request.int readResponseEvent(long resourceId)
resourceId - The resource ID for the socket to which the READ-RESPONSE event belongs.-1 if a event could not be
posted (i.e. the resource is not SENSITIVE).int connectEvent(long resourceId,
long clientSocketId)
resourceId - The resource ID for the server socket to which the CONNECT event belongs.clientSocketId - The resource ID of the socket created for the new connected accepted by the
server socket.-1 if a event could not be
posted (i.e. the resource is not SENSITIVE).long createSocket(int id)
LowLevelSocketImpl instance.id - The ID of the associated LowLevelSocketImpl instance.SocketImpl resource.java.lang.String getRequiredTheme()
null if it
isn't configured or isn't a valid class / short name (for built-in themes).java.util.List<ThemeOption> getThemes()
null if "theme/name" is configured with a valid theme.boolean isOldBrowseSelectionBar()
true if the selected browse row is drawn in the "old" mode, which is drawing it
opaque using the highlight colors, rather than drawing it translucent.int[] getUploadFileSizeLimits()
int getGuiSubMenuDelay(int defaultDelay)
defaultDelay - The default value to be used if the current value is nod configured on server
side directory config file.boolean getForceDialogsInCenter(boolean defaultValue)
defaultValue - The default value to be used if the current value is not configured on server
side directory config file.boolean isBypassDefaultWindowShowInPauseNoMessage(boolean defaultValue)
defaultValue - The default value to be used if the current value is not configured on server
side directory config file.FontDetails<?>[] readSystemFontTable()
FontDetails<?>[] readFontTable()
void setThemePreferredFonts(java.util.Map<java.lang.String,java.lang.String> themeFonts,
java.util.Map<java.lang.String,java.lang.String> themeFontAliases)
themeFonts - The fonts the current installed Theme on client prefers.themeFontAliases - The font aliases currently installed Theme on client prefers.FontDetails<?>[] readDefaultFonts(boolean useIni)
useIni - true to load the default fonts from the ini file specified for the client.
false to load the default fonts from the directory.KeyboardLayoutsSettings getKeyboardLayoutsSettings()
java.lang.Integer getHTMLBrowserLoadTimeout()
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSupportedHelperApplications()
int[] getLegacyTextMetrics(java.lang.String text,
java.lang.String key)
text - The text.key - The font's key.java.util.Map<java.lang.String,int[]> readLegacyTextMetrics()
ColorTable.EnvironmentColorTable readColorTable(java.lang.String envName)
envName - Environment name. Could be null if is default environment.ColorTableEntry[] readSystemColorTable()
byte[] loadEnvironment(java.lang.String env)
env - The INI file source.null if the environment file could not be
loaded.boolean getSessionTooltips()
true if tooltips are available for this session
false otherwise.void refreshBuffers(ScreenBuffer[] buff)
buff - The screen buffer array data to be refreshed. May be null.java.lang.String[] getProgressStackTrace()
ServerReturnValue invoke(InvocationRequestPayload request)
request - The details about the request.ServerReturnValue invokeProcedure(java.lang.String procedure, java.lang.Object... params)
procedure - The procedure name.params - The parameters.ServerReturnValue invokeInProcedure(java.lang.String procedure, java.lang.String inProcHandle, java.lang.Object... params)
procedure - The internal procedure name.inProcHandle - the parent procedure handle converted with handle.toString()params - The parameters.void deleteHandle(long handleId,
boolean noError)
handleId - The handle ID of the resource.noError - true to process using silent error mode.long subscribeExternal(boolean global,
java.lang.Long subscriber,
java.lang.String event,
java.lang.Long publisher,
boolean noError)
global - Flag indicating if the subscription is for global (cross-session) events.subscriber - The resource to notify when the specified event is published. If null,
a ExternalResource will be built and its ID return.event - The name of the event which is being published.publisher - The handle representing the program or resource that is the source of the event.
If specified, the named event will only cause a notification if the event source
matches this handle. null represents the ANYWHERE option
which means that the events will not be filtered by source.noError - true to process using silent error mode.void unsubscribeExternal(boolean global,
java.lang.Long subscriber,
java.lang.String event,
java.lang.Long publisher)
All processing is done with silent error mode implicitly enabled.
global - Flag indicating if the search is done in the global (cross-session) event register.subscriber - The resource whose subscription is to be deleted. Must not be null.event - The name of the event which is being published. If this is null, then
subscriptions to all events will be deleted.publisher - The procedure or resource handle representing the source of the event.
If specified, the subscription will only be deleted if the event source matches
this handle. null represents the ALL option which means
that the events will not be filtered by source. When null, it means
that the publisher was not set.void publishExternal(java.lang.String event,
long publisher,
java.lang.String[] args)
All processing is done with silent error mode implicitly enabled.
The subscriptions are fired in the order they were subscribed. Although 4GL documentation specifically states, that "If a named event has multiple subscribers, the order in which the AVM notifies subscribers is undefined.", the actual 4GL implementation (OpenEdge 10.2B) does fire the events in the order the subscriptions get subscribed.
event - The name of the event which is being published.publisher - The procedure or resource handle representing the program that is the source of
the event. Must not be null.args - The parameters passed to the subscriber. May be null to represent no
parameters. When null, it means that no parameters were specified for
this call.long createExternal()
void resetWaitState()
LogicalTerminal.setWaitState(String).
This method should not be called from the server.
The purpose of the method is to provide a callback mechanism for the client when wait-state is reset due to UI flow (i.e. when a modal window is shown). This is also the reason the method doesn't perform a down-call to the client.
void openHyperlink(int columnWidgetId,
java.lang.String hyperlinkText)
hyperlinkText is used as the
event parameter. I.e. opening of a hyperlink is an equivalent of
PUBLISH eventName (hyperlinkText).
columnWidgetId - ID of the target browse column widget.hyperlinkText - Text of the hyperlink to be opened.void setDynamicSorting(int browseId,
int[] columnOrdinals,
boolean[] ascending)
browseId - ID of the browse which should handle the request.columnOrdinals - Array of the ordinals of the sort columns. Inside the array ordinals are positioned
from the column which defines the most coarse sorting to the most granular.ascending - Array of the sorting directions of the sort columns. true for ascending,
false for descending. Inside the array directions are positioned
from the column which defines the most coarse sorting to the most granular.void setDynamicFiltering(int browseId,
int[] columnOrdinals,
BaseDataType[] values)
browseId - ID of the browse which should handle the request.columnOrdinals - Array of the ordinals of the filtered columns.values - Array of the filter values for the filtered columns..void messageBlasterEvent(long id,
int msgVal,
int wParam,
int lParam,
int lplRetVal)
MessageBlaster notification back to server.id - The id of the MessageBlaster instance.msgVal - The message id. Should be one already added to msgList.wParam - Message parameter 1.lParam - Message parameter 2.lplRetVal - Message parameter / return value.java.util.Map<java.lang.String,java.net.URI> readHtmlBrowserWhitelist()
void setClientMetrics(ClientMetrics metrics)
metrics - The metrics instance.java.util.Map<java.lang.String,byte[]> getCustomFontData()
<lower-cased font name>#true, otherwise the key has the form
<lower-cased font name>#false. The caller must not modify the byte
array map values.ServerReturnValue emitComEvent(int widgetId, java.lang.String eventName, BaseDataType... args)
widgetId - Id of the widget that will become the source of the emitted event.eventName - Event name.args - Event arguments.void requestNodeExpand(int treeWidgetId,
int nodeId,
boolean expand,
boolean allChildren)
treeWidgetId - the tree widget ID.nodeId - the node ID.expand - the new expansion status.allChildren - all child nodes to be involved or direct childs only.void forkNewSession()
void sortTreeList(int widgetId,
int index,
boolean resetSorting)
widgetId - the ID of the tree listindex - the index of the column being sortedresetSorting - if true, then reset column sortingvoid endSpreadsheetBatch(int contextId)
contextId - the ID of the spreadsheet web app context to end the batch for