module Riddl::Utils::Properties

Constants

PROPERTIES_SCHEMA_XSL_RNG
VERSION_MAJOR
VERSION_MINOR

Public Class Methods

implementation(backend,handler=nil,details=:production) click to toggle source
# File lib/ruby/riddl/utils/properties.rb, line 9
def self::implementation(backend,handler=nil,details=:production)
  unless handler.nil? || (handler.is_a? Riddl::Utils::Properties::HandlerBase)
    raise "handler not a subclass of HandlerBase"
  end
  Proc.new do
    run          Riddl::Utils::Properties::All,           backend, handler if get    '*'
    run          Riddl::Utils::Properties::Query,         backend, handler if get    'query'
    on resource 'schema' do
      run        Riddl::Utils::Properties::Schema,        backend          if get
      on resource 'rng' do
        run      Riddl::Utils::Properties::RngSchema,     backend          if get
      end
    end
    on resource 'values' do
      run        Riddl::Utils::Properties::Properties,    backend, handler if get
      run        Riddl::Utils::Properties::AddProperty,   backend, handler if post   'property'
      run        Riddl::Utils::Properties::AddProperties, backend, handler if put    'properties'
      on resource do
        run      Riddl::Utils::Properties::GetContent,    backend, handler if get
        run      Riddl::Utils::Properties::DelContent,    backend, handler if delete
        run      Riddl::Utils::Properties::AddContent,    backend, handler if post   'addcontent'
        run      Riddl::Utils::Properties::UpdContent,    backend, handler if put    'updcontent'
        run      Riddl::Utils::Properties::PtcContent,    backend, handler if patch  'updcontent'
        on resource do
          run    Riddl::Utils::Properties::GetContent,    backend, handler if get
          run    Riddl::Utils::Properties::DelContent,    backend, handler if delete
          run    Riddl::Utils::Properties::UpdContent,    backend, handler if put    'updcontent'
          on resource do
            run  Riddl::Utils::Properties::GetContent,    backend, handler if get
          end
        end
      end
    end
  end
end