14 namespace Fossology\UI\Api\Controllers;
20 use Psr\Http\Message\ServerRequestInterface;
34 $this->viewInfo = $this->restHelper->getPlugin(
'view_info');
48 $uploadPk = $args[
"id"];
49 $uploadTreeId = $args[
"itemId"];
53 $response_view = $this->viewInfo->ShowView($uploadPk, $uploadTreeId);
54 $response_meta = $this->viewInfo->ShowMetaView($uploadPk, $uploadTreeId);
55 $response_package_info = $this->viewInfo->ShowPackageInfo($uploadPk, $uploadTreeId);
56 $response_tag_info = $this->viewInfo->ShowTagInfo($uploadPk, $uploadTreeId);
57 $response_reuse_info = $this->viewInfo->showReuseInfo($uploadPk);
58 $finalValue =
new FileInfo($response_view, $response_meta, $response_package_info, $response_tag_info, $response_reuse_info);
59 return $response->withJson($finalValue->getarray($apiVersion), 200);
getItemInfo($request, $response, $args)
Base controller for REST calls.
isItemExists(int $uploadId, int $itemId)
Override Slim response for withJson function.
static getVersion(ServerRequestInterface $request)
FileInfo model to contain general error and return values.