public function addSubClass()
    {
        if(!$this->isXmlHttpRequest()){
            throw new common_exception_BadRequest('wrong request mode');
        }

        $classId = $this->getRequestParameter('id');

        $this->signatureValidator->checkSignature(
            $this->getRequestParameter('signature'),
            $classId
        );

        $this->validateInstanceRoot($classId);

        $parent = $this->getClass($classId);
        $clazz = $this->getClassService()->createSubClass($parent);
        if(!is_null($clazz) && $clazz instanceof core_kernel_classes_Class){
            $this->returnJson(array(
                'label' => $clazz->getLabel(),
                'uri'   => tao_helpers_Uri::encode($clazz->getUri())
            ));
        }
    }