public function validate($scheme, $id)
{
try {
switch ($scheme) {
case 'ezcontent':
$this->contentService->loadContentInfo($id);
break;
case 'ezremote':
$this->contentService->loadContentByRemoteId($id);
break;
case 'ezlocation':
$this->locationService->loadLocation($id);
break;
default:
throw new InvalidArgumentException($scheme, "Given scheme '{$scheme}' is not supported.");
}
} catch (NotFoundException $e) {
return false;
}
return true;
}