Skip to content

Attrib classes

Henne Vogelsang edited this page Oct 18, 2017 · 7 revisions

What are Attributes in OBS?

Users can create an attribute (Attrib) of specific type (AttribType) with a value (AttribValue) on projects/packages. Some attributes are used to store meta information, others to influence behavior of OBS workflows.

What does each class represent?

Attrib - An attribute for a project/package. This is what the user defines.

AttribAllowedValue - Defines the values that may be chosen for when creating an Attrib with a certain AttribType.

AttribDefaultValue - Defines the default value that may be chosen for an Attrib of a certain AttribType.

AttribIssue - A many-to-many join that relates Attribs to Issues.

AttribNamespace - A namespace grouping for AttribTypes.

AttribNamespaceModifiableBy - Defines who has access to modify AttribNamespaces.

AttribType - Defines the type of Attrib.

AttribTypeModifiableBy - Defines who has access to modify AttribTypes.

AttribValue - What the values of an Attrib are.

How do the models relate to each other?

The grand secret of how you can understand this

Every AttribNamespace is basically a database on top of our database. Say what? Look at this:

Database vs. AttribNamespace

Now as we expose this to via our api we need to configure who is able to CRUD the database (AttribNamespaceModifiableBy) and the table (AttribTypeModifiableBy). There you go, a database on top of a database...

Clone this wiki locally