Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2021-06-30 02:20:33 +0300
committerGary Kim <gary@garykim.dev>2021-06-30 22:28:02 +0300
commitb78f3a57d1d05fb5f81ec8361139b64a3e54d7b0 (patch)
treec2051ba8b5b03b8e4152e7597a8a3ac4457980c6 /apps/federatedfilesharing/lib
parent6da9ccc9ee1e37932c6580e9831c74bbeeac741b (diff)
Migrate HintException to OCP
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/AddressHandler.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php2
-rw-r--r--apps/federatedfilesharing/lib/Controller/RequestHandlerController.php2
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php6
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php6
-rw-r--r--apps/federatedfilesharing/lib/Notifier.php2
-rw-r--r--apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php11
7 files changed, 15 insertions, 16 deletions
diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php
index 5b50be2a53a..d76ff9518b6 100644
--- a/apps/federatedfilesharing/lib/AddressHandler.php
+++ b/apps/federatedfilesharing/lib/AddressHandler.php
@@ -25,8 +25,8 @@
*/
namespace OCA\FederatedFileSharing;
-use OC\HintException;
use OCP\Federation\ICloudIdManager;
+use OCP\HintException;
use OCP\IL10N;
use OCP\IURLGenerator;
diff --git a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
index 6e66e7f9b4a..404077e46af 100644
--- a/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
+++ b/apps/federatedfilesharing/lib/Controller/MountPublicLinkController.php
@@ -31,7 +31,6 @@
*/
namespace OCA\FederatedFileSharing\Controller;
-use OC\HintException;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\AppFramework\Controller;
@@ -39,6 +38,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\Constants;
use OCP\Federation\ICloudIdManager;
+use OCP\HintException;
use OCP\Http\Client\IClientService;
use OCP\IL10N;
use OCP\ILogger;
diff --git a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
index 99adefde000..f19e251fc7a 100644
--- a/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
+++ b/apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
@@ -230,7 +230,7 @@ class RequestHandlerController extends OCSController {
* @return Http\DataResponse
* @throws OCSException
* @throws ShareNotFound
- * @throws \OC\HintException
+ * @throws \OCP\HintException
*/
public function acceptShare($id) {
$token = isset($_POST['token']) ? $_POST['token'] : null;
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index d5fa99ef231..52b10cd9315 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -441,7 +441,7 @@ class FederatedShareProvider implements IShareProvider {
*
* @param IShare $share
* @throws ShareNotFound
- * @throws \OC\HintException
+ * @throws \OCP\HintException
*/
protected function sendPermissionUpdate(IShare $share) {
$remoteId = $this->getRemoteId($share);
@@ -550,7 +550,7 @@ class FederatedShareProvider implements IShareProvider {
*
* @param IShare $share
* @throws ShareNotFound
- * @throws \OC\HintException
+ * @throws \OCP\HintException
*/
public function delete(IShare $share) {
[, $remote] = $this->addressHandler->splitUserRemote($share->getSharedWith());
@@ -577,7 +577,7 @@ class FederatedShareProvider implements IShareProvider {
* @param IShare $share
* @param bool $isOwner the user can either be the owner or the user who re-sahred it
* @throws ShareNotFound
- * @throws \OC\HintException
+ * @throws \OCP\HintException
*/
protected function revokeShare($share, $isOwner) {
if ($this->userManager->userExists($share->getShareOwner()) && $this->userManager->userExists($share->getSharedBy())) {
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index c72a0691fad..2a162abcd76 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -34,8 +34,8 @@ use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Http\Client\IClientService;
-use OCP\OCS\IDiscoveryService;
use OCP\ILogger;
+use OCP\OCS\IDiscoveryService;
class Notifications {
public const RESPONSE_FORMAT = 'json'; // default response format for ocs calls
@@ -97,7 +97,7 @@ class Notifications {
* @param string $sharedByFederatedId
* @param int $shareType (can be a remote user or group share)
* @return bool
- * @throws \OC\HintException
+ * @throws \OCP\HintException
* @throws \OC\ServerNotAvailableException
*/
public function sendRemoteShare($token, $shareWith, $name, $remoteId, $owner, $ownerFederatedId, $sharedBy, $sharedByFederatedId, $shareType) {
@@ -156,7 +156,7 @@ class Notifications {
* @param int $permission
* @param string $filename
* @return array|false
- * @throws \OC\HintException
+ * @throws \OCP\HintException
* @throws \OC\ServerNotAvailableException
*/
public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission, $filename) {
diff --git a/apps/federatedfilesharing/lib/Notifier.php b/apps/federatedfilesharing/lib/Notifier.php
index a551a3cca0c..fa0119010cf 100644
--- a/apps/federatedfilesharing/lib/Notifier.php
+++ b/apps/federatedfilesharing/lib/Notifier.php
@@ -27,10 +27,10 @@
*/
namespace OCA\FederatedFileSharing;
-use OC\HintException;
use OCP\Contacts\IManager;
use OCP\Federation\ICloudId;
use OCP\Federation\ICloudIdManager;
+use OCP\HintException;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use OCP\Notification\INotification;
diff --git a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
index 26b0288c354..cc6b260add6 100644
--- a/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
@@ -30,7 +30,6 @@ namespace OCA\FederatedFileSharing\OCM;
use OC\AppFramework\Http;
use OC\Files\Filesystem;
-use OC\HintException;
use OCA\FederatedFileSharing\AddressHandler;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCA\Files_Sharing\Activity\Providers\RemoteShares;
@@ -48,6 +47,7 @@ use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudFederationShare;
use OCP\Federation\ICloudIdManager;
use OCP\Files\NotFoundException;
+use OCP\HintException;
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\IGroupManager;
@@ -55,7 +55,6 @@ use OCP\ILogger;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Notification\IManager as INotificationManager;
-use OCP\Share;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -176,7 +175,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
*
* @throws ProviderCouldNotAddShareException
* @throws \OCP\AppFramework\QueryException
- * @throws \OC\HintException
+ * @throws HintException
* @since 14.0.0
*/
public function shareReceived(ICloudFederationShare $share) {
@@ -305,7 +304,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* @throws ActionNotSupportedException
* @throws AuthenticationFailedException
* @throws BadRequestException
- * @throws \OC\HintException
+ * @throws HintException
* @since 14.0.0
*/
public function notificationReceived($notificationType, $providerId, array $notification) {
@@ -373,7 +372,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* @throws ActionNotSupportedException
* @throws AuthenticationFailedException
* @throws BadRequestException
- * @throws \OC\HintException
+ * @throws HintException
*/
private function shareAccepted($id, array $notification) {
if (!$this->isS2SEnabled()) {
@@ -442,7 +441,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
* @throws AuthenticationFailedException
* @throws BadRequestException
* @throws ShareNotFound
- * @throws \OC\HintException
+ * @throws HintException
*
*/
protected function shareDeclined($id, array $notification) {