### substringKeyMap Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/util/DataTools Constructs a Map of key/value pairs from a source Map whose keys start with a specific prefix. ```APIDOC ## substringKeyMap ### Description Constructs a `Map` of key/value pairs from the source `Map` whose keys start with a specific prefix. ### Method static Map ### Endpoint N/A (Utility method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **prefix** (String) - The prefix to match. - **source** (Map) - The source map. ### Request Example ```json { "prefix": "user_", "source": { "user_id": 123, "user_name": "test", "other_key": "value" } } ``` ### Response #### Success Response (200) - **Map** (Map) - A new map containing entries whose keys start with the specified prefix. #### Response Example ```json { "example": { "user_id": 123, "user_name": "test" } } ``` ``` -------------------------------- ### DSField: Get Join DataSource Name Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DSField For many-to-many relation fields, returns the name of the join DataSource. This is the intermediate dataSource used to link two other DataSources in a many-to-many setup. ```java public String getJoinDSName() For a `many-to-many` Relation Field only, returns the name of the join DataSource - ie the third dataSource "in the middle" of the relationship. ``` -------------------------------- ### ProjectLoadSettings Methods Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Methods for configuring project loading settings. ```APIDOC ## ProjectLoadSettings Methods ### Description Methods for specifying which screens to load within a project. ### `setScreenNames(List)` * **Method**: `setScreenNames` * **Class**: `com.isomorphic.xml.ProjectLoadSettings` * **Description**: Sets the screen names to load. * **Parameters**: * `screenNames` (List) - A list of screen names to be loaded. ``` -------------------------------- ### ChromeDriver Creation Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/webdriver/SmartClientChromeDriver This section details how to create a new ChromeDriver instance. The provided service will be automatically started and shut down with the driver's lifecycle. ```APIDOC ## POST /newSession ### Description Creates a new ChromeDriver instance. The `service` will be started along with the driver, and shutdown upon calling `SmartClientWebDriver.quit()`. ### Method POST ### Endpoint /newSession ### Parameters #### Query Parameters - **service** (ChromeDriverService) - Required - The service to use for the ChromeDriver. - **capabilities** (DesiredCapabilities) - Optional - The capabilities required from the ChromeDriver. ### Request Example ```json { "service": { "class": "org.openqa.selenium.chrome.ChromeDriverService", "arguments": [ "--port=9515" ] }, "capabilities": { "browserName": "chrome", "version": "", "platform": "ANY", "javascriptEnabled": true } } ``` ### Response #### Success Response (200) - **sessionId** (string) - The unique identifier for the new session. - **status** (integer) - The status code of the operation (0 for success). - **value** (object) - The capabilities of the created session. #### Response Example ```json { "sessionId": "some-session-id", "status": 0, "value": { "browserName": "chrome", "version": "114.0.5735.199", "platform": "windows", "javascriptEnabled": true } } ``` ``` -------------------------------- ### ResponseDataWrapper - get(String propertyName) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/velocity/ResponseDataWrapper Retrieves a property value from the response data. If the data is a single object, it gets the property directly. If it's a list or array, it attempts to get the property from the first entry. ```APIDOC ## GET /websites/smartclient_smartgwtee-15_0_server_javadoc/responseDataWrapper/get(String propertyName) ### Description Retrieves a property value from the response data. This method is designed to work with single objects or collections of objects within the response. ### Method GET ### Endpoint `/websites/smartclient_smartgwtee-15_0_server_javadoc/responseDataWrapper/get(String propertyName)` ### Parameters #### Path Parameters - **propertyName** (String) - Required - The name of the property to retrieve. #### Query Parameters None #### Request Body None ### Request Example ```json { "example": "No request body for this method." } ``` ### Response #### Success Response (200) - **Object** (Object) - The value of the requested property. #### Response Example ```json { "example": "response data value" } ``` ### Throws - **Exception** - If an error occurs during property retrieval. ``` -------------------------------- ### Configuring SmartClient Init Servlet in web.xml Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/base/Config This snippet shows the XML configuration for a servlet that initializes SmartClient's configuration. The `load-on-startup` tag is essential to ensure the servlet initializes before other components that might access the configuration. A value of '2' is recommended to ensure it runs after the core SmartClient init servlet. ```xml MyConfigChanges com.company.servlet.MyConfigChanges 2 ``` -------------------------------- ### getTransaction Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/hibernate/HB Retrieves or starts a Hibernate Transaction. Supports starting locally or joining an existing transaction. ```APIDOC ## getTransaction ### Description Retrieves a started Hibernate `Transaction` for persistence operations. Can be used with or without a configuration name. ### Method `public static org.hibernate.Transaction getTransaction(org.hibernate.Session session)` `public static org.hibernate.Transaction getTransaction(String configName, org.hibernate.Session session)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Using default configuration org.hibernate.Transaction tx = HibernateUtil.getTransaction(session); // Using specific configuration org.hibernate.Transaction tx = HibernateUtil.getTransaction("myConfig", session); ``` ### Response #### Success Response (200) - **Transaction** (org.hibernate.Transaction) - An already started transaction for persistence operations. #### Response Example ```java // Returns a Transaction object ``` ### Throws - **org.hibernate.HibernateException** - If unable to acquire or open transaction. ``` -------------------------------- ### Configuration and Filters Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Details on configuration classes and filters, including compression settings. ```APIDOC ## Configuration and Filters This section provides information on configuration classes and filters within the SmartClient framework. ### `Config` Class **Description**: Provides configuration parameters to all Java classes in the SmartClient Framework by reading a series of .properties files, including `server.properties`. **Class**: `com.isomorphic.base.Config` ### `CompressionFilter` Class **Description**: An optional filter from the Network Performance package that handles content compression. **Class**: `com.isomorphic.servlet.CompressionFilter` #### `compressableMimeTypes` Variable **Description**: A comma-separated list of MIME types that are compressable. **Variable**: `com.isomorphic.servlet.CompressionFilter.compressableMimeTypes` #### `compressThreshold` Variable **Description**: The minimum size (in bytes) of the dynamically captured buffer for compression to take effect. **Variable**: `com.isomorphic.servlet.CompressionFilter.compressThreshold` ### Configuration Properties for DataSources #### `configFile` Variable **Description**: Sets the configuration file for a servlet instance. **Variable**: `com.isomorphic.servlet.FileAssembly.configFile` #### `configName` Variable **Description**: Holds the configuration name, which can be set with the 'jpaConfig' parameter. **Variables**: - `com.isomorphic.hibernate.HibernateDataSource.configName` - `com.isomorphic.jpa.JPADataSource.configName` ### Hibernate and JPA Configuration Specifics #### `CONFIG` Constant **Description**: Name of the sub-property for the Hibernate configuration file. **Constant**: `com.isomorphic.hibernate.HB6Provider.CONFIG` #### `CONFIG_BEAN` Constant **Description**: Name of the sub-property for the Spring bean name for Hibernate configuration. **Constant**: `com.isomorphic.hibernate.SpringHB6Provider.CONFIG_BEAN` #### `CONFIG_LOOKUP_STYLE` Constant **Description**: Name of the sub-property for the Hibernate configuration lookup style. **Constant**: `com.isomorphic.hibernate.HB.CONFIG_LOOKUP_STYLE` #### `configBean` Variable **Description**: Holds the Spring bean name. **Variable**: `com.isomorphic.hibernate.SpringHB6Provider.configBean` #### `configuration` Variable **Description**: Holds the `Configuration` object. **Variables**: - `com.isomorphic.hibernate.HB6Provider.configuration` - `com.isomorphic.hibernate.SpringHB6Provider.configuration` #### `connectionHolder` Variable **Description**: Holds connection information for Automatic Transactions. **Variable**: `com.isomorphic.jpa.JPADataSource.connectionHolder` ``` -------------------------------- ### Project Load Settings API Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/xml/ProjectLoadSettings This section details the methods available for configuring project loading settings. ```APIDOC ## ProjectLoadSettings API ### Description This API provides methods to configure and retrieve settings for loading projects, such as specifying which screens to load and whether to use mock mode for data sources. ### Method Summary - **`getMockMode()`** - Returns the mockMode setting. - **`getScreenNames()`** - Returns the names of the screens to load. - **`setCurrentScreenName(String currentScreenName)`** - Sets the currentScreenName. - **`setMockMode(Boolean mockMode)`** - Sets the mockMode. - **`setScreenNames(List screenNames)`** - Sets the screen names to load. ### Method Details #### `setCurrentScreenName` ##### Description Sets the currentScreenName. ##### Method `void` ##### Endpoint N/A (Instance Method) ##### Parameters - **`currentScreenName`** (String) - Description: the name of the screen to show after loading project #### `setScreenNames` ##### Description Sets the screen names to load. ##### Method `void` ##### Endpoint N/A (Instance Method) ##### Parameters - **`screenNames`** (List) - Description: the names of the screens to load #### `getScreenNames` ##### Description Returns the names of the screens to load. ##### Method `List` ##### Endpoint N/A (Instance Method) ##### Returns - **`List`** - Description: the names of the screens #### `setMockMode` ##### Description Sets the mockMode. ##### Method `void` ##### Endpoint N/A (Instance Method) ##### Parameters - **`mockMode`** (Boolean) - Description: true to load referenced DataSources in mock mode #### `getMockMode` ##### Description Returns the mockMode setting. ##### Method `Boolean` ##### Endpoint N/A (Instance Method) ##### Returns - **`Boolean`** - Description: the mockMode value ``` -------------------------------- ### Get Transaction Object Helper (Java) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DataSource A static helper method to retrieve connection or transaction objects for specific data source implementations. It is used for SQLDataSource to get a Connection and for HibernateDataSource to get a Transaction and Session. Returns null if the object is not found. ```java public static Object getTransactionObject(DSRequest req, String transactionObjectKey, String shortTransactionObjectKey) throws Exception ``` -------------------------------- ### HibernateDataSource Transaction/Session Example (Java) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DataSource Example of how to retrieve a Hibernate Transaction and Session object using the getTransactionObject helper method with HibernateDataSource. ```java Transaction tx = DataSource.getTransactionObject(req, HibernateTransaction.TRANSACTION_ATTR); Session session = HibernateTransaction.getTransactionSession(tx); ``` -------------------------------- ### SmartClientEdgeDriver Constructors Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/webdriver/SmartClientEdgeDriver Details the various constructors available for initializing a SmartClientEdgeDriver instance. ```APIDOC ## SmartClientEdgeDriver Constructors ### Description Provides different ways to instantiate the `SmartClientEdgeDriver`. ### Method `SmartClientEdgeDriver` ### Endpoints N/A (Constructors) ### Parameters #### `SmartClientEdgeDriver()` - **Description**: Default constructor. #### `SmartClientEdgeDriver(EdgeOptions options)` - **Description**: Constructor taking a set of configuration options. - **Parameters**: - `options` (EdgeOptions) - Required - Custom options for the Edge driver. #### `SmartClientEdgeDriver(EdgeDriverService service)` - **Description**: Creates a new `SmartClientEdgeDriver` instance. The `service` will be started along with the driver and shut down upon calling `SmartClientWebDriver.quit()`. - **Parameters**: - `service` (EdgeDriverService) - Required - The service to use. #### `SmartClientEdgeDriver(EdgeDriverService service, EdgeOptions options)` - **Description**: Constructor taking a set of configuration options. The `service` will be started along with the driver and shut down upon calling `SmartClientWebDriver.quit()`. - **Parameters**: - `service` (EdgeDriverService) - Required - The service to use. - `options` (EdgeOptions) - Required - Custom options for the Edge driver. ### Request Example ```java // Example for SmartClientEdgeDriver(EdgeOptions options) EdgeOptions options = new EdgeOptions(); SmartClientEdgeDriver driver = new SmartClientEdgeDriver(options); // Example for SmartClientEdgeDriver(EdgeDriverService service) EdgeDriverService service = new EdgeDriverService.Builder().build(); SmartClientEdgeDriver driver = new SmartClientEdgeDriver(service); // Example for SmartClientEdgeDriver(EdgeDriverService service, EdgeOptions options) EdgeDriverService service = new EdgeDriverService.Builder().build(); EdgeOptions options = new EdgeOptions(); SmartClientEdgeDriver driver = new SmartClientEdgeDriver(service, options); ``` ### Response #### Success Response (Constructor) - Initializes a `SmartClientEdgeDriver` object. #### Response Example ```json // No direct JSON response for constructor calls. // Successful initialization results in a driver object. ``` ``` -------------------------------- ### SQLDataSource Connection Example (Java) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DataSource Example of how to retrieve a java.sql.Connection object for a specific database using the getTransactionObject helper method with SQLDataSource. ```java Connection conn = DataSource.getTransactionObject(req, SQLTransaction.CONNECTION_ATTR + dbName); ``` -------------------------------- ### Class Loading and Proxy Handling Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/util/DataTools Utilities for loading classes and handling proxy objects. ```APIDOC ## getCachedClass ### Description Retrieves a loaded `Class` object for a given class name. If the class is already cached, it's returned directly; otherwise, it's loaded and cached. Returns `null` if the class cannot be loaded. ### Method `public static Class getCachedClass(String className)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "className": "com.example.MyClass" } ``` ### Response #### Success Response (200) - **Class** - The loaded `Class` object, or `null` if not found. #### Response Example ```json { "classObject": "com.example.MyClass" } ``` --- ## getRealClass ### Description Checks if a given bean is a proxy object (specifically Hibernate proxies) and returns its real `Class`. If the bean is not a proxy, it returns the bean's actual class. ### Method `public static Class getRealClass(Object bean)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "bean": "someObject" } ``` ### Response #### Success Response (200) - **Class** - The real `Class` of the bean. #### Response Example ```json { "realClass": "com.example.MyClass" } ``` ``` -------------------------------- ### BatchUpload Custom DMI Example (Java) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/tools/BatchUpload Example demonstrating how to use `parseUploadData` and `validateUploadData` within a custom DMI for `batchUpload`. This allows for pre-validation data manipulation before the data is processed by the BatchUploader UI. Access to uploaded file streams and data source names is shown. ```java public DSResponse batchUpload(DSRequest dsRequest) throws Exception { BatchUpload batchUpload = new BatchUpload(); // parse data and get the result Map DSResponse response = batchUpload.parseUploadData(dsRequest); Map respData = response.getDataMap(); // do not proceed to validation if parsing failed if (respData.containsKey("errorMessage")) return response; // get dataSource name Map values = dsRequest.getValues(); String dataSourceName = (String) values.get("dsName"); // get upload data List uploadData = (List) respData.get("gridRows"); // perform data manipulations ... // validate data and return return batchUpload.validateUploadData(response); } ``` -------------------------------- ### Config Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/allclasses-index Provides configuration parameters from properties files. ```APIDOC ## Config ### Description This class provides config parameters to all the Java classes in the SmartClient Framework by reading a series of .properties files including server.properties. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Initialize SmartClient with ServletContext in Java Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/base/Init This Java method demonstrates an alternative way to initialize the Isomorphic SmartClient server-side component without registering the Init servlet in web.xml. By calling the static go() method with a ServletContext object, you can provide the necessary webRoot information. This is useful if direct web.xml modification is not feasible, for instance, by obtaining the context from a JSP, Servlet, or Filter. ```java public static void go(jakarta.servlet.ServletContext context, boolean skipLogInit) ``` -------------------------------- ### Manual Transaction Handling Example - Java Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/jpa/JPADataSource Demonstrates executing a data source fetch operation with manual transaction management. This example shows how to set the DataSource to postpone resource release, execute a fetch, traverse the returned data, and then manually commit the transaction and release resources. ```java DSRequest req = new DSRequest("myDS", "fetch"); req.setFreeOnExecute(false); DSResponse resp = req.execute(); List dataList = resp.getDataList(); //... traverse through persistent object tree // Commit current transaction. ((JPADataSource) r.getDataSource()).onSuccess(); // Release entity manager. ((JPADataSource) r.getDataSource()).freeResources(req); ``` -------------------------------- ### SimpleCriteria Constructor Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/criteria/SimpleCriteria Initializes a SimpleCriteria object with key-value pairs. ```APIDOC ## Constructor Summary ### `SimpleCriteria(Map map)` - **Description**: Constructs criteria using key-value pairs. - **Parameters**: - `map` (Map) - A map of key-value pairs. ``` -------------------------------- ### Attribute Management Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DSRequest Methods for getting and setting attributes within the DSRequest. ```APIDOC ## GET /getAttribute ### Description Returns an Object that has previously been stored in this `DSRequest`'s attribute map. This method intentionally mirrors the method of the same name available on `HttpServletRequest`, and is provided as an alternative way to add objects to a `DSRequest` without introducing a dependency on the Servlet API. ### Method GET ### Endpoint /getAttribute ### Parameters #### Query Parameters - **key** (String) - Required - The key of the object in the `DSRequest`'s attribute map. ### Response #### Success Response (200) - **Object** - The Object associated with the parameter key. ### Response Example ```json { "status": 200, "data": { /* The retrieved object */ } } ``` See Also: - `RPCManager.getAttribute(String)` --- ## GET /getAttributeNames ### Description Returns an Iterator that can be used to obtain all the keys in the `DSRequest`'s attribute map. This method intentionally mirrors the method of the same name available on `HttpServletRequest` (though it returns an Iterator rather than an Enumeration), and is provided as an alternative way to add objects to a `DSRequest` without introducing a dependency on the Servlet API. ### Method GET ### Endpoint /getAttributeNames ### Response #### Success Response (200) - **Iterator** - An Iterator that can be used to obtain all the keys in the `DSRequest`'s attribute map. ### Response Example ```json { "status": 200, "data": ["key1", "key2", "key3"] } ``` See Also: - `RPCManager.getAttribute(String)` --- ## POST /setAttribute ### Description Sets an attribute in the `DSRequest`'s attribute map. ### Method POST ### Endpoint /setAttribute ### Parameters #### Query Parameters - **key** (String) - Required - The key for the attribute. - **value** (Object) - Required - The value of the attribute. ### Response #### Success Response (200) - **DSRequest** (object) - The modified DSRequest object, allowing for method chaining. ### Response Example ```json { "status": 200, "data": { /* DSRequest object details */ } } ``` ``` -------------------------------- ### DataTools Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/allclasses-index Utility class for getting and setting object properties as Maps. ```APIDOC ## DataTools ### Description `DataTools` is a utility class with the following facilities: `getProperties()` and `setProperties()`: `getProperties()` allow the properties of any Java object to be extracted as a Map, and `setProperties` allows any Map to be applied to a Java object, calling setter methods named after the keys of the Map. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Register Isomorphic Init Servlet in web.xml Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/base/Init This XML snippet demonstrates how to register the com.isomorphic.base.Init servlet in the web.xml file. It ensures the servlet loads on startup with priority 1, which is necessary for the SmartClient server-side componentry to correctly determine the webRoot directory. No servlet-mapping is required for this initialization-only servlet. ```xml Init com.isomorphic.base.Init 1 ``` -------------------------------- ### DSRequestAlreadyStartedException Exception Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/serialized-form Exception thrown when a DataSource request has already been started. ```APIDOC ## DSRequestAlreadyStartedException Exception ### Description Exception thrown when a DataSource request has already been started. ### Exception Class `com.isomorphic.datasource.DSRequestAlreadyStartedException` ### Inheritance `com.isomorphic.datasource.DSRequestAlreadyStartedException` extends `java.lang.Exception` ``` -------------------------------- ### DynamicScreenGenerator Registration Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/servlet/package-summary Allows registering `DynamicScreenGenerator`s with the SmartClient Server framework. ```APIDOC ## POST /ScreenLoaderServlet/addDynamicScreenGenerator ### Description Registers a `DynamicScreenGenerator` with the SmartClient Server framework. ### Method POST ### Endpoint /ScreenLoaderServlet/addDynamicScreenGenerator ### Parameters #### Request Body - **generator** (DynamicScreenGenerator) - Required - The `DynamicScreenGenerator` instance to register. ``` -------------------------------- ### Configure SmartClient InitListener in web.xml Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/base/InitListener This snippet shows how to register the InitListener as a ServletContextListener in the web.xml file. This listener is crucial for initializing the SmartClient Server framework at application startup, ensuring all necessary configurations are loaded before any framework functionality is invoked. It should ideally be the first listener registered to manage dependencies correctly, especially when exporting database connections. ```xml com.isomorphic.base.InitListener ``` -------------------------------- ### Criterion Value Retrieval Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Gets the value used for comparison within a Criterion. ```APIDOC ## GET /api/criteria/{criterionId}/value ### Description Gets the value used to compare to within a Criterion. ### Method GET ### Endpoint `/api/criteria/{criterionId}/value` ### Parameters #### Path Parameters - **criterionId** (string) - Required - The ID of the Criterion. ### Response #### Success Response (200) - **value** (any) - The value used for comparison. #### Response Example ```json { "value": "someValue" } ``` ``` -------------------------------- ### Get Operation Property Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DataSource Retrieves the value of a specified operationBinding element from a DSRequest. ```APIDOC ## getOperationProperty ### Description Returns the value of the specified operationBinding element as an Object. The operation in question is the one in use by the provided `DSRequest`. This is an operation level equivalent of the DataSource-level API, `getObjectProperty(String)`. Please read the docs for that API - all the notes also apply to this API. ### Method public static Object getOperationProperty(DSRequest request, String propertyName, Object defaultValue) throws Exception ### Parameters - `request` (DSRequest) - DSRequest that indicates the operation to use. - `propertyName` (String) - The name of the element(s). - `defaultValue` (Object) - A default value. ### Returns - The value of the specified property of the operation as an Object, or the default value if there is no operation, or the operation does not have such an element. ### Throws - `Exception` - if an error occurs while getting the property. ### See Also - `getObjectProperty(String)` ``` -------------------------------- ### DSRequest Constructors Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DSRequest Information about the different ways to instantiate a DSRequest object. ```APIDOC ## Constructors ### `DSRequest(String dataSourceName, String operationType, com.isomorphic.datasource.DSCacheManager dsCacheManager)` * **Description**: Creates an empty DSRequest bound to the named datasource with the specified operationType, and associated with the specified `DSCacheManager`. ### `DSRequest(String dataSourceName, String operationType, ValidationContext vc)` * **Description**: Creates an empty DSRequest bound to the named datasource with the specified operationType. ### `DSRequest(String dataSourceName, String operationType, RPCManager rpcManager)` * **Description**: Creates an empty DSRequest bound to the named datasource with the specified operationType, and associated with the specified `RPCManager`. ``` -------------------------------- ### ProjectLoadSettings Configuration Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Method for configuring project load settings, specifically mock mode. ```APIDOC ## `ProjectLoadSettings` Configuration ### Description Methods to configure settings related to loading project resources. ### Methods #### `setMockMode(Boolean)` - **Description**: Sets the `mockMode`. - **Parameters**: - `mockMode` (Boolean) - Required - Whether to enable mock mode. ``` -------------------------------- ### getLoggerRepository Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/util/DataTools Deprecated method to get the logger repository. Returns the Log4j2 LoggerContext. ```APIDOC ## getLoggerRepository ### Description Deprecated. Since Log4j 1.x is no longer directly supported, this returns the Log4j2 `LoggerContext` by calling the new `getLoggerContext()` API. ### Method `public static Object getLoggerRepository()` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example usage (conceptual, as this is a static method): Object loggerContext = YourClass.getLoggerRepository(); ``` ### Response #### Success Response (200) - **return value** (Object) - The Log4j2 `LoggerContext` instance. #### Response Example ```json // Returns a Log4j2 LoggerContext object representation {} ``` ``` -------------------------------- ### GET /api/getBeanFields Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/tools/BuiltinRPC Retrieves a list of fields from a specified Java bean class. ```APIDOC ## GET /api/getBeanFields ### Description Retrieves a list of fields from a specified Java bean class. ### Method GET ### Endpoint /api/getBeanFields ### Parameters #### Query Parameters - **className** (String) - Required - The fully qualified name of the Java bean class. ### Response #### Success Response (200) - **List** - A list of field objects, each containing field properties. #### Response Example ```json [ {"name": "firstName", "type": "String"}, {"name": "age", "type": "int"} ] ``` #### Error Response (500) - **error** (String) - A message describing the error. #### Response Example ```json { "error": "Failed to retrieve fields from bean class." } ``` ``` -------------------------------- ### SmartClientIEDriver Constructors Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/webdriver/SmartClientIEDriver This section details the various constructors available for initializing the SmartClientIEDriver. ```APIDOC ## SmartClientIEDriver Constructors ### Description Initializes a new instance of the `SmartClientIEDriver` class. ### Method `SmartClientIEDriver()` ### Description Default constructor. --- ### Method `SmartClientIEDriver(int port)` ### Description Deprecated. Use `SmartClientIEDriver(InternetExplorerOptions)` instead. --- ### Method `SmartClientIEDriver(org.openqa.selenium.Capabilities capabilities)` ### Description Deprecated. Use `SmartClientIEDriver(InternetExplorerOptions)` instead. --- ### Method `SmartClientIEDriver(org.openqa.selenium.ie.InternetExplorerDriverService service)` ### Description Creates a new SmartClientIEDriver instance. --- ### Method `SmartClientIEDriver(org.openqa.selenium.ie.InternetExplorerDriverService service, org.openqa.selenium.Capabilities capabilities)` ### Description Deprecated. Use `SmartClientIEDriver(InternetExplorerDriverService, InternetExplorerOptions)` instead. --- ### Method `SmartClientIEDriver(org.openqa.selenium.ie.InternetExplorerDriverService service, org.openqa.selenium.Capabilities capabilities, int port)` ### Description Deprecated. Use `SmartClientIEDriver(InternetExplorerDriverService, InternetExplorerOptions)` instead. --- ### Method `SmartClientIEDriver(org.openqa.selenium.ie.InternetExplorerDriverService service, org.openqa.selenium.ie.InternetExplorerOptions options)` ### Description Constructor taking a set of configuration options. --- ### Method `SmartClientIEDriver(org.openqa.selenium.ie.InternetExplorerOptions options)` ### Description Constructor taking a set of configuration options. ``` -------------------------------- ### Driver Configuration for Testing Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Methods for configuring driver settings, including file paths, headless mode, and network ports for automated testing environments. ```APIDOC ## DriverConfiguration Methods ### Description Methods for configuring settings related to automated test drivers. ### Methods - `DriverConfiguration.setFileRoot(String)`: Sets the root directory for all other file system paths. - `DriverConfiguration.setFiles(String[])`: Specifies an explicit set of Selenium HTML test script files to run. - `DriverConfiguration.setHeadless(boolean)`: Sets whether to run the browser in headless mode (without a visible GUI). - `DriverConfiguration.setHttpPort(int)`: Sets the HTTP port of the target to which `TestRunner` should connect when running Selenium `open()` commands in Selenium HTML scripts. - `DriverConfiguration.setHttpTarget(String)`: Sets the HTTP target webserver to which `TestRunner` should connect when running Selenium `open()` commands in Selenium HTML scripts. ``` -------------------------------- ### Transaction Policy Management Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/DSTransaction Methods for setting and getting the transaction policy for a transaction. ```APIDOC ## Transaction Policy Management ### `setTransactionPolicy(int transactionPolicy)` **Description**: Sets the `TransactionPolicy` to use for this transaction. By default, this will be fetched from server.properties "RPCManager.transactionPolicy" and if not found will be NOT_SET. **Method**: N/A (Setter method) **Endpoint**: N/A **Parameters**: #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A **Throws**: * `QueueAlreadyStartedException` ### `getTransactionPolicy()` **Description**: Gets the `TransactionPolicy` currently in place for this transaction. **Method**: N/A (Getter method) **Endpoint**: N/A **Returns**: * `int` - the transaction policy. ``` -------------------------------- ### BaseServlet Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/allclasses-index Base servlet providing standard global variables and filesystem access. ```APIDOC ## BaseServlet ### Description BaseServlet is extended by most servlets in the Isomorphic Framework, as it provides: standard global variables in a safe manner to subclasses support for servlet container-based filesystem access ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### VersionedURLFilter Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/servlet/package-summary Rewrites URLs by stripping path segments that start with a configured prefix. ```APIDOC ### Description This filter rewrites URLs by stripping path segments that start with the `isc.pathSegmentPrefix` as defined in the server.properties configuration file. ### Usage This filter is applied automatically based on server configuration. No direct API calls are made to this filter. ``` -------------------------------- ### Get Audit DS Constructor Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/AuditDSGenerator Retrieves the server constructor configuration for a given DataSource. ```APIDOC ## getAuditDSConstructor ### Description Get the serverConstructor configured for the given `DataSource`. ### Method GET (conceptual, as this is a static method) ### Endpoint N/A (static method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java String constructorConfig = AuditDSGenerator.getAuditDSConstructor(myDataSource); ``` ### Response #### Success Response (200) - **constructorConfig** (String) - The server constructor configuration. #### Response Example ```json { "constructorConfig": "com.example.AuditDSFactory" } ``` ``` -------------------------------- ### Config API Endpoints Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/base/Config This section details the methods available for interacting with the SmartClient configuration. ```APIDOC ## GET /config/property ### Description Retrieves a specific property from the SmartClient global configuration file (server.properties). This method is intended for read-only access to configuration values. ### Method GET ### Endpoint /config/property ### Parameters #### Query Parameters - **propertyName** (string) - Required - The name of the property to retrieve. ### Request Example None (GET request with query parameters) ### Response #### Success Response (200) - **value** (any) - The value of the requested property, or null if not found. #### Response Example ```json { "value": "examplePropertyValue" } ``` --- ## POST /config/property ### Description Programmatically injects a single key-value pair into the global configuration. This method allows for runtime modification of configuration settings. It is crucial to manage the timing of these calls to ensure they occur after core configuration loading but before other system components are initialized. ### Method POST ### Endpoint /config/property ### Parameters #### Request Body - **key** (any) - Required - The key of the property to set. - **value** (any) - Required - The new value for the property. ### Request Example ```json { "key": "newPropertyName", "value": "newValue" } ``` ### Response #### Success Response (200) - **oldValue** (any) - The previous value of the property, or null if it was not previously set. #### Response Example ```json { "oldValue": "previousValue" } ``` --- ## POST /config/properties ### Description Programmatically injects a map of key-value pairs into the global configuration. This method is useful for applying multiple configuration changes at once. Similar to `put(key, value)`, the timing of these calls is critical for correct behavior. ### Method POST ### Endpoint /config/properties ### Parameters #### Request Body - **map** (Map) - Required - A map containing property keys and their new values. ### Request Example ```json { "map": { "property1": "value1", "property2": "value2" } } ``` ### Response #### Success Response (200) This endpoint does not return a specific JSON body on success, indicating that the properties were applied. #### Response Example (No response body on success) ``` -------------------------------- ### Get Audit Schema Name Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/datasource/AuditDSGenerator Retrieves the name of the schema configured for the audit DataSource. ```APIDOC ## getAuditSchemaName ### Description Get the audit schema configured for the given `DataSource`. ### Method GET (conceptual, as this is a static method) ### Endpoint N/A (static method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java String schemaName = AuditDSGenerator.getAuditSchemaName(myDataSource); ``` ### Response #### Success Response (200) - **schemaName** (String) - The name of the audit schema. #### Response Example ```json { "schemaName": "audit_log" } ``` ``` -------------------------------- ### MessagingServlet Configuration and Usage Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/messaging/MessagingServlet This section details the configuration and usage of the MessagingServlet, including its endpoint, initialization parameters, and role in real-time messaging. ```APIDOC ## POST /isomorphic/messaging/* ### Description This servlet handles asynchronous delivery of real-time messages to the client. It is configured to intercept requests to the `/isomorphic/messaging/*` URL pattern. ### Method POST (typically, for message delivery) ### Endpoint `/isomorphic/messaging/*` ### Parameters #### Path Parameters None specified. #### Query Parameters None specified. #### Request Body None specified (handled internally for message data). ### Request Example None provided for the servlet endpoint itself. ### Response #### Success Response (200) Responses are typically message payloads or acknowledgments related to real-time messaging. #### Response Example None provided. ### Configuration Configuration is controlled through `server.properties`. The servlet must be registered in `web.xml` with the url-pattern `/isomorphic/messaging/*`. ### Initialization Parameters (web.xml) - **encoding** (string) - Optional - Specifies the character encoding for requests and responses. Defaults to UTF-8. Use `"none"` to disable explicit encoding. ```xml MessagingServlet com.isomorphic.messaging.MessagingServlet encoding UTF-8 ``` ### See Also - Serialized Form - Methods inherited from class com.isomorphic.servlet.BaseServlet: `handleError` ``` -------------------------------- ### startSQLTransaction(DSRequest dsReq) Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/rpc/RPCManager Starts the SQL transaction for all SQL DSRequests belonging to this RPCManager. ```APIDOC ## startSQLTransaction(DSRequest dsReq) ### Description Starts the SQL transaction that will be used for all SQL DSRequests belonging to this RPCManager. ### Method POST ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **dsReq** (DSRequest) - Required - The DSRequest object to start the transaction for. ``` -------------------------------- ### DriverConfiguration Methods Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/index-all Methods for configuring the test driver and its behavior. ```APIDOC ## DriverConfiguration Methods ### Description Methods for configuring automated testing, including email reports, Selenium settings, and log collection. ### `setRepeatEmail(String)` * **Method**: `setRepeatEmail` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Sets the recipient email address for the batch report email. * **Parameters**: * `emailAddress` (String) - The email address for repeat reports. ### `setSeleniumTemplateFile(String)` * **Method**: `setSeleniumTemplateFile` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Sets the path to the template file for the Selenium HTML scripts. * **Parameters**: * `templateFilePath` (String) - The path to the Selenium template file. ### `setSeleniumTimeout(int)` * **Method**: `setSeleniumTimeout` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Sets the timeout for the Selenium test as a whole, in seconds. * **Parameters**: * `timeoutSeconds` (int) - The timeout duration in seconds. ### `setSenderEmail(String)` * **Method**: `setSenderEmail` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Sets the sender email address for the batch report email. * **Parameters**: * `emailAddress` (String) - The sender's email address. ### `setServerFileRoot(String)` * **Method**: `setServerFileRoot` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Sets the root directory on the target server used for looking up relative URLs in Selenium commands. * **Parameters**: * `rootDir` (String) - The server root directory path. ### `setServerLogMode(String)` * **Method**: `setServerLogMode` * **Interface**: `com.isomorphic.autotest.DriverConfiguration` * **Description**: Configures `TestRunner` to collect the ISC Server Log Messages for each test for diagnostic purposes. * **Parameters**: * `logMode` (String) - The mode for server log collection. ``` -------------------------------- ### QueueAlreadyStartedException Constructor Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/rpc/QueueAlreadyStartedException Details the constructor for the QueueAlreadyStartedException, which is thrown when an RPC queue has already been started. ```APIDOC ## QueueAlreadyStartedException(String msg) ### Description Constructs a new QueueAlreadyStartedException with the specified detail message. ### Method Constructor ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (N/A) N/A #### Response Example N/A ``` -------------------------------- ### FileDownload Servlet Configuration Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/servlet/FileDownload Configuration options for the FileDownload Servlet, including caching, character encoding, and path stripping. ```APIDOC ## FileDownload Servlet Configuration ### Description This section details the configurable fields for the FileDownload Servlet, which controls how files are served and cached. ### Method N/A (Configuration via Servlet Initialization Parameters or Properties) ### Endpoint N/A ### Parameters #### Servlet Initialization Parameters / Properties - **expires** (Map) - Optional - A comma-separated mapping of `mimeType:seconds to expiry`. This defines how long the browser should cache files of a specific MIME type. *Example*: `text/javascript:3600,image/gif:86400` - **charsets** (Map) - Optional - A comma-separated mapping of `mimeType:charset`. This specifies the character encoding for files of a given MIME type. *Example*: `text/javascript:UTF-8` - **stripPathComponents** (int) - Optional - An integer instructing the servlet to remove a specified number of path components from the URI before locating the file on disk. This is useful for handling version strings in URLs. *Example*: `1` ### Request Example N/A ### Response N/A ### Error Handling Refer to `BaseServlet` for general error handling. Specific errors related to file serving or configuration may occur. ``` -------------------------------- ### SmartClientIEDriver Constructors Source: https://smartclient.com/smartgwtee-15.0/server/javadoc/com/isomorphic/webdriver/SmartClientIEDriver Details the various constructors available for initializing the SmartClientIEDriver, allowing for different configuration options. ```APIDOC ## SmartClientIEDriver Constructors ### Description Initializes a new instance of the `SmartClientIEDriver` class with various configuration options. ### Method `SmartClientIEDriver()` ### Endpoint N/A (Constructor) ### Parameters None ### Request Example ```java SmartClientIEDriver driver = new SmartClientIEDriver(); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(int port)` ### Endpoint N/A (Constructor) ### Parameters * **port** (int) - The port to use for the driver. ### Request Example ```java SmartClientIEDriver driver = new SmartClientIEDriver(4444); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(InternetExplorerOptions options)` ### Endpoint N/A (Constructor) ### Parameters * **options** (InternetExplorerOptions) - Custom configuration options for the Internet Explorer driver. ### Request Example ```java InternetExplorerOptions options = new InternetExplorerOptions(); // Configure options as needed SmartClientIEDriver driver = new SmartClientIEDriver(options); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(InternetExplorerDriverService service)` ### Endpoint N/A (Constructor) ### Parameters * **service** (InternetExplorerDriverService) - The service to use for the driver. The service will be started with the driver and shut down upon calling `quit()`. ### Request Example ```java InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService(); SmartClientIEDriver driver = new SmartClientIEDriver(service); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(InternetExplorerDriverService service, InternetExplorerOptions options)` ### Endpoint N/A (Constructor) ### Parameters * **service** (InternetExplorerDriverService) - The service to use for the driver. * **options** (InternetExplorerOptions) - Custom configuration options for the Internet Explorer driver. ### Request Example ```java InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService(); InternetExplorerOptions options = new InternetExplorerOptions(); // Configure options as needed SmartClientIEDriver driver = new SmartClientIEDriver(service, options); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(Capabilities capabilities)` ### Endpoint N/A (Constructor) ### Parameters * **capabilities** (Capabilities) - Desired driver capabilities. ### Request Example ```java DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); // Configure capabilities as needed SmartClientIEDriver driver = new SmartClientIEDriver(capabilities); ``` ### Response #### Success Response (200) N/A (Constructor) ### Method `SmartClientIEDriver(InternetExplorerDriverService service, Capabilities capabilities)` ### Endpoint N/A (Constructor) ### Parameters * **service** (InternetExplorerDriverService) - The service to use for the driver. * **capabilities** (Capabilities) - Desired driver capabilities. ### Request Example ```java InternetExplorerDriverService service = InternetExplorerDriverService.createDefaultService(); DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); // Configure capabilities as needed SmartClientIEDriver driver = new SmartClientIEDriver(service, capabilities); ``` ### Response #### Success Response (200) N/A (Constructor) ```