Open gdaniel opened 1 year ago
Just a couple of comments:
IObjectService#getId
lets specifiers provide any kind of String. ObjectService#getId(Object)
can indeed return something other than an UUID but in Sirius Web right know, I don't think there's a single valid use case which should return something other than an UUID. It should only happen in applications derived from Sirius Web.ExplorerNavigationService#getAncestors
does not support anything other than UUID, that's not what the input can be (any string is a valid input here) but in Sirius Web, as of today, we should only have UUIDs here too.While Sirius Components allows any String, Sirius Web uses UUID all the time. In order to match more closely what can be expressed with Sirius Components, we should support String
instead of UUID
as the identifier of the representation (even if we keep storing a UUID in said string). We should thus change RepresentationDescriptor#id
, the repository, the database schema etc.
The following line in
ExplorerNavigationService
produces anIllegalArgumentException
when theselectioEntryId
String is not an UUID.The exception is thrown by
UUID.fromString(String)
.Note that
ObjectService#getId(Object)
can return a non-UUID String (e.g. a URI fragment), and thegetAncestors
method can handle non-UUID IDs in the following line:It seems that the method shouldn't look for a
RepresentationDescriptor
ifselectionEntryId
is not a valid UUID.Screenshots
Relevant stack trace
Steps to reproduce
Call
ExplorerNavigationService#getAncestors
with a non-UUIDselectionEntryId
.Expected behavior
ExplorerNavigationService#getAncestors
returns the list of ancestors or an empty list when theselectionEntryId
is a non-UUID String.Actual behavior
ExplorerNavigationService#getAncestors
throws anIllegalArgumentException
.