/**
  * Publish a ServicePack.
  *
  */
 protected function publishAction()
 {
     if (!$this->_hasParam('id')) {
         throw new InvalidArgumentException("Null Identifier recived");
     }
     $spId = $this->_getParam('id');
     if (!$this->getRequest()->isPut()) {
         throw new UnexpectedException("Resquest must be PUT");
     }
     if (!strlen((string) $spId)) {
         throw new InvalidArgumentException("Null Identifier recived");
     }
     $sp = $this->_spSrv->load($spId);
     if (empty($sp)) {
         throw new NotFoundException("ServicePack {$spId} not found", 404);
     }
     $this->_helper->allowed('read', $sp);
     $this->_helper->allowed('publish', $sp);
     $this->view->data = $this->_spSrv->publish($sp);
 }