Skip to content

Commit

Permalink
Deprecate old dashboard API
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jul 15, 2020
1 parent 673d70d commit 544fcdb
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/public/Dashboard/IDashboardManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* The call can be done from any Service.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @package OCP\Dashboard
*/
Expand All @@ -48,6 +49,7 @@ interface IDashboardManager {
* Register a IWidgetsService.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param IWidgetsService $widgetsService
*/
Expand All @@ -58,6 +60,7 @@ public function registerWidgetsService(IWidgetsService $widgetsService);
* Register a IEventsService.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param IEventsService $eventsService
*/
Expand All @@ -70,6 +73,7 @@ public function registerEventsService(IEventsService $eventsService);
* @see IWidgetConfig
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $widgetId
* @param string $userId
Expand All @@ -92,6 +96,7 @@ public function getWidgetConfig(string $widgetId, string $userId): IWidgetConfig
* that are running dashboard.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $widgetId
* @param array $users
Expand All @@ -106,6 +111,7 @@ public function createUsersEvent(string $widgetId, array $users, array $payload,
* Create push notifications for groups. (ie. createUsersEvent())
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $widgetId
* @param array $groups
Expand All @@ -120,6 +126,7 @@ public function createGroupsEvent(string $widgetId, array $groups, array $payloa
* Create push notifications for everyone. (ie. createUsersEvent())
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $widgetId
* @param array $payload
Expand Down
8 changes: 8 additions & 0 deletions lib/public/Dashboard/IDashboardWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* Multiple widget can be defined in the same appinfo/info.xml.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @package OCP\Dashboard
*/
Expand All @@ -54,6 +55,7 @@ interface IDashboardWidget {
* Should returns the (unique) Id of the widget.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -64,6 +66,7 @@ public function getId(): string;
* Should returns the [display] name of the widget.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -75,6 +78,7 @@ public function getName(): string;
* This description is displayed in the listing of the available widgets.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -88,6 +92,7 @@ public function getDescription(): string;
* @see WidgetTemplate
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return WidgetTemplate
*/
Expand All @@ -101,6 +106,7 @@ public function getWidgetTemplate(): WidgetTemplate;
* @see WidgetSetup
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return WidgetSetup
*/
Expand All @@ -119,6 +125,7 @@ public function getWidgetSetup(): WidgetSetup;
* @see IWidgetConfig
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param IWidgetConfig $settings
*/
Expand All @@ -134,6 +141,7 @@ public function loadWidget(IWidgetConfig $settings);
* @see IWidgetRequest
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param IWidgetRequest $request
*/
Expand Down
6 changes: 6 additions & 0 deletions lib/public/Dashboard/Model/IWidgetConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* @see IDashboardWidget::loadWidget
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @package OCP\Dashboard\Model
*/
Expand All @@ -46,6 +47,7 @@ interface IWidgetConfig {
* Returns the userId
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -56,6 +58,7 @@ public function getUserId(): string;
* Returns the widgetId
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -75,6 +78,7 @@ public function getWidgetId(): string;
* ]
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return array
*/
Expand Down Expand Up @@ -105,6 +109,7 @@ public function getPosition(): array;
* Dashboard app.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return array
*/
Expand All @@ -115,6 +120,7 @@ public function getSettings(): array;
* Returns if the widget is enabled/displayed in this user's dashboard.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return bool
*/
Expand Down
8 changes: 8 additions & 0 deletions lib/public/Dashboard/Model/IWidgetRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* @see IDashboardWidget::requestWidget
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @package OCP\Dashboard\Model
*/
Expand All @@ -47,6 +48,7 @@ interface IWidgetRequest {
* Get the widgetId.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -57,6 +59,7 @@ public function getWidgetId(): string;
* Get the WidgetClass.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return IDashboardWidget
*/
Expand All @@ -76,6 +79,7 @@ public function getWidget(): IDashboardWidget;
* callback);
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -88,6 +92,7 @@ public function getRequest(): string;
* @see getRequest
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -98,6 +103,7 @@ public function getValue(): string;
* Returns the result.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return array
*/
Expand All @@ -108,6 +114,7 @@ public function getResult(): array;
* add a result (as string)
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $key
* @param string $result
Expand All @@ -120,6 +127,7 @@ public function addResult(string $key, string $result): IWidgetRequest;
* add a result (as array)
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $key
* @param array $result
Expand Down
13 changes: 13 additions & 0 deletions lib/public/Dashboard/Model/WidgetSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
* @see WidgetTemplate::addSetting
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @package OCP\Dashboard\Model
*/
Expand Down Expand Up @@ -73,6 +74,7 @@ final class WidgetSetting implements JsonSerializable {
* WidgetSetting constructor.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $type
*/
Expand All @@ -85,6 +87,7 @@ public function __construct(string $type = '') {
* Set the name of the setting (full string, no space)
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $name
*
Expand All @@ -100,6 +103,7 @@ public function setName(string $name): WidgetSetting {
* Get the name of the setting
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -112,6 +116,7 @@ public function getName(): string {
* Set the title/display name of the setting.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $title
*
Expand All @@ -127,6 +132,7 @@ public function setTitle(string $title): WidgetSetting {
* Get the title of the setting
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -139,6 +145,7 @@ public function getTitle(): string {
* Set the type of the setting (input, checkbox, ...)
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $type
*
Expand All @@ -154,6 +161,7 @@ public function setType(string $type): WidgetSetting {
* Get the type of the setting.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -166,6 +174,7 @@ public function getType(): string {
* Set the placeholder (in case of type=input)
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $text
*
Expand All @@ -181,6 +190,7 @@ public function setPlaceholder(string $text): WidgetSetting {
* Get the placeholder.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -193,6 +203,7 @@ public function getPlaceholder(): string {
* Set the default value of the setting.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @param string $value
*
Expand All @@ -208,6 +219,7 @@ public function setDefault(string $value): WidgetSetting {
* Get the default value.
*
* @since 15.0.0
* @deprecated 20.0.0
*
* @return string
*/
Expand All @@ -218,6 +230,7 @@ public function getDefault(): string {

/**
* @since 15.0.0
* @deprecated 20.0.0
*
* @return array
*/
Expand Down
Loading

1 comment on commit 544fcdb

@MarkPartlett

This comment was marked as resolved.

Please sign in to comment.