Give us feedback
objectdiff
Service icon

ObjectDiff

Stable version 1.0.6 (Compatible with OutSystems 11)
Uploaded on 30 May by 
5.0
 (2 ratings)
objectdiff

ObjectDiff

Details
This component compares the differences in objects of the same type. It is intended for use in auditing. It handles differences for the create, update and delete of entities. There are multiple actions available to return the differences between entities in text, HTML or in a structure where you may programmatically use the differences. HTML is generated using EncodeHtml to prevent injection attacks. Translations are available in English, Spanish, French, Japanese, Malay, Portuguese, Russian, Chinese. Let me know if there is another translation you would like. Translation files are also welcome. Foreign key attributes are formatted using the "Label" attribute of the foreign entity as well as the ID.
Read more

Compare two objects of the same entity type and return the differences.

There are different versions of actions with method signatures to suit different scenarios.

Translations are available in English, Spanish, French, Japanese, Malay, Portuguese, Russian, Chinese.

The currency symbol, decimal symbol, group symbol and null placeholder can be overridden via site properties or per call to an action.

The simplest usage is to just call CompareObjectsToText, or CompareObjectsToHtml. These will compare the objects and return Text or HTML identifying the difference between the passed in objects.

For the creation of an object, pass in NullObject() for the OldObject. For the deletion of an object, pass in NullObject() for the NewObject.

The CompareObjects action returns the differences in a structure that can be used programmatically.

The ComparisonResultToText action converts the comparison returned by CompareObjects to text. It is intened this is used for human readable audit records.

The ComparisonResultToHtml action converts the comparison returned by CompareObjects to HTML. It is intended this is used for human readable audit records. Values are HTML encoded to guard against injection attacks.

The "Config" actions provide additional configuration options. Site properties are also available to override default configuration settings for NullPlaceholder, CurrencySymbol, DecimalSeparator and GroupSeparator. FormatOverrides allow a .NET format specifier to control how an attribute is formatted in the output.

Users of the library can also write their own formatting actions and just use the CompareObjects action.

Note on foreign keys:

Values for foreign keys use the "Label" attribute of the foreign entity as well as displaying the id. If the label attribute of a foreign entity is a foreign key, the library will display the value for the second foreign entity, if a Label attribute is defined for it. The id value for the foreign key entity is also displayed.

Release notes (1.0.6)

This release includes the ability to convert date/time value to local time when rendering to text.

To enable conversion to local time, set the LocalTimeZoneId site property. eg AUS Eastern Standard Time

List timezone names with TZUTIL.EXE /L on Windows.

License (1.0.6)
Reviews (1)
24 Mar
in version 1.0.5
Nicely documented and also nice try now functionality.