@staticmethod<EOL><INDENT>def factory(db, collection, action):<DEDENT>
triggers_cfg = na3x_cfg[NA3X_TRIGGERS]<EOL>if (collection in triggers_cfg) and (action in triggers_cfg[collection]):<EOL><INDENT>return obj_for_name(triggers_cfg[collection][action])(db, collection)<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Instantiate trigger
:param db: db descriptor
:param collection: collection to be updated
:param action: ACTION_BEFORE_DELETE, ACTION_AFTER_DELETE, ACTION_BEFORE_UPSERT, ACTION_AFTER_DELETE
:return: trigger instance if trigger configured in triggers.json or None