[TASK] Clean-up responsibilities of FAL classes 39/23839/14
authorSteffen Ritter <info@rs-websystems.de>
Sun, 15 Sep 2013 13:40:17 +0000 (15:40 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sat, 12 Oct 2013 08:59:23 +0000 (10:59 +0200)
commit823f1d82e52b08b923333b32f824ec75480b3a7c
tree2b0f3f4d7d16ec0b099366bb0353c6b930a8158e
parent376d3b521b7ef0857daf266dfb408569b1100267
[TASK] Clean-up responsibilities of FAL classes

The FileRepository, ResourceStorage and ResourceFactory all somehow
take care of creating files, managing files and their data.  Getting a
file from ResourceStorage->getFile never involves the index-Records and
even if index records exists the driver always needs to query all file
information out of the filesystem to create FileObject.

As we always expect the index-record to be up to date we can rely on
that and must not query the file-system for every bit of information.
In addition creating objects without looking for the record first
renders the FAL API useless. This patch introduces a
FileIndexRepository which only deals with these kind of records and
deprecates the methods within the FileRepository.

In addition it moves around the "file-object creation logic" so this is
dealt with at a central place: The Resource Factory. Finally the
ResourceFactory always uses to get an IndexRecord from the newly
introduced Repository. If the FileInfo is not present, it queries the
Storage for the fileInfo (from the Driver).

Releases: 6.2
Resolves: #51528
Change-Id: I6ceeb8db4dd4e470e7c72dcfbc2121093411da75
Reviewed-on: https://review.typo3.org/23839
Reviewed-by: Ernesto Baschny
Tested-by: Ernesto Baschny
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/FileRepository.php
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/IndexerService.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php
typo3/sysext/install/Classes/Updates/TtContentUploadsUpdateWizard.php