mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
fix(comments): Clarify stability of comments API
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
088d6843b7
commit
dd4e8957ea
8 changed files with 25 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Listenable;
|
||||
use OCP\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
|
|
@ -15,6 +16,7 @@ use OCP\EventDispatcher\Event;
|
|||
* @since 9.1.0
|
||||
* @since 28.0.0 Dispatched as a typed event
|
||||
*/
|
||||
#[Listenable('28.0.0')]
|
||||
class CommentsEntityEvent extends Event {
|
||||
/**
|
||||
* @since 9.1.0
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Listenable;
|
||||
use OCP\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
|
|
@ -14,6 +15,7 @@ use OCP\EventDispatcher\Event;
|
|||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Listenable('28.0.0')]
|
||||
class CommentsEvent extends Event {
|
||||
/**
|
||||
* @since 11.0.0
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Consumable;
|
||||
|
||||
/**
|
||||
* Interface IComment
|
||||
*
|
||||
|
|
@ -14,6 +16,7 @@ namespace OCP\Comments;
|
|||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Consumable('9.0.0')]
|
||||
interface IComment {
|
||||
/**
|
||||
* @since 9.0.0
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Consumable;
|
||||
use OCP\AppFramework\Attribute\ExceptionalImplementable;
|
||||
use OCP\IUser;
|
||||
use OCP\PreConditionNotMetException;
|
||||
|
||||
|
|
@ -17,6 +19,8 @@ use OCP\PreConditionNotMetException;
|
|||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Consumable('9.0.0')]
|
||||
#[ExceptionalImplementable('spreed', \OCA\Talk\Chat\CommentsManager::class)]
|
||||
interface ICommentsManager {
|
||||
/**
|
||||
* @const DELETED_USER type and id for a user that has been deleted
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@ use OCP\IServerContainer;
|
|||
* instance.
|
||||
*
|
||||
* @since 9.0.0
|
||||
* @deprecated 32.0.0 It is no longer supported to store the comments in another location
|
||||
*/
|
||||
#[\Deprecated('It is no longer supported to store the comments in another location', '32.0.0')]
|
||||
interface ICommentsManagerFactory {
|
||||
/**
|
||||
* Constructor for the comments manager factory
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Catchable;
|
||||
|
||||
/**
|
||||
* Exception for illegal attempts to modify a comment ID
|
||||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Catchable('9.0.0')]
|
||||
class IllegalIDChangeException extends \Exception {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Catchable;
|
||||
|
||||
/**
|
||||
* Exception thrown when a comment message exceeds the allowed character limit
|
||||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Catchable('9.0.0')]
|
||||
class MessageTooLongException extends \OverflowException {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,13 @@
|
|||
*/
|
||||
namespace OCP\Comments;
|
||||
|
||||
use OCP\AppFramework\Attribute\Catchable;
|
||||
|
||||
/**
|
||||
* Exception for not found entity
|
||||
*
|
||||
* @since 9.0.0
|
||||
*/
|
||||
#[Catchable('9.0.0')]
|
||||
class NotFoundException extends \Exception {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue