Module: alfresco/logging/SubscriptionLog

alfresco/logging/SubscriptionLog

This module provides two main functions. Firstly it provides debugging capabilities for publication/subscription events. Secondly it provides a tool for use in unit testing that Selenium WebDriver can use to capture events that occur to validate correct widget behaviour.
Author:
  • Dave Draper
License:
Source:

Mixes In

Members

cssRequirements :object[]

An array of the CSS files to use with this widget.
Type:
  • object[]
Default Value:
  • [{cssFile:"./css/SubscriptionLog.css"}]
Source:

pubSubLog :object

This will be set to the singleton PubSubLog object where all pub/sub events will be logged when running in debug mode.
Type:
  • object
Default Value:
  • null
Source:

templateString :string

The HTML template to use for the widget.
Type:
  • string
Source:

topicsToIgnore :array

It's possible to configure a list of topics that should be ignored. This is primarily added for test purposes to allow avoid building enormous tabular structures that represent loaded data.
Type:
  • array
Default Value:
  • null
Source:

Methods

_clearLog()

Clear the log node
Source:

addArrayToLog(a, domNode)

Parameters:
Name Type Description
a object[] The array of data to add
domNode element The element to add the array data to
Source:

addObjectToLog(o, domNode)

Add an object to the log table. The entries should be output as rows of key/value pair cells.
Parameters:
Name Type Description
o object The object to add
domNode element The element to add the object to
Source:

addStringToLog(s, domNode)

Sets the supplied string as the inner HTML of the supplied DOM node.
Parameters:
Name Type Description
s string The string to add
domNode element The element to add the string to
Source:

addValueToLog(value, domNode)

Adds a new value to the log table.
Parameters:
Name Type Description
value object The value to add
domNode element The DOM node to add the value to
Source:

logUpdated(entry)

This is hitched via an aspect in the postCreate function. It will be called whenever the PubSubLog is updated with a new entry.
Parameters:
Name Type Description
entry object The entry capturing the pub/sub event.
Source:

postCreate()

This iterates over all the entries that have been added to the log so that any events logged before this instance was created are displayed and then setup an aspect to capture any subsequent events.
Source:

updateLog(logData)

Parameters:
Name Type Description
logData object The details of the publication
Source: