public function getMetadataAction(Page $page)
    {
        $metadata = null !== $page->getMetaData() ? $page->getMetaData()->jsonSerialize() : array();
        if (empty($metadata)) {
            $metadata = $this->application->getContainer()->get('nestednode.metadata.resolver')->resolve($page);
        }

        return $this->createJsonResponse($metadata);
    }