/**
  * get vacation for account
  * 
  * @param string|Expressomail_Model_Account $_accountId
  * @return Expressomail_Model_Sieve_Vacation
  */
 public function getVacation($_accountId)
 {
     $script = $this->_getSieveScript($_accountId);
     $vacation = $script !== NULL ? $script->getVacation() : NULL;
     $result = new Expressomail_Model_Sieve_Vacation(array('id' => $_accountId instanceof Expressomail_Model_Account ? $_accountId->getId() : $_accountId));
     if ($vacation !== NULL) {
         $result->setFromFSV($vacation);
     }
     return $result;
 }
 /**
  * persist vacation data in db
  */
 protected function _saveVacation()
 {
     if (empty($this->_vacation)) {
         return;
     }
     $vacationRecord = new Expressomail_Model_Sieve_Vacation();
     $vacationRecord->setFromFSV($this->_vacation);
     $vacationRecord->account_id = $this->_accountId;
     $vacationRecord->setId($this->_accountId);
     $vacationRecord->addresses = Zend_Json::encode($vacationRecord->addresses);
     try {
         $oldVac = $this->_vacationBackend->get($vacationRecord->getId());
         $this->_vacationBackend->update($vacationRecord);
     } catch (Tinebase_Exception_NotFound $tenf) {
         $this->_vacationBackend->create($vacationRecord);
     }
 }