public function findBySelector( $selector, $media = '', $rootId = null )
    {
        $rootId = ( (int) $rootId ) ?: null;
        $rule   = $this->getMapper()
                       ->findBySelector( $selector, $media, $rootId );

        if ( empty( $rule ) )
        {
            $rule = $this->getMapper()
                         ->create( array(
                             'media'            => $media,
                             'selector'         => $selector,
                             'rootParagraphId'  => $rootId,
                         ) );
        }

        return $rule;
    }