eclipse-lyo / lyo

Eclipse Lyo, a Java SDK for OSLC-based tool integration
https://oslc.github.io/developing-oslc-applications/eclipse_lyo/eclipse-lyo.html
Eclipse Public License 2.0
14 stars 16 forks source link

OslcClient.lookupServiceProviderUrl assumes 'title' property - catalog only contains URL #510

Open dhakehurst opened 6 months ago

dhakehurst commented 6 months ago

I'm trying to use lyo to fetch data from IBM Global Configuration Manager (GC).

1) there only seems to be an OSLCConstants.OSLC_CONFIG (oslc_config) - the rootservices of GC also provides a 'global_config'.

2) The catalog returned contains serviceProvider entries with only a 'rdf:resource' property, The OslcClient.lookupServiceProviderUrl assumes 'title' property. The title is only available when fetching the rdf:resource.

Maybe this is a bug in the IBM GC catalog, but the OslcClient.lookupServiceProviderUrl should provide a more useful error than simply a ResourceNotFound. It should indicate a non-conformant catalog (if that is the issue) or actually load the resource to get the title.

berezovskyi commented 4 months ago

Hello, @dhakehurst, welcome to Lyo! Apologies for a late reply, I've been not that active in the project and only noticed your GH issue now.

  1. I think global_config is an IBM-specific extension to OSLC Config. That domain is not part of Lyo but we are open to having it contributed to Lyo (right, @Jad-el-khoury?). The values should be accessible via extended properties as usual.
  2. I will leave this one to @Jad-el-khoury; he has recent experience with Config responses. In theory, the fallback GET request to the resource could be made if the title property is missing. But then we'll need some request concurrency strategy and nested error reporting strategy.
  3. I agree that ResourceNotFound is not a good exception to throw. I am open to your improvement suggestions.
Jad-el-khoury commented 3 months ago

Hi @dhakehurst ! I don't recognize the problem directly. But if you have gone this far to identify the problem and have a proposal, please provide a solution on the Lyo (A pull request) and we can take it from there?