Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1604 closed enhancement (fixed)

Support for multiple files of the same type in a FileSet

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: BASE 3.0
Component: core Version:
Keywords: Cc:

Description

This is a sub-ticket to #1153. We expect that the model we need require that lots of files can be stored and related to an item in an organized way (eg. in a FileSet). The current restriction that only allows one file for each file type is too limited.

This change is a big change that require backwards-incompatible API changes and database changes that require special handling when updgrading (eg. we must at least remove the unique constraint that restricts us to one file per file type).

Attachments (2)

datalayer.platforms.png (57.6 KB) - added by Nicklas Nordborg 10 years ago.
datalayer.platforms-2.png (57.6 KB) - added by Nicklas Nordborg 10 years ago.

Download all attachments as: .zip

Change History (15)

Changed 10 years ago by Nicklas Nordborg

Attachment: datalayer.platforms.png added

comment:1 Changed 10 years ago by Nicklas Nordborg

The updated database schema is not very different from before. There is a new property (allowMultiple) in DataFileTypeData class that is a flag indicating if more than one file of the given file type is allowed or not. The FileSetMemberData class now has support for annotations. The annotations should be accessible for inheriting from the owner item of the file set. Eg. the item that owns the file set should include the file set members as 'annotatable parents'.

comment:2 Changed 10 years ago by Nicklas Nordborg

(In [5670]) References #1604: Support for multiple files of the same type in a FileSet?

Update UML diagram.

comment:3 Changed 10 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:4 Changed 10 years ago by Nicklas Nordborg

(In [5713]) References #1604: Support for multiple files of the same type in a FileSet?

Added data and core layer classes. Started with the gui and seems to work when adding single files of a type. There are some remaining things to implement when used with multiple files. File validation is not yet fully functional. Some of the batch importers need to be fixed as well to be able to handle multiple files of the same type.

comment:5 Changed 10 years ago by Nicklas Nordborg

(In [5714]) References #1604: Support for multiple files of the same type in a FileSet?

The GUI can now be used to add multiple files of types that has enabled this.

comment:6 Changed 10 years ago by Nicklas Nordborg

(In [5716]) References #1604: Support for multiple files of the same type in a FileSet?

There is no "Validate" checkbox if none of the file types has a validator.

comment:7 Changed 10 years ago by Nicklas Nordborg

(In [5717]) References #1604: Support for multiple files of the same type in a FileSet?

The Item.ITEMSUBTYPEFILETYPE option must have a unique integer value.

comment:8 Changed 10 years ago by Nicklas Nordborg

(In [5718]) References #1604: Support for multiple files of the same type in a FileSet?

Updated Web Service API to handle multiple files of the same type.

comment:9 Changed 10 years ago by Nicklas Nordborg

(In [5719]) References #1604: Support for multiple files of the same type in a FileSet?

Batch importers now have support for adding multiple files of the same type. This must be done by having one line in the import file for each file to add.

comment:10 Changed 10 years ago by Nicklas Nordborg

(In [5721]) References #1604: Support for multiple files of the same type in a FileSet?

Added 'too many files' validation rule to the Item overview that links with the 'Allow multiple files' setting.

Changed 10 years ago by Nicklas Nordborg

Attachment: datalayer.platforms-2.png added

comment:11 Changed 10 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

Some minor changes to the UML diagram. The 'allowMultiple' flag was moved to PlatformFileTypeData since it is related to the 'required' flat already present. It also makes it possible for one platform to use one file and another platform to use multiple files. FileSetMember is no longer annotatable since it would be difficult to implement this in the gui and difficult to use the current batch importer. If the need arises we can always add it later.

I'll close this ticket now since I don't think any major issues remains. Minor issues will be fixed, other enhancements might be scheduled for BASE 3.1 or later.

comment:12 Changed 10 years ago by Nicklas Nordborg

(In [5762]) References #1604: Support for multiple files of the same type in a FileSet?

Fixed a NullPointerException? when removing the only file of a given file type from a file set.

comment:13 Changed 10 years ago by Nicklas Nordborg

(In [5763]) References #1604: Support for multiple files of the same type in a FileSet?

It was not possible to create platform variants due to compilation errors in the JSP. The edit dialog was missing options for setting "allow multiple files" of a a file type.

Note: See TracTickets for help on using tickets.