The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Clustericious::RouteBuilder::Search - build routes for searching for objects

VERSION

version 1.16

SYNOPSIS

    use My::Object::Class;
    use Clustericious::RouteBuilder;
    use Clustericious::RouteBuilder::Search
            "search",
            "plurals",
            defaults => { manager_finder => "Manager::Finder::Class" },
        ;

    ...

    post => "/:plural/search" => [ plural => [ plurals() ] ] => \&do_create;

DESCRIPTION

This automates the creation of routes for searching for objects.

Manager::Finder::Class must provide the following methods :

lookup_class

given the plural of a table, look up the name of the class

The route that is created turns a JSON structure which is input as POST data into parameters for Rose::DB::Object::Manager::get_objects.

Additionally a "mode" parameters is supported, which just calls a search_$mode method within the manager class, and returns that result set to the client.

SUPER CLASS

none

SEE ALSO

Clustericious

AUTHOR

Original author: Brian Duggan

Current maintainer: Graham Ollis <plicease@cpan.org>

Contributors:

Curt Tilmes

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by NASA GSFC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.