RT 4.0.24 Documentation

This version has reached its end of life and is out of support. Please contact us for upgrade assistance.

RT::Shredder::Plugin::Base

Go to latest version →

NAME

RT::Shredder::Plugin::Base - base class for Shredder plugins.

USAGE

masks

If any argument is marked with keyword mask then it means that this argument support two special characters:

1) * matches any non empty sequence of the characters. For example *@example.com will match any email address in example.com domain.

2) ? matches exactly one character. For example ???? will match any string four characters long.

METHODS

for subclassing in plugins

Type - is not supported yet

See Todo for more info.

SupportArgs

Takes nothing. Returns list of the supported plugin arguments.

Base class returns list of the arguments which all classes must support.

HasSupportForArgs

Takes a list of argument names. Returns true if all arguments are supported by plugin and returns (0, $msg) in other case.

TestArgs

Takes hash with arguments and thier values and returns true if all values pass testing otherwise returns (0, $msg).

Stores arguments hash in $self-{'opt'}>, you can access this hash from Run method.

Method should be subclassed if plugin support non standard arguments.

Run

Takes no arguments. Executes plugin and return (1, @objs) on success or (0, $msg) if error had happenned.

Method must be subclassed, this class always returns error.

Method must be called only after TestArgs method in other case values of the arguments are not available.

utils

ConvertMaskToSQL

Takes one argument - mask with * and ? chars and return mask SQL chars.

← Back to index