|
NAMEOpenXPKI::Server::API2::EasyPluginMetaClassTrait - Moose metaclass role (aka. "trait") for API pluginsDESCRIPTIONNot intended for direct use. Please "use OpenXPKI::Server::API2::EasyPlugin;" instead.This role manages API parameters and their specifications for the API plugin classes. It will be applied when you say "use OpenXPKI::Server::API2::EasyPlugin". ATTRIBUTESparam_classesReturns a HashRef: keys are the API command names and values the auto-generated parameter classes of type Moose::Meta::Class.METHODScommand_listReturns a list with all API command names defined by the API plugin.add_param_specsAdds parameter specifications for the given API command.A new Moose::Meta::Class is created with the name ${command}_ParamObject. Attributes are added to the class that will hold the API command parameters. Type constraints specified via 'matching' are created and attached to the attributes. Parameters
new_param_objectWraps the given command parameters into an instance of an auto-generated parameter class.All parameters will be available as Moose attributes. Example: my $po = $plugin->meta->new_param_object("doit", { fish => 'cod', size => 55 }); printf "%s: %s\n", $po->fish, $po->size; A Moose::Exception::ValidationFailedForTypeConstraint will be thrown if a parameter does not fulfill the type constraints specified in the call to add_param_specs. Parameters
Visit the GSP FreeBSD Man Page Interface. |