Class: GeneralBusiness

base.GeneralBusiness()

This module provides a stand-in for applications that will perform some business processing one transitions have fulfilled.

Interesting implementations have been moved out of the library and into applications. Some actions such as email responses previously program are becoming archaic. But, some applications may still use them.

In any case, the reference to the applications Business class instance is available to a number of other clases, among them, the application's session manager. The application's session manager is the only CopiousTranstions governed library class to be initialized with the Business class as a parameter. But the session manager might pass this on to the transition engine or to the DB manager in some applications. (Again, it is up to the application to use or ignore this class.)

NOTE: all the base classes in /lib return the class and do not return an instance. Explore the applications and the reader will find that the descendant modules export instances. The classes provided by copious-transitions must be extended by an application.

Constructor

new GeneralBusiness()

Source:

Methods

cleanup(transition, pkey, post_body)

Related to the forgotten information. Provides a call frame that relates the forgotten information to a transition. And allows for some application defined process that uses information from the request's body.

Parameters:
Name Type Description
transition string
pkey string
post_body object
Source:

del_recent_forgetfulness(pkey)

Delete information related to the forgotten password activity.

Parameters:
Name Type Description
pkey string
Source:

get_recently_forgetful(pkey) → {object}

Retrieve information related to the forgotten password activity.

Parameters:
Name Type Description
pkey string
Source:
Returns:
Type
object

initialize(conf_obj, db)

Parameters:
Name Type Description
conf_obj object
db object
Source:

process(use_case, post_body)

For definition by an application.

If a application's session manager calls for the initiation of some business process, identified by use_case, this method can be called. This method is left empty for definition in an applications's subclass.

And example might be that email is sent to someone once a transition if finalized.

Parameters:
Name Type Description
use_case string

a flag for a switch statement or a map key to a function.

post_body object

The post body is from the client request.

Source:

store_recent_forgetfulness(pkey, trackable)

Some applications may support forgotten passwords as part of authorization. This interface provides applications with some methods to start tracking exchanges with users having to do with reseting passwords or other activities related to forgotten authorization memes.

This method makes an entry for the forgotten item.

Parameters:
Name Type Description
pkey string
trackable object
Source: