/**
  * @param boolean $orderAscending
  * @param int $groupId
  * @param int $uploadId
  * @param int $uploadTreeId
  * @return string
  */
 protected function doLicenses($orderAscending, $groupId, $uploadId, $uploadTreeId)
 {
     $itemTreeBounds = $this->uploadDao->getItemTreeBoundsFromUploadId($uploadTreeId, $uploadId);
     list($licenseDecisions, $removed) = $this->clearingDecisionEventProcessor->getCurrentClearings($itemTreeBounds, $groupId);
     $licenseRefs = $this->licenseDao->getConclusionLicenseRefs(Auth::getGroupId(), $_GET['sSearch'], $orderAscending, array_keys($licenseDecisions));
     $licenses = array();
     foreach ($licenseRefs as $licenseRef) {
         $licenseId = $licenseRef->getId();
         $shortNameWithFullTextLink = $this->urlBuilder->getLicenseTextUrl($licenseRef);
         $actionLink = "<a href=\"javascript:;\" onClick=\"addLicense({$uploadId}, {$uploadTreeId}, {$licenseId});\"><img src=\"images/space_16.png\" class=\"add\"/></a>";
         $licenses[] = array($shortNameWithFullTextLink, $actionLink);
     }
     return array('sEcho' => intval($_GET['sEcho']), 'aaData' => $licenses, 'iTotalRecords' => count($licenses), 'iTotalDisplayRecords' => count($licenses));
 }