diff options
| author | fukachan <fukachan> | 2005-07-20 10:37:40 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-07-20 10:37:40 +0000 |
| commit | 4829badef574589c3e6fd9588a6ffc482322fa1a (patch) | |
| tree | dd2ae298b39405f1a4c5a5f69775b83d3d3c97c1 /fml/doc/en/tutorial/command | |
| parent | 8295ed65d40f99906e12bfb945cf51be18d09ce8 (diff) | |
| download | fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.gz fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.bz2 fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.zip | |
translated.
Diffstat (limited to 'fml/doc/en/tutorial/command')
| -rw-r--r-- | fml/doc/en/tutorial/command/chapter.sgml | 4 | ||||
| -rw-r--r-- | fml/doc/en/tutorial/command/dataflow.sgml | 91 | ||||
| -rw-r--r-- | fml/doc/en/tutorial/command/extension.sgml | 35 | ||||
| -rw-r--r-- | fml/doc/en/tutorial/command/internal.sgml | 51 | ||||
| -rw-r--r-- | fml/doc/en/tutorial/command/module.sgml | 4 |
5 files changed, 152 insertions, 33 deletions
diff --git a/fml/doc/en/tutorial/command/chapter.sgml b/fml/doc/en/tutorial/command/chapter.sgml index c47cb8b9..2662b58a 100644 --- a/fml/doc/en/tutorial/command/chapter.sgml +++ b/fml/doc/en/tutorial/command/chapter.sgml @@ -1,9 +1,9 @@ <!-- - $FML: chapter.sgml,v 1.2 2003/07/26 09:10:40 fukachan Exp $ + $FML: chapter.sgml,v 1.3 2003/08/02 03:05:53 fukachan Exp $ $jaFML: chapter.sgml,v 1.7 2002/12/25 11:50:42 fukachan Exp $ --> -<chapter> +<chapter id="fml.command.modules"> <title> Command (command mail, CUI and GUI) </title> diff --git a/fml/doc/en/tutorial/command/dataflow.sgml b/fml/doc/en/tutorial/command/dataflow.sgml index ff3750d3..37d1976b 100644 --- a/fml/doc/en/tutorial/command/dataflow.sgml +++ b/fml/doc/en/tutorial/command/dataflow.sgml @@ -1,5 +1,5 @@ <!-- - $FML: dataflow.sgml,v 1.2 2003/07/26 09:10:40 fukachan Exp $ + $FML: dataflow.sgml,v 1.3 2003/08/02 03:05:53 fukachan Exp $ $jaFML: dataflow.sgml,v 1.1 2002/12/25 11:50:42 fukachan Exp $ --> @@ -10,6 +10,93 @@ </title> -<graphic entityref="image.command.dataflow"></graphic> +<!-- + <graphic entityref="image.command.dataflow"></graphic> +--> + +<para> +All command processing calls FML::Command::MODE::COMMAND class via +FML::Command class. GUI, CUI and command mail has different pre +processing stage. +</para> + + +<sect2> + <title> + command mail procssing + </title> + +<caution> +<para> +We adopt new frame work after 2004/03/05. +</para> +</caution> + +<para> +Firstly, parse and analyze each line. +</para> + +<para> +An empty line is ignored. +The buffer is clean up. +After them, check if the command line is allowed in our context. +</para> + +<para> +For example, +</para> + +<para> +1) if anonymous command such as "guide" or "subscribe", call command +processor. Allowd list of commands are defined in +$anonymous_command_mail_allowed_commands. +</para> + +<para> +2) if a normal command which are allowd for a member, check other +conditions based on rules of $command_mail_restrictions. Allowd list +of commands are defined in $user_command_mail_allowed_commands. +</para> + +<para> +Command dispatcher checks the return path dependent on the command and +the syntax, finally execute the command via FML::Command class. +This process runs as normal user priviledge. +</para> + +<para> +"admin" command needs administrator priviledge. So an exception. If +"admin" command is given, process user priviledged "admin" command and +execute FML::Command::User::admin class. +<footnote> +<para> +admin command is defined in $user_command_mail_allowed_commands +as a normal user command. +</para> +</footnote> +In this user command class, checks the context by +$admin_command_mail_restrictions to see that the current context has +remote administrator priveledge. If enough priviledge is satisfied, +execute FML::Command::Admin::COMMAND class via FML::Command again. +FML::Command::Admin::COMMAND needs admin priviledge. +</para> + +</sect2> + + +<sect2> + <title> + CUI (makefml/fml) + </title> + +<para> +If you use this program, you can have priveledge to login the mailing +list server host and switch user to the user "fml". So please use CUI +as you like. +In this case, CUI calls FML::Command::Admin::COMMAND directly. +</para> + +</sect2> + </sect1> diff --git a/fml/doc/en/tutorial/command/extension.sgml b/fml/doc/en/tutorial/command/extension.sgml index 53f7018e..3c10fa11 100644 --- a/fml/doc/en/tutorial/command/extension.sgml +++ b/fml/doc/en/tutorial/command/extension.sgml @@ -1,5 +1,5 @@ <!-- - $FML: extension.sgml,v 1.1 2003/07/24 15:37:35 fukachan Exp $ + $FML: extension.sgml,v 1.2 2003/08/02 03:05:53 fukachan Exp $ $jaFML: extension.sgml,v 1.10 2003/04/15 14:51:36 fukachan Exp $ --> @@ -18,7 +18,7 @@ you need to put the module you wrote at /usr/local/lib/fml/site_local/ </screen> . -If you permit the command is used only for the specifiec ML +If the command is allowed only for the specifiec ML (e.g. elena ML), put it at the ML local library path <screen> /var/spool/ml/elena/local/lib/ @@ -26,10 +26,6 @@ If you permit the command is used only for the specifiec ML where $ml_home_dir = /var/spool/ml/elena. </para> -<para> -In this section, we consider the former case. In both cases, the way -of writing the module codes are same. Only path differs. -</para> </warning> @@ -40,18 +36,22 @@ of writing the module codes are same. Only path differs. <para> Consider to make a new user command "uja". -Pick up a command at FML::Command, cut and paste it. +Pick up a command at FML::Command::User, cut and paste it. Please put it at <screen> /usr/local/lib/fml/site_local/FML/Command/User/uja.pm </screen> -Edit site_default_config.cf to add it into $commands_for_user +To permit the use of it for all ML's, +edit site_default_config.cf to add it into $commands_for_user to permit the user of "uja" command. <screen> -commands_for_user += uja +user_command_mail_allowed_commands += uja </screen> It you allow the command only for the specific elena ML, edit /var/spool/ml/elena/config.cf in the same way. +<screen> +user_command_mail_allowed_commands += uja +</screen> </para> </sect2> @@ -59,7 +59,7 @@ edit /var/spool/ml/elena/config.cf in the same way. <sect2> <title> - Create a new admin command "admin uja" + Create a new admin command such as "admin uja" </title> <para> @@ -69,10 +69,11 @@ Put it at the FML::Command::Admin:: class. For example <screen> /usr/local/lib/fml/site_local/FML/Command/Admin/uja.pm </screen> -Edit site_default_config.cf to add it into $commands_for_privileged_user -to permit the use of "admin uja" command. +Edit site_default_config.cf to add it into +$user_command_mail_allowed_commands to permit the use of "admin uja" +command. <screen> -commands_for_privileged_user += uja +admin_command_mail_allowed_commands += uja </screen> </para> @@ -129,6 +130,10 @@ of CUI implies administrator use. <warning> <para> +You need another work to create a menu screen. +</para> + +<para> To make a new command usable for all ML's on this host, put the module you wrote at <screen> @@ -155,10 +160,10 @@ Craete a module "uja" and put it at <screen> /usr/local/lib/fml/site_local/FML/Command/Admin/uja.pm </screen> -Edit site_default_config.cf to add it into $commands_for_admin_cgi +Edit site_default_config.cf to add it into $admin_cgi_allowed_commands to permit the use of "uja" command. <screen> -commands_for_admin_cgi += uja +admin_cgi_allowed_commands += uja </screen> </para> diff --git a/fml/doc/en/tutorial/command/internal.sgml b/fml/doc/en/tutorial/command/internal.sgml index f6b4ccc9..eb17c87d 100644 --- a/fml/doc/en/tutorial/command/internal.sgml +++ b/fml/doc/en/tutorial/command/internal.sgml @@ -1,5 +1,5 @@ <!-- - $FML: internal.sgml,v 1.2 2003/08/02 03:05:53 fukachan Exp $ + $FML: internal.sgml,v 1.3 2004/03/12 14:05:04 fukachan Exp $ $jaFML: internal.sgml,v 1.6 2003/04/15 14:51:36 fukachan Exp $ --> @@ -9,19 +9,39 @@ </title> <para> -Consider "help" command an an example of command, +Consider "help" command as an example of an fml command, which sends back help message to the sender. </para> <para> -In the case of &fmldevel;, the main code of help command locates at +In the case of &fml4;, +prepare myProcHelpFileSendBack() function and +register it at %LocalProcedure hash to enable it. +<screen> +%LocalProcedure = ( + 'help', 'myProcHelpFileSendBack', + ); +</screen> +myProcHelpFileSendBack as follows: +<screen> +sub myProcHelpFileSendBack +{ + local($proc, *Fld, *e, *misc) = @_; + my $UJA_FILE = "/some/where/help"; + &SendFile($Envelope{'Addr2Reply:'}, "UJA $ML_FN", $UJA_FILE); +} +</screen> +</para> + +<para> +In the case of &fml8;, the main code of help command locates at FML::Command::User::help class. This class is called by FML::Process::Command via AUTOLOAD of FML::Command. </para> <warning> <para> -All commands are implemented at either of FML::Command::User +All &fml8; commands are implemented at either of FML::Command::User or FML::Command::Admin classes. Both CUI (makefml, fml) and GUI (CGI) uses FML::Command::Admin class. Instead command mail users both classes according to the context. @@ -36,7 +56,7 @@ sub process { my ($self, $curproc, $optargs) = @_; my $config = $curproc->{ config }; - my $charset = $config->{ reply_message_charset_en }; + my $charset = $config->{ report_mail_charset_ja }; my $help_file = $config->{ help_file }; # template substitution: kanji code, $varname expansion et. al. @@ -44,7 +64,7 @@ sub process src => $help_file, charset_out => $charset, }; - my $help_template = $curproc->prepare_file_to_return( $params ); + my $help_template = $curproc->reply_message_prepare_template( $params ); if (-f $help_template) { $curproc->reply_message( { @@ -66,8 +86,14 @@ For exmple, variable $config is an object holding configuration variables. </para> <para> -prepare_file_to_return() converts the message language and expands the -arguments in the message templates. +All variables of &fml4; are global. +Instead variables of &fml8; locates within configuration space +accessed via $config object. +</para> + +<para> +reply_message_prepare_template() converts the message language and +expands the arguments in the message templates. </para> <para> @@ -79,18 +105,19 @@ message queue of this process on memory. The error/log messages queued in on memory are aggergated to one message at the last of the current process. Mail::Delivery class handles the aggregation and send it. If needed, the aggregator handles -text strings and multipart properly to build one message. +text strings or multipart properly to build one message. </para> <para> This mechanism is same as Notify() of &fml4; but the last aggregator -is different. +which handles all at the last is different. </para> <para> FYI: commands such as "get" for the file manipulation uses the same -message queuing mechanism. Notify() sends back immediately. This is -different from &fml4;'s Notify() fundamentally. +message queuing mechanism. &fml4;'s Notify() sends back +immediately. Instead &fml8;'s mechanism is queuing based always. This +&fml8; mechanism is different from &fml4;'s Notify() fundamentally. </para> </sect1> diff --git a/fml/doc/en/tutorial/command/module.sgml b/fml/doc/en/tutorial/command/module.sgml index aed20036..9493df06 100644 --- a/fml/doc/en/tutorial/command/module.sgml +++ b/fml/doc/en/tutorial/command/module.sgml @@ -1,5 +1,5 @@ <!-- - $FML: module.sgml,v 1.1 2003/07/24 15:37:35 fukachan Exp $ + $FML: module.sgml,v 1.2 2003/08/02 03:05:53 fukachan Exp $ $jaFML: module.sgml,v 1.4 2003/04/15 14:51:36 fukachan Exp $ --> @@ -18,7 +18,7 @@ administrative ones by the priviledge. <para> FML::Command class consists of the following classes: <screen> -FML::Command entrance into FML::Command +FML::Command entrance into FML::Command. command dispatcher. FML::Command::User command for general ML users. FML::Command::Admin command for remote administrators. </screen> |
