This class is the abstract base class for all notifier classes.
- *
- START
Is the constructor. Throws an exception, as this class is abstractand not meant to be instantiated.
- *
- notify
Takes the named parameters MESSAGE and WORKFLOW and does theactual notification.
Calls __pre_notification() first, to allow the actual implementationto do the setup first, such as logging into a ticket system or so.
Then, it looks up the message in the XML configuration, goes through allthe actions and calls the corresponding methods ('__do_<action>').These methods are supposed to be implemented by the particularnotifier (a child class) itself.
At the end, it calls __post_notification(), so that the implementationscan do some teardown work.
- *
- __do_open
This private method is called by notify() when the action of openinga ticket is requested. Takes the requestor, queue and subject fromthe action configuration and passes them on to the open method ofthe child (after having done the template substition). Returns theticket ID of the freshly created ticket.
- *
- __do_correspond
This private method is called by notify() when a correspondence isrequested. Takes the template from the configuration, passes it throughTemplate Toolkit and on to the correspond() method implemented inthe child.
- *
- __do_comment
This private method is called by notify() when a comment on a ticket isrequested. Takes the template from the configuration, passes it throughTemplate Toolkit and on to the comment() method implemented inthe child.
- *
- __do_set_value
This private method is called by notify() when someone wants to changea ticket value. Takes the parameters field and value from the config,passes them through Template Toolkit and on to the set_value() methodimplemented in the child.
- *
- __do_create_link
This private method is called by notify() when someone wants to linka ticket to another one (is probably pretty RT specific). Takes theparameters link_type and link from the config, passes them throughTemplate Toolkit and on to the link_tickets() method implementedin the child.
- *
- __do_close
This private method is called by notify() when someone wants to closea ticket. Calls the close() method implemented in the child.
- *
- __get_backend_config_value
Get configuration values for the notification backend. Takesa single parameter that specifies the XML tag used for theconfiguration. This is used by the children to determine their(implementation-dependent) configuration values.
- *
- __get_notifier_index
This private method gets the index for get_xpath() for the given notifier.
- *
- __get_notification_index
Gets the index number for get_xpath() for a given notification message.
- *
- __get_action_config_value
Gets the value of a config item in an <action> definition. The returnedvalue has already been passed through Template Toolkit. If more thanone entry is defined, this returns an array reference containingthe values
- *
- __get_action_config_template
Similarly, this private method gets the result of applying thetemplate defined in the template file configured for a certainaction (most notably for correspond and comment). The fileis chosen by looking at the current language. If the selectedlanguage is not availabe, it falls back to the first templatespecified.
- *
- __workflow_to_template_vars
This private method translates the workflow context into a hashthat can then be used by Template Toolkit as variables in thedefinition of notifications and configuration. In addition, itadds META_PKI_REALM, META_WF_ID, META_WF_TYPE, META_WF_STATEas variables that can be expanded, too, but were not availablein the original context.
- *
- __apply_template
This private method is a wrapper around Template Toolkit. It appliesa given template to a variable and returns the result.
- *
- __pre_notification
Abstract, to be implemented by the children classes. Called priorto doing the notification (i.e. calling the actions)
- *
- __post_notification
Abstract, to be implemented by the children classes. Called afterdoing the notification (i.e. calling the actions)
This document was created byman2html,using the manual pages.