Skip to content

Commit e00deba

Browse files
committed
RDKEMW-6924: Create documentation for StorageManager
1 parent e42222a commit e00deba

File tree

3 files changed

+269
-0
lines changed

3 files changed

+269
-0
lines changed

docs/apis/StorageManagerPlugin.md

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
<!-- Generated automatically, DO NOT EDIT! -->
2+
<a name="head.StorageManager_Plugin"></a>
3+
# StorageManager Plugin
4+
5+
A org.rdk.StorageManager plugin for Thunder framework.
6+
7+
### Table of Contents
8+
9+
- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms)
10+
- [Description](#head.Description)
11+
- [Configuration](#head.Configuration)
12+
- [Methods](#head.Methods)
13+
14+
<a name="head.Abbreviation,_Acronyms_and_Terms"></a>
15+
# Abbreviation, Acronyms and Terms
16+
17+
[[Refer to this link](overview/aat.md)]
18+
19+
<a name="head.Description"></a>
20+
# Description
21+
22+
The StorageManager is responsible for maintaining the space on the flash disk needed for Web Applications to store Browser functions such as Cookies and Local Storage. It is a Thunder plugin that exposes a single Thunder interface(s) called IStorageManager.
23+
24+
Note: This document only describes the JSON-RPC methods exposed by the plugin, it does not cover COM-RPC interfaces or usage.
25+
26+
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)].
27+
28+
<a name="head.Configuration"></a>
29+
# Configuration
30+
31+
The table below lists configuration options of the plugin.
32+
33+
| Name | Type | Description |
34+
| :-------- | :-------- | :-------- |
35+
| callsign | string | Plugin instance name (default: *org.rdk.StorageManager*) |
36+
| classname | string | Class name: *org.rdk.StorageManager* |
37+
| locator | string | Library name: *libWPEFrameworkStorageManager.so* |
38+
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework |
39+
40+
<a name="head.Methods"></a>
41+
# Methods
42+
43+
The following methods are provided by the org.rdk.StorageManager plugin:
44+
45+
StorageManager interface methods:
46+
47+
| Method | Description |
48+
| :-------- | :-------- |
49+
| [clear](#method.clear) | Clears app data for a given app id |
50+
| [clearAll](#method.clearAll) | Clears all app data except for the exempt app ids |
51+
52+
53+
<a name="method.clear"></a>
54+
## *clear [<sup>method</sup>](#head.Methods)*
55+
56+
Clears app data for a given app id.
57+
58+
### Events
59+
60+
No Events
61+
62+
### Parameters
63+
64+
| Name | Type | Description |
65+
| :-------- | :-------- | :-------- |
66+
| params | object | |
67+
| params.appId | string | Application Identifier |
68+
69+
### Result
70+
71+
| Name | Type | Description |
72+
| :-------- | :-------- | :-------- |
73+
| result | object | Returns success or error status |
74+
| result.error | string | Error message, if any |
75+
76+
### Errors
77+
78+
| Code | Message | Description |
79+
| :-------- | :-------- | :-------- |
80+
| 0 | ```Core::ERROR_NONE``` | Success |
81+
| 1 | ```Core::ERROR_GENERAL``` | General error |
82+
83+
### Example
84+
85+
#### Request
86+
87+
```json
88+
{
89+
"jsonrpc": "2.0",
90+
"id": 42,
91+
"method": "org.rdk.StorageManager.clear",
92+
"params": {
93+
"appId": "com.example.myapp"
94+
}
95+
}
96+
```
97+
98+
#### Response
99+
100+
```json
101+
{
102+
"jsonrpc": "2.0",
103+
"id": 42,
104+
"result": {
105+
"error": "null"
106+
}
107+
}
108+
```
109+
110+
<a name="method.clearAll"></a>
111+
## *clearAll [<sup>method</sup>](#head.Methods)*
112+
113+
Clears all app data except for the exempt app ids.
114+
115+
### Events
116+
117+
No Events
118+
119+
### Parameters
120+
121+
| Name | Type | Description |
122+
| :-------- | :-------- | :-------- |
123+
| params | object | |
124+
| params?.exemptionAppIds | string | <sup>*(optional)*</sup> A JSON-formatted string listing app IDs exempt from clearing |
125+
126+
### Result
127+
128+
| Name | Type | Description |
129+
| :-------- | :-------- | :-------- |
130+
| result | object | Returns success or error status |
131+
| result.error | string | Error message, if any |
132+
133+
### Errors
134+
135+
| Code | Message | Description |
136+
| :-------- | :-------- | :-------- |
137+
| 0 | ```Core::ERROR_NONE``` | Success |
138+
| 1 | ```Core::ERROR_GENERAL``` | General error |
139+
140+
### Example
141+
142+
#### Request
143+
144+
```json
145+
{
146+
"jsonrpc": "2.0",
147+
"id": 42,
148+
"method": "org.rdk.StorageManager.clearAll",
149+
"params": {
150+
"exemptionAppIds": "{\"exemptionAppIds\":[\"com.example.app1\", \"com.example.app2\"]}"
151+
}
152+
}
153+
```
154+
155+
#### Response
156+
157+
```json
158+
{
159+
"jsonrpc": "2.0",
160+
"id": 42,
161+
"result": {
162+
"error": "null"
163+
}
164+
}
165+
```
166+
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/rdkcentral/entservices-apis/refs/heads/main/tools/md_generator/json2md/schemas/interface.schema.json",
3+
"jsonrpc": "2.0",
4+
"info": {
5+
"title": "StorageManager API",
6+
"class": "StorageManager",
7+
"description": "The StorageManager is responsible for maintaining the space on the flash disk needed for Web Applications to store Browser functions such as Cookies and Local Storage. It is a Thunder plugin that exposes a single Thunder interface(s) called IStorageManager."
8+
},
9+
"common": {
10+
"$ref": "../common/common.json"
11+
},
12+
"definitions": {
13+
"appId": {
14+
"summary": "Application Identifier",
15+
"type": "string",
16+
"example": "com.example.myapp"
17+
},
18+
"exemptionAppIds": {
19+
"summary": "A JSON-formatted string listing app IDs exempt from clearing",
20+
"type": "string",
21+
"example": "{\\\"exemptionAppIds\\\":[\\\"com.example.app1\\\", \\\"com.example.app2\\\"]}"
22+
},
23+
"error": {
24+
"summary": "Error message, if any",
25+
"type": "string",
26+
"example": "null"
27+
}
28+
},
29+
"methods": {
30+
"clear": {
31+
"summary": "Clears app data for a given app id.",
32+
"params": {
33+
"type": "object",
34+
"properties": {
35+
"appId": { "$ref": "#/definitions/appId" }
36+
},
37+
"required": ["appId"]
38+
},
39+
"result": {
40+
"description": "Returns success or error status.",
41+
"type": "object",
42+
"properties": {
43+
"error": { "$ref": "#/definitions/error" }
44+
}
45+
},
46+
"errors": [
47+
{
48+
"code": 0,
49+
"message": "Core::ERROR_NONE",
50+
"description": "Success"
51+
},
52+
{
53+
"code": 1,
54+
"message": "Core::ERROR_GENERAL",
55+
"description": "General error"
56+
}
57+
]
58+
},
59+
"clearAll": {
60+
"summary": "Clears all app data except for the exempt app ids.",
61+
"params": {
62+
"type": "object",
63+
"properties": {
64+
"exemptionAppIds": { "$ref": "#/definitions/exemptionAppIds" }
65+
},
66+
"required": []
67+
},
68+
"result": {
69+
"description": "Returns success or error status.",
70+
"type": "object",
71+
"properties": {
72+
"error": { "$ref": "#/definitions/error" }
73+
}
74+
},
75+
"errors": [
76+
{
77+
"code": 0,
78+
"message": "Core::ERROR_NONE",
79+
"description": "Success"
80+
},
81+
{
82+
"code": 1,
83+
"message": "Core::ERROR_GENERAL",
84+
"description": "General error"
85+
}
86+
]
87+
}
88+
}
89+
}
90+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/rdkcentral/entservices-apis/refs/heads/main/tools/md_generator/json2md/schemas/plugin.schema.json",
3+
"info": {
4+
"title": "StorageManager Plugin",
5+
"callsign": "org.rdk.StorageManager",
6+
"locator": "libWPEFrameworkStorageManager.so",
7+
"status": "production",
8+
"description": "The StorageManager is responsible for maintaining the space on the flash disk needed for Web Applications to store Browser functions such as Cookies and Local Storage. It is a Thunder plugin that exposes a single Thunder interface(s) called IStorageManager.\n\nNote: This document only describes the JSON-RPC methods exposed by the plugin, it does not cover COM-RPC interfaces or usage."
9+
},
10+
"interface": {
11+
"$ref": "StorageManager.json#"
12+
}
13+
}

0 commit comments

Comments
 (0)