Removed unnecessary services

This commit is contained in:
Kevin Frantz 2019-04-13 21:31:02 +02:00
parent 9530944d17
commit b90456fd38

View File

@ -5,9 +5,7 @@ namespace Infinito\Domain\ProcessManagement;
use Infinito\DBAL\Types\ActionType;
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
use Infinito\Domain\SecureManagement\SecureRequestedRightCheckerServiceInterface;
use Infinito\Domain\FormManagement\RequestedActionFormBuilderServiceInterface;
use Infinito\Domain\ActionManagement\ActionHandlerServiceInterface;
use Infinito\Domain\TemplateManagement\TemplateNameServiceInterface;
use Infinito\Entity\Source\Primitive\Text\TextSource;
use Infinito\Domain\DataAccessManagement\ActionsResultsDAOServiceInterface;
@ -31,35 +29,21 @@ final class ProcessService implements ProcessServiceInterface
*/
private $actionHandlerService;
/**
* @var TemplateNameServiceInterface
*/
private $templateNameService;
/**
* @var ActionsResultsDAOServiceInterface
*/
private $actionsResultsDAOService;
/**
* @var RequestedActionFormBuilderServiceInterface
*/
private $requestedActionFormBuilderService;
/**
* @param ActionHandlerServiceInterface $actionHandlerService
* @param TemplateNameServiceInterface $templateNameService
* @param ActionsResultsDAOServiceInterface $actionTemplateDataStore
* @param RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService
* @param RequestedActionServiceInterface $requestedActionService
* @param SecureRequestedRightCheckerServiceInterface $secureRequestedRightCheckerService
*/
public function __construct(ActionHandlerServiceInterface $actionHandlerService, TemplateNameServiceInterface $templateNameService, ActionsResultsDAOServiceInterface $actionTemplateDataStore, RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService, RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerServiceInterface $secureRequestedRightCheckerService)
public function __construct(ActionHandlerServiceInterface $actionHandlerService, ActionsResultsDAOServiceInterface $actionTemplateDataStore, RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerServiceInterface $secureRequestedRightCheckerService)
{
$this->actionHandlerService = $actionHandlerService;
$this->templateNameService = $templateNameService;
$this->actionsResultsDAOService = $actionTemplateDataStore;
$this->requestedActionFormBuilderService = $requestedActionFormBuilderService;
$this->requestedActionService = $requestedActionService;
$this->secureRequestedRightCheckerService = $secureRequestedRightCheckerService;
}
@ -74,7 +58,6 @@ final class ProcessService implements ProcessServiceInterface
{
if ($this->requestedActionService->hasRequestedEntity() && $this->requestedActionService->getRequestedEntity()->hasIdentity()) {
// READ VIEW
// $this->requestedActionService->setActionType(ActionType::READ);
if ($this->secureRequestedRightCheckerService->check($this->requestedActionService)) {
$read = $this->actionHandlerService->handle();
$this->actionsResultsDAOService->setData(ActionType::READ, $read);
@ -88,7 +71,6 @@ final class ProcessService implements ProcessServiceInterface
// DELETE VIEW
// EXECUTE VIEW
} else {
// @todo move to view
// CREATE
$this->requestedActionService->getRequestedEntity()->setClass(TextSource::class);
$this->actionsResultsDAOService->setData(ActionType::CREATE, null);