Skip to content

Commit 544fcdb

Browse files
committed
Deprecate old dashboard API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 673d70d commit 544fcdb

9 files changed

Lines changed: 79 additions & 0 deletions

File tree

lib/public/Dashboard/IDashboardManager.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
* The call can be done from any Service.
3939
*
4040
* @since 15.0.0
41+
* @deprecated 20.0.0
4142
*
4243
* @package OCP\Dashboard
4344
*/
@@ -48,6 +49,7 @@ interface IDashboardManager {
4849
* Register a IWidgetsService.
4950
*
5051
* @since 15.0.0
52+
* @deprecated 20.0.0
5153
*
5254
* @param IWidgetsService $widgetsService
5355
*/
@@ -58,6 +60,7 @@ public function registerWidgetsService(IWidgetsService $widgetsService);
5860
* Register a IEventsService.
5961
*
6062
* @since 15.0.0
63+
* @deprecated 20.0.0
6164
*
6265
* @param IEventsService $eventsService
6366
*/
@@ -70,6 +73,7 @@ public function registerEventsService(IEventsService $eventsService);
7073
* @see IWidgetConfig
7174
*
7275
* @since 15.0.0
76+
* @deprecated 20.0.0
7377
*
7478
* @param string $widgetId
7579
* @param string $userId
@@ -92,6 +96,7 @@ public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig
9296
* that are running dashboard.
9397
*
9498
* @since 15.0.0
99+
* @deprecated 20.0.0
95100
*
96101
* @param string $widgetId
97102
* @param array $users
@@ -106,6 +111,7 @@ public function createUsersEvent(string $widgetId, array $users, array $payload,
106111
* Create push notifications for groups. (ie. createUsersEvent())
107112
*
108113
* @since 15.0.0
114+
* @deprecated 20.0.0
109115
*
110116
* @param string $widgetId
111117
* @param array $groups
@@ -120,6 +126,7 @@ public function createGroupsEvent(string $widgetId, array $groups, array $payloa
120126
* Create push notifications for everyone. (ie. createUsersEvent())
121127
*
122128
* @since 15.0.0
129+
* @deprecated 20.0.0
123130
*
124131
* @param string $widgetId
125132
* @param array $payload

lib/public/Dashboard/IDashboardWidget.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* Multiple widget can be defined in the same appinfo/info.xml.
4646
*
4747
* @since 15.0.0
48+
* @deprecated 20.0.0
4849
*
4950
* @package OCP\Dashboard
5051
*/
@@ -54,6 +55,7 @@ interface IDashboardWidget {
5455
* Should returns the (unique) Id of the widget.
5556
*
5657
* @since 15.0.0
58+
* @deprecated 20.0.0
5759
*
5860
* @return string
5961
*/
@@ -64,6 +66,7 @@ public function getId(): string;
6466
* Should returns the [display] name of the widget.
6567
*
6668
* @since 15.0.0
69+
* @deprecated 20.0.0
6770
*
6871
* @return string
6972
*/
@@ -75,6 +78,7 @@ public function getName(): string;
7578
* This description is displayed in the listing of the available widgets.
7679
*
7780
* @since 15.0.0
81+
* @deprecated 20.0.0
7882
*
7983
* @return string
8084
*/
@@ -88,6 +92,7 @@ public function getDescription(): string;
8892
* @see WidgetTemplate
8993
*
9094
* @since 15.0.0
95+
* @deprecated 20.0.0
9196
*
9297
* @return WidgetTemplate
9398
*/
@@ -101,6 +106,7 @@ public function getWidgetTemplate(): WidgetTemplate;
101106
* @see WidgetSetup
102107
*
103108
* @since 15.0.0
109+
* @deprecated 20.0.0
104110
*
105111
* @return WidgetSetup
106112
*/
@@ -119,6 +125,7 @@ public function getWidgetSetup(): WidgetSetup;
119125
* @see IWidgetConfig
120126
*
121127
* @since 15.0.0
128+
* @deprecated 20.0.0
122129
*
123130
* @param IWidgetConfig $settings
124131
*/
@@ -134,6 +141,7 @@ public function loadWidget(IWidgetConfig $settings);
134141
* @see IWidgetRequest
135142
*
136143
* @since 15.0.0
144+
* @deprecated 20.0.0
137145
*
138146
* @param IWidgetRequest $request
139147
*/

lib/public/Dashboard/Model/IWidgetConfig.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* @see IDashboardWidget::loadWidget
3737
*
3838
* @since 15.0.0
39+
* @deprecated 20.0.0
3940
*
4041
* @package OCP\Dashboard\Model
4142
*/
@@ -46,6 +47,7 @@ interface IWidgetConfig {
4647
* Returns the userId
4748
*
4849
* @since 15.0.0
50+
* @deprecated 20.0.0
4951
*
5052
* @return string
5153
*/
@@ -56,6 +58,7 @@ public function getUserId(): string;
5658
* Returns the widgetId
5759
*
5860
* @since 15.0.0
61+
* @deprecated 20.0.0
5962
*
6063
* @return string
6164
*/
@@ -75,6 +78,7 @@ public function getWidgetId(): string;
7578
* ]
7679
*
7780
* @since 15.0.0
81+
* @deprecated 20.0.0
7882
*
7983
* @return array
8084
*/
@@ -105,6 +109,7 @@ public function getPosition(): array;
105109
* Dashboard app.
106110
*
107111
* @since 15.0.0
112+
* @deprecated 20.0.0
108113
*
109114
* @return array
110115
*/
@@ -115,6 +120,7 @@ public function getSettings(): array;
115120
* Returns if the widget is enabled/displayed in this user's dashboard.
116121
*
117122
* @since 15.0.0
123+
* @deprecated 20.0.0
118124
*
119125
* @return bool
120126
*/

lib/public/Dashboard/Model/IWidgetRequest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
* @see IDashboardWidget::requestWidget
3939
*
4040
* @since 15.0.0
41+
* @deprecated 20.0.0
4142
*
4243
* @package OCP\Dashboard\Model
4344
*/
@@ -47,6 +48,7 @@ interface IWidgetRequest {
4748
* Get the widgetId.
4849
*
4950
* @since 15.0.0
51+
* @deprecated 20.0.0
5052
*
5153
* @return string
5254
*/
@@ -57,6 +59,7 @@ public function getWidgetId(): string;
5759
* Get the WidgetClass.
5860
*
5961
* @since 15.0.0
62+
* @deprecated 20.0.0
6063
*
6164
* @return IDashboardWidget
6265
*/
@@ -76,6 +79,7 @@ public function getWidget(): IDashboardWidget;
7679
* callback);
7780
*
7881
* @since 15.0.0
82+
* @deprecated 20.0.0
7983
*
8084
* @return string
8185
*/
@@ -88,6 +92,7 @@ public function getRequest(): string;
8892
* @see getRequest
8993
*
9094
* @since 15.0.0
95+
* @deprecated 20.0.0
9196
*
9297
* @return string
9398
*/
@@ -98,6 +103,7 @@ public function getValue(): string;
98103
* Returns the result.
99104
*
100105
* @since 15.0.0
106+
* @deprecated 20.0.0
101107
*
102108
* @return array
103109
*/
@@ -108,6 +114,7 @@ public function getResult(): array;
108114
* add a result (as string)
109115
*
110116
* @since 15.0.0
117+
* @deprecated 20.0.0
111118
*
112119
* @param string $key
113120
* @param string $result
@@ -120,6 +127,7 @@ public function addResult(string $key, string $result): IWidgetRequest;
120127
* add a result (as array)
121128
*
122129
* @since 15.0.0
130+
* @deprecated 20.0.0
123131
*
124132
* @param string $key
125133
* @param array $result

lib/public/Dashboard/Model/WidgetSetting.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @see WidgetTemplate::addSetting
4646
*
4747
* @since 15.0.0
48+
* @deprecated 20.0.0
4849
*
4950
* @package OCP\Dashboard\Model
5051
*/
@@ -73,6 +74,7 @@ final class WidgetSetting implements JsonSerializable {
7374
* WidgetSetting constructor.
7475
*
7576
* @since 15.0.0
77+
* @deprecated 20.0.0
7678
*
7779
* @param string $type
7880
*/
@@ -85,6 +87,7 @@ public function __construct(string $type = '') {
8587
* Set the name of the setting (full string, no space)
8688
*
8789
* @since 15.0.0
90+
* @deprecated 20.0.0
8891
*
8992
* @param string $name
9093
*
@@ -100,6 +103,7 @@ public function setName(string $name): WidgetSetting {
100103
* Get the name of the setting
101104
*
102105
* @since 15.0.0
106+
* @deprecated 20.0.0
103107
*
104108
* @return string
105109
*/
@@ -112,6 +116,7 @@ public function getName(): string {
112116
* Set the title/display name of the setting.
113117
*
114118
* @since 15.0.0
119+
* @deprecated 20.0.0
115120
*
116121
* @param string $title
117122
*
@@ -127,6 +132,7 @@ public function setTitle(string $title): WidgetSetting {
127132
* Get the title of the setting
128133
*
129134
* @since 15.0.0
135+
* @deprecated 20.0.0
130136
*
131137
* @return string
132138
*/
@@ -139,6 +145,7 @@ public function getTitle(): string {
139145
* Set the type of the setting (input, checkbox, ...)
140146
*
141147
* @since 15.0.0
148+
* @deprecated 20.0.0
142149
*
143150
* @param string $type
144151
*
@@ -154,6 +161,7 @@ public function setType(string $type): WidgetSetting {
154161
* Get the type of the setting.
155162
*
156163
* @since 15.0.0
164+
* @deprecated 20.0.0
157165
*
158166
* @return string
159167
*/
@@ -166,6 +174,7 @@ public function getType(): string {
166174
* Set the placeholder (in case of type=input)
167175
*
168176
* @since 15.0.0
177+
* @deprecated 20.0.0
169178
*
170179
* @param string $text
171180
*
@@ -181,6 +190,7 @@ public function setPlaceholder(string $text): WidgetSetting {
181190
* Get the placeholder.
182191
*
183192
* @since 15.0.0
193+
* @deprecated 20.0.0
184194
*
185195
* @return string
186196
*/
@@ -193,6 +203,7 @@ public function getPlaceholder(): string {
193203
* Set the default value of the setting.
194204
*
195205
* @since 15.0.0
206+
* @deprecated 20.0.0
196207
*
197208
* @param string $value
198209
*
@@ -208,6 +219,7 @@ public function setDefault(string $value): WidgetSetting {
208219
* Get the default value.
209220
*
210221
* @since 15.0.0
222+
* @deprecated 20.0.0
211223
*
212224
* @return string
213225
*/
@@ -218,6 +230,7 @@ public function getDefault(): string {
218230

219231
/**
220232
* @since 15.0.0
233+
* @deprecated 20.0.0
221234
*
222235
* @return array
223236
*/

0 commit comments

Comments
 (0)