public function prepareCommitDraft()
    {
        if (null === $revision = $this->getDraft()) {
            throw new Exception\RevisionMissingException('Enable to commit: missing draft');
        }

        switch ($revision->getState()) {
            case Revision::STATE_ADDED:
            case Revision::STATE_MODIFIED:
                $revision->setRevision($revision->getRevision() + 1);
                $revision->setState(Revision::STATE_COMMITTED);

                $this->releaseDraft();

                $this->_label = $revision->getLabel();
                $this->_accept = $revision->getAccept();
                $this->_maxentry = $revision->getMaxEntry();
                $this->_minentry = $revision->getMinEntry();
                $this->_parameters = $revision->getAllParams();

                $this->setRevision($revision->getRevision())
                    ->setState(AbstractClassContent::STATE_NORMAL)
                    ->addRevision($revision)
                ;

                return $this;

            case Revision::STATE_CONFLICTED:
                throw new Exception\RevisionConflictedException('Content is in conflict, please resolve or revert it');
        }

        throw new Exception\RevisionUptodateException(sprintf('Content can not be commited (state : %s)', $revision->getState()));
    }