Metadata function on `Packages::Package`

Context

Packages::Package is the generic model for any package. When custom attributes are needed for a given package type, a Packages::XXXMetadatum model is created (with its corresponding table).

Refactoring

It could be really useful to add a #metadata function to Packages::Package which would read the proper metadata table based on the package type and gather all the custom attributes. Perhaps, this function should return a Hash with the key as the attribute name and the value as the attribute value.

Example for a maven package:

package.metadata # { app_group: "XXX", app_name: "XXX", app_version: "XXX" }

This could simplify things when the UI has to read those custom attributes to display them.

Assignee Loading
Time tracking Loading