Opened 8 years ago

Last modified 2 years ago

#911 closed task

MeLuDI should support multiple projects — at Version 6

Reported by: olle Owned by: olle
Priority: major Milestone: MeLuDI v1.5.0
Component: net.sf.basedb.meludi Keywords:
Cc:

Description (last modified by olle)

MeLuDI should support multiple projects using the same major pipeline of laboratory registration steps. The projects should be run on the same BASE installation, but as separate BASE project items.

MeLuDI should allow each project to have:

  • Its own set of item counters.
  • Its own counter for sample label generation purposes.
  • Its own sample name prefix.
  • Its project name printed on protocols generated by MeLuDI.

Change History (6)

comment:1 by olle, 8 years ago

Status: newassigned

Ticket accepted.

comment:2 by olle, 8 years ago

Traceability note:

  • MeLuDi v.1.0 was introduced in Ticket #690 (MeLuDi - Registration wizard for melanoma-lung cancer projects).
  • MeLuDi v.1.1 was introduced in Ticket #718 (MeLuDi v.1.0 bug fixes and improvements).
  • MeLuDi v.1.2 was introduced in Ticket #725 (MeLuDi v.1.1 bug fixes and improvements).
  • MeLuDI v.1.2.1 was introduced in Ticket #759 (MeLuDi v.1.2 bug fixes and improvements).
  • MeLuDI v.1.2.2 was introduced in Ticket #767 (MeLuDI v.1.2.1 bug fixes and improvements).
  • MeLuDI v.1.2.3 was introduced in Ticket #768 (MeLuDI v.1.2.2 bug fixes and improvements).
  • MeLuDI v.1.2.4 was introduced in Ticket #777 (MeLuDI v.1.2.3 bug fixes and improvements).
  • MeLuDI v.1.2.5 was introduced in Ticket #786 (MeLuDI v.1.2.4 bug fixes and improvements).
  • MeLuDI v.1.3.1 was introduced in Ticket #792 (MeLuDI v.1.2.5 bug fixes and improvements).
  • First version of library preparation wizards was introduced in Ticket #801 (MeLuDI library preparation wizards first version).
  • MeLuDI v.1.3.2 was introduced in Ticket #802 (MeLuDI v.1.3.1 bug fixes and improvements).
  • MeLuDI v.1.3.3 was introduced in Ticket #815 (MeLuDI v.1.3.2 bug fixes and improvements).
  • MeLuDI v.1.4.0 was introduced in Ticket #816 (MeLuDI v.1.3.3 bug fixes and improvements).
  • MeLuDI v.1.4.1 was introduced in Ticket #836 (MeLuDI v.1.4.0 bug fixes and improvements).
  • MeLuDI v.1.4.2 was introduced in Ticket #837 (MeLuDI v.1.4.1 bug fixes and improvements).
  • MeLuDI v.1.4.3 was introduced in Ticket #880 (MeLuDI v.1.4.2 bug fixes and improvements).

comment:3 by olle, 8 years ago

(In [4125]) Refs #911. Updates due to version number change to "1.5.0-dev".

  1. Version number changed to "1.5.0-dev":
    a. Outermost Ant XML build file build.xml in / updated.
    b. Extensions XML configuration file extensions.xml in META-INF/ updated.
    c. Javascript file meludi-2.js in resources/ updated.
    d. Javascript file samplereportgenerator.js in resources/reports/ updated.
    e. Java class/file Meludi.java in src/net/sf/basedb/meludi/ updated.

comment:4 by olle, 8 years ago

Design discussion:

  • Allowing each BASE project to have its own set of item counters is not trivial, since the counters are managed by a service, that in the original version assumed that only one project, named "MeLuDI", was of interest (Reggie makes the same assumption for the "SCAN-B" project). A solution where the service calculates item counters for all projects, and the set for the currently active project is then return from the SessionServlet, has been tested and seems to work:
  1. Java class/file Meludi.java in src/net/sf/basedb/meludi/ is updated with new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) added. It returns a hash map of session controls, where each project is active, with project id as key. It is meant to be used instead of public static synchronized method SessionControl getRootSessionControl(SessionControl systemSc) for item counting purposes.
  2. Java class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated to count items for all projects, and return counters for a requested project, given the id value for the latter. Old code is retained, but commented out, for comparison:
    a. Private volatile instance variable JSONObject currentCounts replaced by private volatile instance variable JSONObject currentCountsAllProjects (in principle the old variable could have been used, but since the data contents have changed, a new name seemed more appropriate).
    b. Public synchronized methods void start(SessionControl systemSc, Extension ext) and void stop() updated to use the new JSONObject instance variable currentCountsAllProjects instead of currentCounts.
    c. Public method JSONObject getCurrentCounts() commented out, as it is replaced by new public method JSONObject getCurrentProjectCounts(Integer projectId).
    d. New public method JSONObject getCurrentProjectCounts(Integer projectId) added. It returns a JSONObject with item counts for the active project stored in new private volatile instance variable JSONObject currentCountsAllProjects, with project id values as keys.
    e. Package private method void count() updated to call Meludi new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) to get a hash map of session controls for different active projects, and then calculate item counts for each project and store the results in JSONObject instance variable currentCountsAllProjects with the project id values as keys.
  3. Java servlet class/file SessionServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCounters" to call CounterService new public method JSONObject getCurrentProjectCounts(Integer projectId) to get a JSONObject with item counts for the active project, instead of JSONObject getCurrentCounts().

comment:5 by olle, 8 years ago

(In [4127]) Refs #911. MeLuDI updated to display item counters for the active project:

  1. Java class/file Meludi.java in src/net/sf/basedb/meludi/ is updated with new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) added. It returns a hash map of session controls, where each project is active, with project id as key. It is meant to be used instead of public static synchronized method SessionControl getRootSessionControl(SessionControl systemSc) for item counting purposes.
  2. Java class/file CounterService.java in src/net/sf/basedb/meludi/counter/ updated to count items for all projects, and return counters for a requested project, given the id value for the latter. Old code is retained, but commented out, for comparison:
    a. Private volatile instance variable JSONObject currentCounts replaced by private volatile instance variable JSONObject currentCountsAllProjects (in principle the old variable could have been used, but since the data contents have changed, a new name seemed more appropriate).
    b. Public synchronized methods void start(SessionControl systemSc, Extension ext) and void stop() updated to use the new JSONObject instance variable currentCountsAllProjects instead of currentCounts.
    c. Public method JSONObject getCurrentCounts() commented out, as it is replaced by new public method JSONObject getCurrentProjectCounts(Integer projectId).
    d. New public method JSONObject getCurrentProjectCounts(Integer projectId) added. It returns a JSONObject with item counts for the active project stored in new private volatile instance variable JSONObject currentCountsAllProjects, with project id values as keys.
    e. Package private method void count() updated to call Meludi new public static synchronized method HashMap<Integer,SessionControl> getRootSessionControlHM(SessionControl systemSc) to get a hash map of session controls for different active projects, and then calculate item counts for each project and store the results in JSONObject instance variable currentCountsAllProjects with the project id values as keys.
  3. Java servlet class/file SessionServlet.java in src/net/sf/basedb/meludi/servlet/ updated in protected method void doGet(HttpServletRequest req, HttpServletResponse resp) for command "GetCounters" to call CounterService new public method JSONObject getCurrentProjectCounts(Integer projectId) to get a JSONObject with item counts for the active project, instead of JSONObject getCurrentCounts().

comment:6 by olle, 8 years ago

Description: modified (diff)

Ticket description updated by adding missing "label" specification in second item in request list.

Note: See TracTickets for help on using tickets.