Module z_module_indexer

Implements the module extension mechanisms for scomps, templates, actions etc.

Copyright 2009-2012 Marc Worrell Date: 2009-06-06

Behaviours: gen_server.

Authors: Marc Worrell (marc@worrell.nl).

Description

Implements the module extension mechanisms for scomps, templates, actions etc. Scans all active modules for scomps (etc) and maintains lookup lists for when the system tries to find a scomp (etc).

Function Index

all/2Return a list of all templates, scomps etc per module.
code_change/3Convert process state when code is changed.
find/3Find a scomp, validator etc.
find_all/3Find a scomp, validator etc.
find_ua_class/4
find_ua_class_all/4
handle_call/3
handle_cast/2Scan for all scomps etc.
handle_info/2Handling all non call/cast messages.
index_ref/1
init/1Initiates the server.
reindex/1Reindex the list of all scomps, etc for the site in the context.
start_link/1Starts the server.
terminate/2This function is called by a gen_server when it is about to terminate.
translations/1Find all .po files in all modules and the active site.

Function Details

all/2

all(What, Context) -> any()

Return a list of all templates, scomps etc per module

code_change/3

code_change(OldVsn, State, Extra) -> {ok, NewState}

Convert process state when code is changed

find/3

find(What, Name, Context) -> {ok, #module_index{}} | {error, Reason}

Find a scomp, validator etc.

find_all/3

find_all(What, Name, Context) -> list()

Find a scomp, validator etc.

find_ua_class/4

find_ua_class(What, Class, Name, Context) -> any()

find_ua_class_all/4

find_ua_class_all(What, Class, Name, Context) -> any()

handle_call/3

handle_call(Message::Request, From, State) -> {reply, Reply, State} | {reply, Reply, State, Timeout} | {noreply, State} | {noreply, State, Timeout} | {stop, Reason, Reply, State} | {stop, Reason, State}

handle_cast/2

handle_cast(Message::Msg, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}

Scan for all scomps etc. for the context given.

handle_info/2

handle_info(Info, State) -> {noreply, State} | {noreply, State, Timeout} | {stop, Reason, State}

Handling all non call/cast messages

index_ref/1

index_ref(Context) -> any()

init/1

init(SiteProps) -> {ok, State} | {ok, State, Timeout} | ignore | {stop, Reason}

Initiates the server.

reindex/1

reindex(Context) -> any()

Reindex the list of all scomps, etc for the site in the context.

start_link/1

start_link(SiteProps::Props) -> {ok, Pid} | ignore | {error, Error}

Starts the server

terminate/2

terminate(Reason, State) -> void()

This function is called by a gen_server when it is about to terminate. It should be the opposite of Module:init/1 and do any necessary cleaning up. When it returns, the gen_server terminates with Reason. The return value is ignored.

translations/1

translations(Context::#context{}) -> [{module, {ModuleDirectory, [{Language, File}]}}]

Find all .po files in all modules and the active site. This is an active scan, not designed to be fast.


Generated by EDoc, Oct 20 2014, 23:46:50.