From: Chris W. <la...@us...> - 2005-02-25 00:02:36
|
Update of /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8209/OpenInteract2 Modified Files: Action.pm Log Message: add discoverable property information (management task to come...) Index: Action.pm =================================================================== RCS file: /cvsroot/openinteract/OpenInteract2/lib/OpenInteract2/Action.pm,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** Action.pm 13 Feb 2005 20:15:15 -0000 1.67 --- Action.pm 25 Feb 2005 00:02:22 -0000 1.68 *************** *** 4,8 **** use strict; ! use base qw( OpenInteract2::ParamContainer Class::Accessor::Fast Class::Observable Class::Factory Exporter ); use Log::Log4perl qw( get_logger ); use OpenInteract2::Constants qw( :log :template ); --- 4,13 ---- use strict; ! use base qw( ! OpenInteract2::ParamContainer ! Class::Accessor::Fast ! Class::Observable ! Class::Factory ! ); use Log::Log4perl qw( get_logger ); use OpenInteract2::Constants qw( :log :template ); *************** *** 31,42 **** # See 'PROPERTIES' section below for other properties used. ! my %PROPS = map { $_ => 1 } qw( ! controller content_generator package_name ! action_type class method message_name ! task task_default task_valid task_invalid ! security_level security_required security ! url_alt url_none ! template_source ! cache_param ); --- 36,58 ---- # See 'PROPERTIES' section below for other properties used. ! my %PROPS = ( ! controller => 'OI2::Controller object: assigned at each request', ! content_generator => 'OI2::ContentGenerator object: assigned at each request', ! package_name => 'Name of package that contains this action', ! action_type => 'Parent action type; these are declared in the server configuration under "action_type"', ! class => 'Class associated with action', ! method => 'Method that always gets called for action no matter what task is assigned.', ! message_name => 'Key to use for messages deposited in request (default is action name)', ! task => 'Method to run when execute() called', ! task_default => 'Task to use if none specified in URL/invocation', ! task_valid => 'List of valid tasks available; if specified only these may be called', ! task_invalid => 'List of tasks which cannot be called (also, no task with a leading "_" may be called)', ! security_level => 'Security level found for this action + task invocation', ! security_required => 'Security level required for this action + task invocation', ! security => 'Whether to use security (yes/no)', ! url_alt => 'Alternate URLs that can be used to lookup this action', ! url_none => 'Flag to indicate that this action cannot be looked up by URL (yes/no)', ! template_source => 'Template(s) to use to generate task content; can be specified per-task', ! cache_param => 'Parameters to use when caching contnent', ); *************** *** 849,852 **** --- 865,877 ---- } + sub property_info { + return ( + %PROPS, + is_secure => 'Whether this action has security (yes/no)', + name => 'Unique name of this action', + cache_expire => 'Time content should be cached, per-task', + ); + } + # Clear out a property (since passing undef for a set won't work) *************** *** 865,869 **** my $req = CTX->request; for ( @params ) { ! $self->{params}{ $_ } = $req->param( $_ ); } } --- 890,894 ---- my $req = CTX->request; for ( @params ) { ! $self->param( $_, scalar $req->param( $_ ) ); } } |