Skip to content

Commit a60dc49

Browse files
author
Daniel Hochleitner
committed
added apex plugin description
1 parent f6dab04 commit a60dc49

File tree

1 file changed

+91
-6
lines changed

1 file changed

+91
-6
lines changed

README.md

Lines changed: 91 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
- [Node.js Server](#nodejs-server)
2020
- [REST-Service](#rest-service)
2121
- [PL/SQL API](#plsql-api)
22+
- [List of global package variables](#list-of-global-package-variables)
23+
- [List of all procedures with all parameters](#list-of-all-procedures-with-all-parameters)
2224
- [APEX](#apex)
25+
- [Init Websocket Notify Connection](#init-websocket-notify-connection)
26+
- [Send Websocket Notify](#send-websocket-notify)
27+
- [Show Websocket Notify](#show-websocket-notify)
2328
- [License](#license)
2429

2530

@@ -93,7 +98,7 @@ npm is the package manager for Node applications. npm is used to install all req
9398

9499
#### Install Notification Package
95100

96-
- Copy the complete folder [../node/node-notify-server](https://github.com/Dani3lSun/https://github.com/Dani3lSun/apex-websocket-notify-bundle/tree/master/node/node-notify-server) to your server
101+
- Copy the complete folder [../node/node-notify-server](https://github.com/Dani3lSun/apex-websocket-notify-bundle/tree/master/node/node-notify-server) to your server
97102
- change to this directory via command line:
98103
```
99104
cd /path/to/node-notify-server
@@ -228,7 +233,7 @@ Just import these 3 files to your application and you are ready to go.
228233
- **Send Websocket Notify** - dynamic_action_plugin_de_danielh_sendwsnotify.sql
229234
- **Show Websocket Notify** - dynamic_action_plugin_de_danielh_showwsnotify.sql
230235

231-
For a detailed description of the plugins, read further under "Usage Section" or import the demo app sql file to your workspace.
236+
For a detailed description of the plugins, read further under **"Usage Section"** or import the demo app sql file to your workspace.
232237

233238

234239
## Usage
@@ -286,9 +291,9 @@ curl -H "notify-title: Test Title Text" -H "notify-message: Test Message Text" "
286291

287292
### PL/SQL API
288293

289-
The PL/SQL API includes many procedures to send any kind of possible notifications over the REST-Interface. It can be used to send notifications to users via PL/SQL or inside of APEX. All web service requests are based on APEX package APEX_WEB_SERVICE.
294+
The PL/SQL API consists of one package **ws_notify_api** and includes many procedures to send any kind of possible notifications over the REST-Interface. It can be used to send notifications to users via PL/SQL or inside of APEX. All web service requests are based on APEX package APEX_WEB_SERVICE.
290295

291-
**List of global package variables:**
296+
#### List of global package variables
292297

293298
- **g_ws_rest_host** - Node Notification Server Hostname or IP
294299
- **g_ws_rest_port** - Node Notification Server Port
@@ -301,7 +306,7 @@ The PL/SQL API includes many procedures to send any kind of possible notificatio
301306
- **g_ssl_wallet_pwd** - If https, password of oracle wallet
302307

303308

304-
**List of all procedures with all parameters:**
309+
#### List of all procedures with all parameters
305310

306311
**Procedure:** do_rest_notify_user
307312

@@ -455,10 +460,90 @@ The PL/SQL API includes many procedures to send any kind of possible notificatio
455460
- **i_message** (required)
456461
- **i_optparam** (optional) - (Optional Parameter String)
457462

458-
----
463+
464+
A procedure call could look like this:
465+
466+
```language-sql
467+
BEGIN
468+
ws_notify_api.do_rest_notify_user(i_userid => 'USER1',
469+
i_room => 'private',
470+
i_type => 'info',
471+
i_title => 'My test title',
472+
i_message => 'My test message content...',
473+
i_optparam => NULL);
474+
END;
475+
```
476+
459477

460478
### APEX
461479

480+
As already mentioned above, the APEX part contains 3 plugins to cover all functionalities from initialization of a websocket connection, sending notifications to other connected users to show incoming notifications. All 3 plugin files are located under [../apex/plugins](https://github.com/Dani3lSun/apex-websocket-notify-bundle/tree/master/apex/plugins) folder.
481+
482+
#### Init Websocket Notify Connection
483+
484+
- **Plugin File:** dynamic_action_plugin_de_danielh_initwsnotifyconnection.sql
485+
486+
- **Purpose:** Initialize a connection to the websocket server, for general usage over all pages of your APEX application this plugin should located on Global Page 0 (Zero)
487+
488+
- **Plugin Attributes:**
489+
- **Use SSL** - Choose if the connection to the websocket server is secure (HTTPS) or plain (HTTP)
490+
- **Server Hostname or IP** - The hostname or ip address of the websocket server
491+
- **Server Port** - The port of the websocket server
492+
- **Websocket Type or Room** - The type/room of the websocket server. There are 2 possible connections: private, public
493+
- **Websocket Auth User-ID** - User-ID which connects / authenticates against the websocket server. Is used to identify a user. Default: APEX APP_USER
494+
- **Websocket Auth-Token** - Auth-Token of the Node Notify Websocket Server. This is to increase security.
495+
- **Logging** - Whether to log events in the console
496+
497+
- **Plugin Events:**
498+
- **Private Websocket Connection success** - Successfully connected to private room
499+
- **Private Websocket Connection error** - Error connecting to private room
500+
- **Private Websocket Disconnected** - Websocket connection is disconnected for private room
501+
- **Public Websocket Connection success** - Successfully connected to public room
502+
- **Public Websocket Connection error** - Error connecting to public room
503+
- **Public Websocket Disconnected** - Websocket connection is disconnected for public room
504+
- **Receive Private Message** - Receiving an incoming private message
505+
- **Receive Public Message** - Receiving an incoming public message
506+
507+
508+
#### Send Websocket Notify
509+
510+
- **Plugin File:** dynamic_action_plugin_de_danielh_sendwsnotify.sql
511+
512+
- **Purpose:** Send websocket notifications to other connected users or to all connected users
513+
514+
- **Plugin Attributes:**
515+
- **To User (User-ID)** - Item which holds informations about the User-ID or Username of the user who get´s the notification
516+
- **Websocket Room** - Item which holds informations about the websocket room - Valid values: "private" or "public"
517+
- **Notification Type** - Item which holds informations about the type of the notification - Valid values: info, success, warn, error
518+
- **Notification Title** - Item which holds informations about the title of the notification
519+
- **Notification Message** - Item which holds informations about the message content of the notification
520+
- **Optional Parameter** - Item which holds informations about a optional parameter - This could be any kind of string or number combination. This information can be processed on the client side
521+
- **Show Wait Spinner** - Show / Hide wait spinner for AJAX call
522+
- **Logging** - Whether to log events in the console
523+
524+
- **Plugin Events:**
525+
- **Send Notification success** - Sending a notification was successfull
526+
- **Send Notification error** - Error sending a notification
527+
- **Send Notification missing values** - Missing required parameters for sending a notification
528+
529+
530+
#### Show Websocket Notify
531+
532+
- **Plugin File:** dynamic_action_plugin_de_danielh_showwsnotify.sql
533+
534+
- **Purpose:** Show notifications for incoming websocket message events. Notifications UI based on [AlertifyJS](https://github.com/MohammadYounes/AlertifyJS)
535+
536+
- **Plugin Attributes:**
537+
- **Notification Icon CSS Class** - Icon CSS class for the incoming notification - Default: fa-bell
538+
- **Notification Wait Time** - Time (in seconds) to wait before the notification is dismissed, a value of 0 means keep open till clicked.
539+
- **Notification Position** - Position of the notification message on screen
540+
- **Logging** - Whether to log events in the console
541+
542+
All other parameters of an notification object (title, message, type (info, success, warn, error), etc.) are automatically fetched from the websocket message event.
543+
544+
- **Plugin Events:**
545+
- **Private Notification clicked** - Clicked on a private notification object
546+
- **Public Notification clicked** - Clicked on a public notification object
462547

463548

464549
## License

0 commit comments

Comments
 (0)