Review main Merged

23839[TASK] Clean-up responsibilities of FAL classes

Steffen Ritter CR +2 V +2 Hard +397 −101 updated 10/12/13, 08:59

Commit message

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).

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 9