Package com.saperion.ngc.scripthelper
Class ScriptHelper
- java.lang.Object
- 
- com.saperion.ngc.scripthelper.ScriptHelper
 
- 
 public final class ScriptHelper extends java.lang.ObjectProvides static helper methods to be used in server-side scripts in masks.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static com.saperion.connector.SaClassicConnectorgetClassicConnector()Provides an instance of theSaClassicConnector.static UsergetCurrentUser()Provides the current logged in user object.static IntelligentFieldgetFieldByName(IntelligentFormView form, java.lang.String name)Returns the field with the specified name or null, if no field was found.static voidlogDebug(java.lang.String message)Logs a debug-message in the logfile.static voidlogError(java.lang.String message)Logs an error-message in the logfile.static voidlogInfo(java.lang.String message)Logs an info-message in the logfile.static voidlogWarning(java.lang.String message)Logs a warning-message in the logfile.static java.util.List<com.saperion.intf.SaDocumentInfo>performQuery(java.lang.String query)Performs a query against the classic Connector.static voidpostQueryEvent(IntelligentFormView form)Posts a query event (onButton-event of type ON_QUERY) to the given form.static voidshowErrorMessage(java.lang.String error)Shows an error message box with the given message to the user.static voidshowInfoMessage(java.lang.String message)Shows an info message box with the given message to the user.
 
- 
- 
- 
Method Detail- 
getFieldByNamepublic static IntelligentField getFieldByName(IntelligentFormView form, java.lang.String name) Returns the field with the specified name or null, if no field was found.- Parameters:
- form- parent form
- name- field name
- Returns:
- field or null if not found
 
 - 
postQueryEventpublic static void postQueryEvent(IntelligentFormView form) Posts a query event (onButton-event of type ON_QUERY) to the given form.- Parameters:
- form- The IntelligentFormView the event should be post to.
 
 - 
getCurrentUserpublic static User getCurrentUser() Provides the current logged in user object.- Returns:
 
 - 
getClassicConnectorpublic static com.saperion.connector.SaClassicConnector getClassicConnector() Provides an instance of theSaClassicConnector.- Returns:
- an instance of the SaClassicConnector.
 
 - 
performQuerypublic static java.util.List<com.saperion.intf.SaDocumentInfo> performQuery(java.lang.String query) Performs a query against the classic Connector.- Parameters:
- query-
- Returns:
 
 - 
showInfoMessagepublic static void showInfoMessage(java.lang.String message) Shows an info message box with the given message to the user.- Parameters:
- message- The message to show.
 
 - 
showErrorMessagepublic static void showErrorMessage(java.lang.String error) Shows an error message box with the given message to the user.- Parameters:
- error- The message to show.
 
 - 
logErrorpublic static void logError(java.lang.String message) Logs an error-message in the logfile.- Parameters:
- message- the message
 
 - 
logWarningpublic static void logWarning(java.lang.String message) Logs a warning-message in the logfile.- Parameters:
- message- the message
 
 - 
logInfopublic static void logInfo(java.lang.String message) Logs an info-message in the logfile.- Parameters:
- message- the message
 
 - 
logDebugpublic static void logDebug(java.lang.String message) Logs a debug-message in the logfile.- Parameters:
- message- the message
 
 
- 
 
-