Opened 6 years ago

Closed 6 years ago

#2056 closed enhancement (fixed)

Improve API for project-specific annotations

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 3.11
Component: core Version:
Keywords: Cc:

Description

When implementing #2049, we tried to keep most of the API as backwards compatible as possible with the previous BASE version.

We need to provide a more advanced API to make it possible to work with any annotation value without having to switch the currently active project globally. The exact requirements are not yet know, but at least the following is needed:

  • Create, modify, delete and query default values even when a project is active
  • Create, modify, delete and query project-specific values for other projects than the currently active project
  • More options in the batch annotation importer to control if it should work with default or project-specific values

Change History (7)

comment:1 Changed 6 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 Changed 6 years ago by Nicklas Nordborg

(In [7296]) References #2056: Improve API for project-specific annotations

Introduced methods on the AnnotationSet class that can be used to create/read/query/delete project-specific or default annotation values no matter what the currently active project is.

The test class has been extended with additional test cases.

comment:3 Changed 6 years ago by Nicklas Nordborg

(In [7297]) References #2056: Improve API for project-specific annotations

Added support in the SnapshotManager class to force loading default of project-specific annotation values ignoring the currently active project.

comment:4 Changed 6 years ago by Nicklas Nordborg

(In [7298]) References #2056: Improve API for project-specific annotations

The AnnotationBatcher should now have support for setting a specific project to work with. A single batcher may only work with one project (or with default values) during it's lifetime. It is not possible to switch strategy between items or annotation types.

comment:5 Changed 6 years ago by Nicklas Nordborg

(In [7299]) References #2056: Improve API for project-specific annotations

Changed API methods related to this to take a Project parameter instead of the numeric ID. This is to avoid permission issues that would make it possible to create annotations for projects that the logged in user is not a member of.

comment:6 Changed 6 years ago by Nicklas Nordborg

(In [7318]) References #2056: Improve API for project-specific annotations

Added method for checking if annotation values are different from those that are already stored in the database.

comment:7 Changed 6 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.