public function edit()
    {
        if ($this->isRequestGet()) {
            try {
                $this->returnSuccess($this->getForm($this->getResourceParameter())->getData());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        if ($this->isRequestPost()) {
            try {
                $this->processForm($this->getResourceParameter());
            } catch (common_Exception $e) {
                $this->returnFailure($e);
            }
        }

        $this->returnFailure(new common_exception_MethodNotAllowed(__METHOD__ . ' only accepts GET or PUT method'));
    }