NAME
Sympa::Family - List families
DESCRIPTION
Sympa allows lists creation and management by sets. These are the families, sets of lists sharing common properties. This module gathers all the family-specific operations.
Functions
-
get_families ( $robot )
Function. Returns the list of existing families in the Sympa installation.
Arguments
-
$robot
The robot the family list of which we want to get.
Returns
An arrayref containing all the robot’s family names.
-
-
get_available_families ( $robot )
Function. Obsoleted. Use
get_families()
.
Methods
-
new (STRING $name, STRING $robot)
Constructor. Creates a new Sympa::Family object of name $name, belonging to the robot $robot.
Arguments
-
$name
A character string containing the family name,
-
$robot
A character string containing the name of the robot which the family is/will be installed in.
Returns
The Sympa::Family object.
-
-
check_param_constraint (LIST $list)
Instance method. Checks the parameter constraints taken from param_constraint.conf file for the Sympa::List object $list.
Arguments
-
$list
A List object corresponding to the list to check.
Returns
- 1 if everything goes well,
- undef if something goes wrong,
- \@error, a ref on an array containing parameters conflicting with constraints.
-
-
get_constraints ()
Instance method. Returns a hash containing the values found in the param_constraint.conf file.
Arguments
None.
Returns
$self->{'param_constraint_conf'}
, a hash containing the values found in the param_constraint.conf file. -
check_values (SCALAR $param_value, SCALAR $constraint_value)
Instance method. Returns 0 if all the value(s) found in $param_value appear also in $constraint_value. Otherwise the function returns an array containing the unmatching values.
Arguments
-
$param_value
A scalar or a ref to a list (which is also a scalar after all)
-
$constraint_value
A scalar or a ref to a list
Returns
\@error, a ref to an array containing the values in $param_value which don’t match those in $constraint_value.
-
-
get_param_constraint (STRING $param)
Instance method. Gets the constraints on parameter $param from the ‘param_constraint.conf’ file.
Arguments
-
$param
A character string corresponding to the name of the parameter for which we want to gather constraints.
Returns
- 0 if there are no constraints on the parameter,
- a scalar containing the allowed value if the parameter has a fixed value,
- a ref to a hash containing the allowed values if the parameter is controlled,
- undef if something went wrong.
-
-
get_uncompellable_param ()
Instance method. Returns a reference to hash whose keys are the uncompellable parameters.
Arguments
None.
Returns
\%list_of_param
, a ref to a hash the keys of which are the uncompellable parameters names. -
insert_delete_exclusion ( $email, $action )
Instance method. Handle exclusion table for family. TBD.
-
get_id ( )
Instance method. Gets unique identifier of instance.
Attributes
-
{name}
The name of family.
-
{domain}
The mail domain (a.k.a. “robot”) the family belongs to.
Note: On Sympa 6.2.52 or earlier,
{robot}
was used. -
{dir}
Base dire4ctory of the family.
-
{state}
Obsoleted. TBD.
SEE ALSO
Sympa::List, Sympa::Request::Handler::close_list, Sympa::Request::Handler::create_automatic_list, Sympa::Request::Handler::update_automatic_list.
List families, Sympa Administration Manual.
HISTORY
Family module was initially written by:
- Serge Aumont <sa AT cru.fr>
- Olivier Salaun <os AT cru.fr>
Renamed Sympa::Family appeared on Sympa 6.2a.39. Afterward, it has been gradually rewritten, therefore Sympa::Request::Handler::close_list, Sympa::Request::Handler::create_automatic_list and Sympa::Request::Handler::update_automatic_list were separated up till Sympa 6.2.49b.