public function loadLocationByRemoteId($remoteId)
{
if (!is_string($remoteId)) {
throw new InvalidArgumentValue('remoteId', $remoteId);
}
$spiLocation = $this->persistenceHandler->locationHandler()->loadByRemoteId($remoteId);
$location = $this->domainMapper->buildLocationDomainObject($spiLocation);
if (!$this->repository->canUser('content', 'read', $location->getContentInfo(), $location)) {
throw new UnauthorizedException('content', 'read');
}
return $location;
}