Module class_USContactDirectory

US server in charge of managing a contact directory, recording various information about users and roles.

Behaviours: supervisor_bridge.

Description

US server in charge of managing a contact directory, recording various information about users and roles.

Data Types

attribute_entry()

attribute_entry() = {attribute_name(), attribute_value()}

attribute_name()

attribute_name() = wooper:attribute_name()

attribute_value()

attribute_value() = wooper:attribute_value()

bin_email_address()

bin_email_address() = email_utils:bin_email_address()

bin_phone_number()

bin_phone_number() = bin_string()

A phone number (landline or mobile).

bin_string()

bin_string() = text_utils:bin_string()

birth_date()

birth_date() = time_utils:date()

The (canonical) date of birth, typically of a person.

classname()

classname() = wooper:classname()

contact_directory_pid()

contact_directory_pid() = class_USServer:server_pid()

contact_line()

contact_line() = {UserId::user_id(), FirstName::ustring(), LastName::ustring(), Nickname::ustring(), Status::user_status(), Comment::ustring(), BirthDate::maybe(ustring()), LandlineNumber::maybe(ustring()), MobileNumber::maybe(ustring()), PrimaryEmailAddress::maybe(ustring()), SecondaryEmailAddress::maybe(ustring()), PostalAddress::maybe(ustring()), Roles::[role()]}

The lines expected to be read from a contact ETF file shall respect this structure.

Nickname acts like a pseudo or a shorter, more familiar name.

Comment is free text.

Birth date of interest to wish happy birthdays.

Postal address not of use here, yet possibly specified for completeness.

Refer to the fields of the user_settings record for more information.

count()

count() = basic_utils:count()

instance_pid()

instance_pid() = pid()

method_argument()

method_argument() = wooper:method_argument()

method_arguments()

method_arguments() = wooper:method_arguments()

method_internal_result()

method_internal_result() = wooper:method_internal_result()

method_name()

method_name() = wooper:method_name()

oneway_name()

oneway_name() = wooper:oneway_name()

oneway_return()

oneway_return() = wooper:oneway_return()

postal_address()

postal_address() = bin_string()

The main, full postal address (with country information) for this user.

request_name()

request_name() = wooper:request_name()

request_result()

request_result() = any()

request_result()

request_result(T) = wooper:request_result(T)

request_return()

request_return(T) = wooper:request_result(T)

requests_outcome()

requests_outcome() = wooper:requests_outcome()

role()

role() = administrator

The supported roles, to be managed by this gateway.

user_id()

user_id() = count()

Identifier of a user, as read by this directory. Starts at 1.

user_settings()

user_settings() = #user_settings{id = user_id(), first_name = maybe(bin_string()), last_name = bin_string(), nickname = maybe(bin_string()), status = user_status(), comment = maybe(bin_string()), birth_date = maybe(birth_date()), landline_number = maybe(bin_phone_number()), mobile_number = maybe(bin_phone_number()), primary_email_address = maybe(bin_email_address()), secondary_email_address = maybe(bin_email_address()), postal_address = maybe(postal_address()), roles = [role()]}

Settings corresponding to a user. Note that users may be persons or organisations.

user_status()

user_status() = enabled | disabled

Sadly for defunct entries.

ustring()

ustring() = text_utils:ustring()

Function Index

addKeyValueToAttribute/4
addToAttribute/3
appendToAttribute/3
concatToAttribute/3
decrementAttribute/2
deleteFromAttribute/3
executeConstOneway/2
executeConstOneway/3
executeConstOnewayAs/3
executeConstOnewayAs/4
executeConstRequest/2
executeConstRequest/3
executeConstRequestAs/3
executeConstRequestAs/4
executeOneway/2
executeOneway/3
executeOnewayAs/3
executeOnewayAs/4
executeRequest/2
executeRequest/3
executeRequestAs/3
executeRequestAs/4
getAttribute/2
getAttributes/2
getMaybeAttribute/2
hasAttribute/2
incrementAttribute/2
init/1Callback to initialise this supervisor bridge, typically in answer to start_link/0 being executed.
is_wooper_debug/0
popFromAttribute/2
removeAttribute/2
setAttribute/3
setAttributes/2
start_link/0Starts and links a supervision bridge for the contact directory.
subtractFromAttribute/3
swapInAttribute/3
terminate/2Callback to terminate this supervisor bridge.
toggleAttribute/2
wooper_destruct/1
wooper_effective_method_execution/4
wooper_execute_method/3
wooper_execute_method_as/4
wooper_get_class_specific_attributes/0
wooper_handle_local_oneway_execution/3
wooper_handle_local_request_execution/3
wooper_handle_remote_oneway_execution/3
wooper_handle_remote_request_execution/4
wooper_main_loop/1

Function Details

addKeyValueToAttribute/4

addKeyValueToAttribute(State::wooper:state(), AttributeName::attribute_name(), Key::table:key(), Value::table:value()) -> wooper:state()

addToAttribute/3

addToAttribute(State::wooper:state(), AttributeName::attribute_name(), Value::attribute_value()) -> wooper:state()

appendToAttribute/3

appendToAttribute(State::wooper:state(), AttributeName::attribute_name(), Element::attribute_value()) -> wooper:state()

concatToAttribute/3

concatToAttribute(State::wooper:state(), AttributeName::attribute_name(), List::attribute_value()) -> wooper:state()

decrementAttribute/2

decrementAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

deleteFromAttribute/3

deleteFromAttribute(State::wooper:state(), AttributeName::attribute_name(), Element::attribute_value()) -> wooper:state()

