Task #11788

Add list of VO in a resource on root context and provides a facility class to retrieve the list of scopes

Added by Luca Frosini over 1 year ago. Updated over 1 year ago.

Status:ClosedStart date:May 17, 2018
Priority:UrgentDue date:
Assignee:Massimiliano Assante% Done:


Sprint:zz - Smartgears


The class org.gcube.resourcemanagement.support.server.managers.scope.ScopeManager provides support to retrieve all available contexts starting from a file (e.g. scopedata.xml) which contains the list of VOs. The subsequest list of VREs is retrieved from the facility methods from IS.

This is very annoying because the file must be substituted when a VO is created or deleted. Moreover uses a mixed approach.

As far as I remembers during a meeting it was requested from @pasquale.pagano@isti.cnr.it that a resource containing the list of VOs on root context must be created.

I would like a class behaving like ScopeManager (I suggest the name with the keyword Context instead of scopes) which uses only the IS eliminating the needs for VO file.

scopedata.xml Magnifier - related to gcube infrastructure (612 Bytes) Roberto Cirillo, May 17, 2018 12:29 PM


#1 Updated by Luca Frosini over 1 year ago

@roberto.cirillo@isti.cnr.it or @massimiliano.assante@isti.cnr.it in the meanwhile can you provide me the scopedata.xml file for /gcube infrastructure?

#2 Updated by Roberto Cirillo over 1 year ago

#5 Updated by Massimiliano Assante over 1 year ago

  • Status changed from New to In Progress

#6 Updated by Massimiliano Assante over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Feedback

The scope data.xml is now a body of a Generic Resource that must exists in the root VO having:

    SecondaryType = "INFRASTRUCTURE";
    NAME = "VirtualOrganisation";

I added a new class to the library that performs what you ask: org.gcube.resourcemanagement.support.server.managers.context.ContextManager. The class assumes that either the token or the scope are set in the ThreadLocal vars, token has priority. Whatever context is found the query is performed on the root VO (inferred from the context found if necessary).

Usage Example:

    public void testContextManager() {
        try {
            LinkedHashMap<String, ScopeBean> contexts = ContextManager.readContexts();
            for (String c : contexts.keySet()) {
        } catch (Exception e) {

Output of the test above:




#7 Updated by Luca Frosini over 1 year ago

  • Status changed from Feedback to Closed

I seems working for me

Also available in: Atom PDF