com.dhtmlx.connector
Class ConnectorBehavior

java.lang.Object
  extended by com.dhtmlx.connector.ConnectorBehavior
Direct Known Subclasses:
ExportServiceBehaviour, GroupConnectorBehavior, KeyGridBehavior, TreeBehavior, TreeCommonMultitableBehavior, TreeGridBehavior

public class ConnectorBehavior
extends java.lang.Object

The Class ConnectorBehavior. Class represents the system of server side events, which can be used to configure how connector must process select and update requests.


Constructor Summary
ConnectorBehavior()
          Instantiates a new connector behavior.
 
Method Summary
 void afterDBError(DataAction action, java.lang.Throwable e)
          After DB error event Occurs in update mode, after some DB error Related error object is provided as parameter of the called method.
 void afterDelete(DataAction action)
          After delete event Occurs in update mode, after deleting record from DB Event logic called for each updated record.
 void afterInsert(DataAction action)
          After insert event Occurs in update mode, after inserting record in DB Event logic called for each updated record.
 void afterProcessing(DataAction action)
          After processing event Occurs in update mode, after execution any DB operations.
 void afterUpdate(DataAction action)
          After update event Occurs in update mode, after updating record in DB Event logic called for each updated record.
 void attach(ConnectorBehavior custom)
          Attach new behavior
 void beforeDelete(DataAction action)
          Before delete event Occurs in update mode, before deleting record from DB Event logic called for each updated record.
 void beforeFilter(java.util.ArrayList<FilteringRule> filters)
          Before filter event Occurs in selection mode, when incoming request parsed and before data selection from DB
 void beforeInsert(DataAction action)
          Before insert event Occurs in update mode, before inserting record in DB Event logic called for each updated record.
 void beforeOutput(ConnectorOutputWriter out, javax.servlet.http.HttpServletRequest http_request, javax.servlet.http.HttpServletResponse http_response)
          Before output event Event occurs before rendering output of connector.
 void beforeProcessing(DataAction action)
          Before processing event Occurs in update mode, before execution any DB operations.
 void beforeRender(DataItem data)
          Before render event Occurs in selection mode.
 void beforeSort(java.util.ArrayList<SortingRule> sorters)
          Before sort event Occurs in selection mode, when incoming request parsed and before data selection from DB
 void beforeUpdate(DataAction action)
          Before update event Occurs in update mode, before updating record in DB Event logic called for each updated record.
 ConnectorBehavior trigger()
          Trigger event
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectorBehavior

public ConnectorBehavior()
Instantiates a new connector behavior.

Method Detail

attach

public void attach(ConnectorBehavior custom)
Attach new behavior

Parameters:
custom - the custom behavior

trigger

public ConnectorBehavior trigger()
Trigger event

Returns:
the active behavior

beforeSort

public void beforeSort(java.util.ArrayList<SortingRule> sorters)
Before sort event Occurs in selection mode, when incoming request parsed and before data selection from DB


beforeFilter

public void beforeFilter(java.util.ArrayList<FilteringRule> filters)
Before filter event Occurs in selection mode, when incoming request parsed and before data selection from DB


beforeRender

public void beforeRender(DataItem data)
Before render event Occurs in selection mode. Event logic called for rendering of each item. Related data item is provided as parameter of the called method.

Parameters:
data - the data item

beforeProcessing

public void beforeProcessing(DataAction action)
Before processing event Occurs in update mode, before execution any DB operations. Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

afterDBError

public void afterDBError(DataAction action,
                         java.lang.Throwable e)
After DB error event Occurs in update mode, after some DB error Related error object is provided as parameter of the called method.

Parameters:
action - the data action

afterProcessing

public void afterProcessing(DataAction action)
After processing event Occurs in update mode, after execution any DB operations. Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

beforeDelete

public void beforeDelete(DataAction action)
Before delete event Occurs in update mode, before deleting record from DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

beforeInsert

public void beforeInsert(DataAction action)
Before insert event Occurs in update mode, before inserting record in DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

beforeUpdate

public void beforeUpdate(DataAction action)
Before update event Occurs in update mode, before updating record in DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

afterDelete

public void afterDelete(DataAction action)
After delete event Occurs in update mode, after deleting record from DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

afterInsert

public void afterInsert(DataAction action)
After insert event Occurs in update mode, after inserting record in DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

afterUpdate

public void afterUpdate(DataAction action)
After update event Occurs in update mode, after updating record in DB Event logic called for each updated record. Related data action is provided as parameter of the called method.

Parameters:
action - the data action

beforeOutput

public void beforeOutput(ConnectorOutputWriter out,
                         javax.servlet.http.HttpServletRequest http_request,
                         javax.servlet.http.HttpServletResponse http_response)
Before output event Event occurs before rendering output of connector. It can be used to inject any extra data in the output

Parameters:
out - xml string
http_request - the http request