executeConstOneway/2

executeConstOneway(State::wooper:state(), OnewayAtom::oneway_name()) -> void()

executeConstOneway/3

executeConstOneway(State::wooper:state(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> void()

executeConstOnewayAs/3

executeConstOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name()) -> void()

executeConstOnewayAs/4

executeConstOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> void()

executeConstRequest/2

executeConstRequest(State::wooper:state(), RequestAtom::request_name()) -> method_internal_result()

executeConstRequest/3

executeConstRequest(State::wooper:state(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> method_internal_result()

executeConstRequestAs/3

executeConstRequestAs(State::wooper:state(), ParentClassname::classname(), RequestAtom::request_name()) -> method_internal_result()

executeConstRequestAs/4

executeConstRequestAs(State::wooper:state(), Classname::classname(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> method_internal_result()

executeOneway/2

executeOneway(State::wooper:state(), OnewayAtom::oneway_name()) -> wooper:state()

executeOneway/3

executeOneway(State::wooper:state(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> wooper:state()

executeOnewayAs/3

executeOnewayAs(State::wooper:state(), ParentClassname::classname(), OnewayAtom::oneway_name()) -> wooper:state()

executeOnewayAs/4

executeOnewayAs(State::wooper:state(), Classname::classname(), OnewayAtom::oneway_name(), ArgumentList::method_arguments()) -> wooper:state()

executeRequest/2

executeRequest(State::wooper:state(), RequestAtom::request_name()) -> {wooper:state(), method_internal_result()}

executeRequest/3

executeRequest(State::wooper:state(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

executeRequestAs/3

executeRequestAs(State::wooper:state(), ParentClassname::classname(), RequestAtom::request_name()) -> {wooper:state(), method_internal_result()}

executeRequestAs/4

executeRequestAs(State::wooper:state(), Classname::classname(), RequestAtom::request_name(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

getAttribute/2

getAttribute(State::wooper:state(), AttributeName::attribute_name()) -> attribute_value()

getAttributes/2

getAttributes(State::wooper:state(), AttributeNameList::[attribute_name()]) -> [attribute_value()]

getMaybeAttribute/2

getMaybeAttribute(State::wooper:state(), AttributeName::attribute_name()) -> maybe(attribute_value())

hasAttribute/2

hasAttribute(State::wooper:state(), AttributeName::attribute_name()) -> boolean()

incrementAttribute/2

incrementAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

init/1

init(Args::list()) -> {ok, pid(), State::term()} | ignore | {error, Error::term()}

Callback to initialise this supervisor bridge, typically in answer to start_link/0 being executed.

is_wooper_debug/0

is_wooper_debug() -> boolean()

popFromAttribute/2

popFromAttribute(State::wooper:state(), AttributeName::attribute_name()) -> {wooper:state(), attribute_value()}

removeAttribute/2

removeAttribute(State::wooper:state(), AttributeName::attribute_name()) -> wooper:state()

setAttribute/3

setAttribute(State::wooper:state(), AttributeName::attribute_name(), AttributeValue::attribute_value()) -> wooper:state()

setAttributes/2

setAttributes(State::wooper:state(), ListOfAttributePairs::[attribute_entry()]) -> wooper:state()

start_link/0

start_link() -> term()

Starts and links a supervision bridge for the contact directory.

Note: typically spawned as a supervised child of the US-Main root supervisor (see us_main_sup:init/1), hence generally triggered by the application initialisation.

subtractFromAttribute/3

subtractFromAttribute(State::wooper:state(), AttributeName::attribute_name(), Value::attribute_value()) -> wooper:state()

swapInAttribute/3

swapInAttribute(State::wooper:state(), AttributeName::attribute_name(), NewAttributeValue::attribute_value()) -> {wooper:state(), attribute_value()}

terminate/2

terminate(Reason::shutdown | term(), State::term()) -> void()

Callback to terminate this supervisor bridge.

toggleAttribute/2

toggleAttribute(State::wooper:state(), BooleanAttributeName::attribute_name()) -> wooper:state()

wooper_destruct/1

wooper_destruct(State::wooper:state()) -> wooper:state()

wooper_effective_method_execution/4

wooper_effective_method_execution(SelectedModule::module(), MethodAtom::method_name(), State::wooper:state(), Parameters::method_arguments()) -> {wooper:state(), method_internal_result()}

wooper_execute_method/3

wooper_execute_method(MethodAtom::method_name(), Parameters::method_arguments(), State::wooper:state()) -> {wooper:state(), method_internal_result()}

wooper_execute_method_as/4

wooper_execute_method_as(Classname::classname(), MethodAtom::method_name(), Parameters::method_arguments(), State::wooper:state()) -> {wooper:state(), method_internal_result()}

wooper_get_class_specific_attributes/0

wooper_get_class_specific_attributes() -> [wooper_info:attribute_spec()]

wooper_handle_local_oneway_execution/3

wooper_handle_local_oneway_execution(OnewayAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> wooper:state()

wooper_handle_local_request_execution/3

wooper_handle_local_request_execution(RequestAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> {wooper:state(), method_internal_result()}

wooper_handle_remote_oneway_execution/3

wooper_handle_remote_oneway_execution(OnewayAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments()) -> wooper:state()

wooper_handle_remote_request_execution/4

wooper_handle_remote_request_execution(RequestAtom::method_name(), State::wooper:state(), ArgumentList::method_arguments(), CallerPid::pid()) -> wooper:state()

wooper_main_loop/1

wooper_main_loop(State::wooper:state()) -> deleted


Generated by EDoc