@Override public URL create(Entity entity, Tenant tenant, URLType type) { Preconditions.checkNotNull(entity, "Cannot create URL for a null entity"); // Check against CM if there is a entity URL factory registered with the type reference of // EntityURLFactory<EntityClass>, if not, use the "generic" (in the sense of default) // URL creation provided by super.create() try { EntityURLFactory urlFactory = this.componentManager.getInstance(entityURLFactoryOf(entity.getClass()).getType()); if (urlFactory != null) { return urlFactory.create(entity, tenant, type); } } catch (ComponentLookupException e) { // Ignore, will return later } return super.create(entity, tenant, type); }