In uSync a Handler manages the reading and writing of the uSync Settings from the physical disk of the installation.
Handlers don't do the actual importing or exporting of items that work is done by the Serializers.
Handlers are grouped within the main uSync.Config file - these groups allow you (and other uSync tools) to use diffrent sets of handlers depending on the groups.
<Handlers Name="default"> <Handler Alias="dataTypeHandler" Enabled="true" Actions="All" /> <Handler Alias="languageHandler" Enabled="true" Actions="All" /> <Handler Alias="macroHandler" Enabled="true" Actions="All" /> <Handler Alias="memberTypeHandler" Enabled="true" Actions="All" /> <Handler Alias="templateHandler" Enabled="true" Actions="All" /> <Handler Alias="contentTypeHandler" Enabled="true" Actions="All" /> </Handlers>
|Enabled||true/false||Turns this handler on or off within the handler group|
|Actions||All,Import,Export,Report||Turns the handler on or off for specific actions, by default all handlers are on for all actions|
Handler Specific settings,¶
Handlers can have their own settings, which can control specific behaviors based on the handler, for example Content Handlers can have
Exclude settings that limit exports to certain content paths.
These settings take the form of an extra Add value underneath the hancdler e.g.`
<Handler Alias="contentTypeHandler" Enabled="true" Actions="All"> <Add Key="CreateOnly" Value="true" /> </Handler>
The following settings work for all handlers
uSync 8.7+ only
|CreateOnly||True/False||Items are created if they do not exist, but existing items are not synced.|
|IgnoreAliases||String||List of aliases of items you don't want the handler to import.|
Handler specific settings¶
For more info see the specific handler docs.
|Content/Media||Include||Content Path||See Content Handler Documentation|
|RulesOnExport||True / False|
|Dictionary||OneWay||True/False||legacy same as CreateOnly see Dictionay Handler documentation for more info|
|DataTypes||NoConfigNames||String||List of datatypes by name that you don't want to import the configuration for.|
|NoConfigEditors||String||List of editor aliases of items you don't want the configuration to be imported for.|
Items get to disk in one of two ways; either a user triggers an export via the uSync dashboard or uSync detects a change and triggers a single export of an item.
Handlers listen for the save/delete/move events and trigger exports when things change
Depending on settings, handlers can import settings either at startup of your site or when you trigger an import via the uSync dashboard.
Typically an import will only attempt to update items that have changed, this is for both speed and consistency - you can however force an import which will update all items regardless of if they have changed or not since the last import.