Package com.ebasetech.xi.api
Interface Gateway
- All Superinterfaces:
java.io.Serializable
public interface Gateway
extends java.io.Serializable
The
Gateway
interface represents Gateway Server functions. This is the root object
It provides methods to invoke forms on a remote system using the Gateway Server JWE (JSON Web Encryption) token that contains the users credentials.
It also provides REST functions that use also set the HTTP Authorization request header using a Gateway token.- Since:
- V5.7
-
Method Summary
Modifier and Type Method Description GatewayRemoteServer[]
getRemoteServers()
Returns a list of remote servers configurations available for the Gateway Server to call using the methodcallForm(String, String)
TheGatewayRemoteServer
contains the configuration information regarding the remote server that the Gateway Server can callGatewayRestServices
getRest()
Returns the REST services that supports REST based operations to the Gateway Server.void
gotoForm(java.lang.String remoteServer, java.lang.String formName)
Calls the form with the specified name and displays any resulting HTML page to the user.void
gotoForm(java.lang.String remoteServer, java.lang.String formName, java.util.Map<java.lang.String,java.lang.Object> parameters)
Transfers control to the form with the specified name from the Gateway Server to a specified remote server configured on the Server Admin Application.boolean
isGatewayServer()
Returns true if the licence supports the feature: Gateway Server, otherwise false.boolean
isGatewayUser()
Returns true if the user has logged onto the system via the Gateway Server otherwise false
-
Method Details
-
isGatewayServer
boolean isGatewayServer()Returns true if the licence supports the feature: Gateway Server, otherwise false. -
gotoForm
void gotoForm(java.lang.String remoteServer, java.lang.String formName, java.util.Map<java.lang.String,java.lang.Object> parameters)Transfers control to the form with the specified name from the Gateway Server to a specified remote server configured on the Server Admin Application. This function terminates execution of the current form and commits the current transaction. Form memory is freed, and return to the current form is not possible by any method including the browser back button. Navigation back to the current form using the browser back button is not possible.Execution of this method immediately terminates the event currently being executed, no statements past this method call will be executed.
This method can only be called within the context of a web form event when running on the Gateway Server.
Parameters are passed to the target form via form fields. Any such fields must have the URL Parameter property set in the called form. When passing a form field value from the calling form, the field's
stringValue
property should be used (see examples below).Javascript example: Note: In form ORDER_DISPLAY, fields ORDER_ID, CUSTOMER_ID and CREDIT_LIMIT have property URL Parameter set.
var parms = {}; parms.ORDER_ID = fields.ORDER.stringValue; parms.CUSTOMER_ID = fields.CUSTOMER.stringValue; parms.CREDIT_LIMIT = 9999; gateway.gotoForm("server1", "ORDER_DISPLAY", parms);
- Parameters:
remoteServer
- references the name of the remote server configured on the Server Admin AppformName
- the name of the target formparameters
- a Map of key/value pairs where key is a field name in the target form and value is the corresponding value. Null can be specified to indicate that there are no parameters. In Javascript, an Object can be used where key is a field name and value is the corresponding value. See example above.- Since:
- V5.7
- See Also:
gotoForm(String, String)
-
gotoForm
void gotoForm(java.lang.String remoteServer, java.lang.String formName)Calls the form with the specified name and displays any resulting HTML page to the user. This is equivalent to calling methodcallForm(remoteServer, formName, null)
.- Parameters:
remoteServer
- references the name of the remote server configured on the Server Admin AppformName
- the name of the target form to be called- Since:
- V5.7
- See Also:
gotoForm(String, String, Map)
-
getRemoteServers
GatewayRemoteServer[] getRemoteServers()Returns a list of remote servers configurations available for the Gateway Server to call using the methodcallForm(String, String)
TheGatewayRemoteServer
contains the configuration information regarding the remote server that the Gateway Server can call- Since:
- V5.7
- See Also:
GatewayRemoteServer
-
getRest
GatewayRestServices getRest()Returns the REST services that supports REST based operations to the Gateway Server. The REST service calls automatically add theAuthorization
HTTP header to every HTTP request.- Since:
- V5.7
- See Also:
GatewayRestServices
-
isGatewayUser
boolean isGatewayUser()Returns true if the user has logged onto the system via the Gateway Server otherwise false- Since:
- 5.7
-