seperate setFileInfo from ICheck
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
687edb4bc8
commit
fd2de58503
|
@ -42,14 +42,6 @@ abstract class AbstractStringCheck implements ICheck {
|
|||
$this->l = $l;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path) {
|
||||
// Nothing changes here with a different path
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
@ -27,8 +27,9 @@ use OCP\Files\IMimeTypeDetector;
|
|||
use OCP\Files\Storage\IStorage;
|
||||
use OCP\IL10N;
|
||||
use OCP\IRequest;
|
||||
use OCP\WorkflowEngine\IFileCheck;
|
||||
|
||||
class FileMimeType extends AbstractStringCheck {
|
||||
class FileMimeType extends AbstractStringCheck implements IFileCheck {
|
||||
|
||||
/** @var array */
|
||||
protected $mimeType;
|
||||
|
|
|
@ -26,8 +26,9 @@ use OCA\WorkflowEngine\Entity\File;
|
|||
use OCP\Files\Storage\IStorage;
|
||||
use OCP\IL10N;
|
||||
use OCP\IRequest;
|
||||
use OCP\WorkflowEngine\IFileCheck;
|
||||
|
||||
class FileName extends AbstractStringCheck {
|
||||
class FileName extends AbstractStringCheck implements IFileCheck {
|
||||
|
||||
/** @var IRequest */
|
||||
protected $request;
|
||||
|
|
|
@ -49,13 +49,6 @@ class FileSize implements ICheck {
|
|||
$this->request = $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @param string $value
|
||||
|
|
|
@ -31,8 +31,9 @@ use OCP\SystemTag\ISystemTagManager;
|
|||
use OCP\SystemTag\ISystemTagObjectMapper;
|
||||
use OCP\SystemTag\TagNotFoundException;
|
||||
use OCP\WorkflowEngine\ICheck;
|
||||
use OCP\WorkflowEngine\IFileCheck;
|
||||
|
||||
class FileSystemTags implements ICheck {
|
||||
class FileSystemTags implements ICheck, IFileCheck {
|
||||
|
||||
/** @var array */
|
||||
protected $fileIds;
|
||||
|
|
|
@ -44,14 +44,6 @@ class RequestRemoteAddress implements ICheck {
|
|||
$this->request = $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path) {
|
||||
// A different path doesn't change time, so nothing to do here.
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @param string $value
|
||||
|
|
|
@ -49,14 +49,6 @@ class RequestTime implements ICheck {
|
|||
$this->timeFactory = $timeFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path) {
|
||||
// A different path doesn't change time, so nothing to do here.
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @param string $value
|
||||
|
|
|
@ -58,14 +58,6 @@ class UserGroupMembership implements ICheck {
|
|||
$this->l = $l;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path) {
|
||||
// A different path doesn't change group memberships, so nothing to do here.
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @param string $value
|
||||
|
|
|
@ -444,6 +444,7 @@ return array(
|
|||
'OCP\\WorkflowEngine\\IEntity' => $baseDir . '/lib/public/WorkflowEngine/IEntity.php',
|
||||
'OCP\\WorkflowEngine\\IEntityAware' => $baseDir . '/lib/public/WorkflowEngine/IEntityAware.php',
|
||||
'OCP\\WorkflowEngine\\IEntityEvent' => $baseDir . '/lib/public/WorkflowEngine/IEntityEvent.php',
|
||||
'OCP\\WorkflowEngine\\IFileCheck' => $baseDir . '/lib/public/WorkflowEngine/IFileCheck.php',
|
||||
'OCP\\WorkflowEngine\\IManager' => $baseDir . '/lib/public/WorkflowEngine/IManager.php',
|
||||
'OCP\\WorkflowEngine\\IOperation' => $baseDir . '/lib/public/WorkflowEngine/IOperation.php',
|
||||
'OCP\\WorkflowEngine\\ISpecificOperation' => $baseDir . '/lib/public/WorkflowEngine/ISpecificOperation.php',
|
||||
|
|
|
@ -478,6 +478,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
|||
'OCP\\WorkflowEngine\\IEntity' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntity.php',
|
||||
'OCP\\WorkflowEngine\\IEntityAware' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntityAware.php',
|
||||
'OCP\\WorkflowEngine\\IEntityEvent' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IEntityEvent.php',
|
||||
'OCP\\WorkflowEngine\\IFileCheck' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IFileCheck.php',
|
||||
'OCP\\WorkflowEngine\\IManager' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IManager.php',
|
||||
'OCP\\WorkflowEngine\\IOperation' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/IOperation.php',
|
||||
'OCP\\WorkflowEngine\\ISpecificOperation' => __DIR__ . '/../../..' . '/lib/public/WorkflowEngine/ISpecificOperation.php',
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
/**
|
||||
* @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>
|
||||
*
|
||||
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
|
||||
* @author Morris Jobke <hey@morrisjobke.de>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
|
@ -23,9 +24,6 @@
|
|||
|
||||
namespace OCP\WorkflowEngine;
|
||||
|
||||
|
||||
use OCP\Files\Storage\IStorage;
|
||||
|
||||
/**
|
||||
* Interface ICheck
|
||||
*
|
||||
|
@ -33,13 +31,6 @@ use OCP\Files\Storage\IStorage;
|
|||
* @since 9.1
|
||||
*/
|
||||
interface ICheck {
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
* @since 9.1
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path);
|
||||
|
||||
/**
|
||||
* @param string $operator
|
||||
* @param string $value
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de>
|
||||
*
|
||||
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCP\WorkflowEngine;
|
||||
|
||||
|
||||
use OCP\Files\Storage\IStorage;
|
||||
|
||||
/**
|
||||
* Interface IFileCheck
|
||||
*
|
||||
* @package OCP\WorkflowEngine
|
||||
* @since 18.0.0
|
||||
*/
|
||||
interface IFileCheck {
|
||||
/**
|
||||
* @param IStorage $storage
|
||||
* @param string $path
|
||||
* @since 18.0.0
|
||||
*/
|
||||
public function setFileInfo(IStorage $storage, $path);
|
||||
|
||||
}
|
Loading…
Reference in New Issue