Entity broker and entities ID

Description

It seems that EntityBroker doesn't accept some result given by ContentHostingContentProducer.

SearchEntityProvider.getEntities() returns a List of SearchResultEntity which has a attribute (at least a getter) "id".
EntityReference.checkPrefixId() checks the id (with reflection) of the entities returned, and they can't contain some specific characters (or rather they can only contain some specific chars) such as "/".

Unfortunately ContentHostingContentProducer can create results with IDs like "/group/f071947c-2cbd-41d9-bcdc-8f53661f797e/catalina.txt", which makes EntityBroker crash.

Attachments

1

Activity

Show:

Matthew Jones April 24, 2018 at 10:34 AM

Bulk closing issues that have not been updated since 2015 and earlier. Please reopen if this is still an issue and you have new information or if this is a feature you'd like to still have consideration for.

Colin Hebert May 17, 2012 at 6:48 AM

Here is a patch which fixes this issue, it removes the CollectionResolvable interface and replace it with an ActionsExecutable interface (which allows to remove the useless "getEntity" method).

getEntities is now a customAction (available through direct/search/search.json).

The SearchResultEntity class now provides a method getContentId() instead of getId() to avoid it to be picked up as an entityId by entity broker.

Won't Fix

Details

Priority

Affects versions

Components

Assignee

Reporter

Created May 17, 2012 at 6:39 AM
Updated April 24, 2018 at 10:34 AM
Resolved April 24, 2018 at 10:34 AM