<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Factory Default Widget Providers</title><link>https://community.telligent.com/community/11/w/developer-training/65059/factory-default-widget-providers</link><description /><dc:language>en-US</dc:language><generator>14.0.0.586 14</generator><item><title>Factory Default Widget Providers</title><link>https://community.telligent.com/community/11/w/developer-training/65059/factory-default-widget-providers</link><pubDate>Wed, 05 Aug 2020 15:05:37 GMT</pubDate><guid isPermaLink="false">228734ec-3179-423d-a284-6c5a0ce12472</guid><dc:creator>Former Member</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65059/factory-default-widget-providers#comments</comments><description>Current Revision posted to Developer Training by Former Member on 08/05/2020 15:05:37&lt;br /&gt;
&lt;p&gt;Factory default widget providers allow for a logical and physical separation of [[Widgets|widgets]].&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Why_use_Factory_Default_Providers" name="Why_use_Factory_Default_Providers"&gt;&lt;/a&gt;Why use Factory Default Providers?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source Control.&lt;/strong&gt; Each factory provider has a separate folder where its widgets are stored (in the filestorage folder under defaultwidgets/{factory default provider&amp;nbsp;identifier}). &amp;nbsp;Additionally each widget is saved as a single xml file, along with a folder that contains any supplementary files for that widget. &amp;nbsp;That separation and organization aids in the use source control to maintain widget updates. &amp;nbsp;The&amp;nbsp;&lt;a href="/training/w/developer90/52489.managing-widget-source-and-distribution"&gt;Manage Widget Source&lt;/a&gt;&amp;nbsp;article provides additional detail on Factory Default Providers, &lt;a href="/training/w/developer90/52538.editing-widgets-in-developer-mode"&gt;Developer Mode&lt;/a&gt; and using source control when working with widgets.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ensuring Widgets are Available.&lt;/strong&gt; When shipping custom functionality (content, widget extensions, and pages), it is beneficial to know that the widgets that define the UI for that functionality is available. Widgets defined by a factory default widget provider can be edited in the widget editor, but they cannot be removed. This ensures that the widgets are safe to reference within factory default definitions of pages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enabling/Disabling Widgets.&lt;/strong&gt; When developing widgets that rely on other plugins to be enabled, for instance a 3rd party application, having your widgets grouped together in a Factory Default Provider allows the provider and its&amp;nbsp;widgets to be enabled/disabled along side required functionality.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Widget_File_Storage" name="Widget_File_Storage"&gt;&lt;/a&gt;Widget File Storage&lt;/h2&gt;
&lt;p&gt;Each factory default provider stores its default widgets in the Verint Community filestorage under the default widgets folder using its identifier as the folder name. Widgets are stored as a single xml file under that folder. &amp;nbsp;Widget that have supplementary files store those files in a single folder named for that widget&amp;#39;s identifier.&lt;/p&gt;
&lt;p&gt;For example, assuming we have a file storage provider with identifier &amp;#39;e47bcf91df6144db81edc7dc6bca264e&amp;#39;. &amp;nbsp;That provider has two widgets Widget1 and Widget2. &amp;nbsp;If Widget 1 has no supplementary files and Widget 2 has 3 supplementary files and an&amp;nbsp;identifier of &amp;#39;5be59b2914fe46f8b09f61c51b4db256&amp;#39;. &amp;nbsp;The filestorage for this provider would be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;filestorage
&lt;ul&gt;
&lt;li&gt;defaultwidgets
&lt;ul&gt;
&lt;li&gt;e47bcf91df6144db81edc7dc6bca264e
&lt;ul&gt;
&lt;li&gt;Widget1.xml&lt;/li&gt;
&lt;li&gt;Widget2.xml&lt;/li&gt;
&lt;li&gt;5be59b2914fe46f8b09f61c51b4db256
&lt;ul&gt;
&lt;li&gt;ui.js&lt;/li&gt;
&lt;li&gt;image.jpg&lt;/li&gt;
&lt;li&gt;save.vm&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Creating_a_Widget_Factory_Default_Provider" name="Creating_a_Widget_Factory_Default_Provider"&gt;&lt;/a&gt;Creating a Widget Factory Default Provider&lt;/h2&gt;
&lt;p&gt;The [[api-documentation:IScriptedContentFragmentFactoryDefaultProvider Plugin Type|IScriptedContentFragmentFactoryDefaultProvider]]&amp;nbsp;interface has a single property:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;interface IScriptedContentFragmentFactoryDefaultProvider : IPlugin
{
	Guid ScriptedContentFragmentFactoryDefaultIdentifier { get;  }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This property should return a unique identifier for the provider.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://community.telligent.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-12-83/6708_2E00_SampleWidgetProvider_2E00_cs"&gt;community.telligent.com/.../6708_2E00_SampleWidgetProvider_2E00_cs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The example creates a provider with the name &amp;quot;Sample Widget Provider&amp;quot;. Any widget source files in the filestorage/defaultwidgets/b740a034c218458db09413e1f913cff0 folder (using the format identified above) would be available in the widget editor when this plugin is enabled.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: IScriptedContentFragmentFactoryDefaultProvider&lt;/div&gt;
</description></item><item><title>Factory Default Widget Providers</title><link>https://community.telligent.com/community/11/w/developer-training/65059/factory-default-widget-providers/revision/1</link><pubDate>Thu, 13 Jun 2019 19:23:54 GMT</pubDate><guid isPermaLink="false">228734ec-3179-423d-a284-6c5a0ce12472</guid><dc:creator>Ben Tiedt</dc:creator><comments>https://community.telligent.com/community/11/w/developer-training/65059/factory-default-widget-providers#comments</comments><description>Revision 1 posted to Developer Training by Ben Tiedt on 06/13/2019 19:23:54&lt;br /&gt;
&lt;p&gt;Factory default widget providers allow for a logical and physical separation of [[Widgets|widgets]].&lt;/p&gt;
&lt;p&gt;[toc]&lt;/p&gt;
&lt;h2&gt;&lt;a id="Why_use_Factory_Default_Providers" name="Why_use_Factory_Default_Providers"&gt;&lt;/a&gt;Why use Factory Default Providers?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source Control.&lt;/strong&gt; Each factory provider has a separate folder where its widgets are stored (in the filestorage folder under defaultwidgets/{factory default provider&amp;nbsp;identifier}). &amp;nbsp;Additionally each widget is saved as a single xml file, along with a folder that contains any supplementary files for that widget. &amp;nbsp;That separation and organization aids in the use source control to maintain widget updates. &amp;nbsp;The&amp;nbsp;&lt;a href="/training/w/developer90/52489.managing-widget-source-and-distribution"&gt;Manage Widget Source&lt;/a&gt;&amp;nbsp;article provides additional detail on Factory Default Providers, &lt;a href="/training/w/developer90/52538.editing-widgets-in-developer-mode"&gt;Developer Mode&lt;/a&gt; and using source control when working with widgets.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ensuring Widgets are Available.&lt;/strong&gt; When shipping custom functionality (content, widget extensions, and pages), it is beneficial to know that the widgets that define the UI for that functionality is available. Widgets defined by a factory default widget provider can be edited in the widget editor, but they cannot be removed. This ensures that the widgets are safe to reference within factory default definitions of pages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enabling/Disabling Widgets.&lt;/strong&gt; When developing widgets that rely on other plugins to be enabled, for instance a 3rd party application, having your widgets grouped together in a Factory Default Provider allows the provider and its&amp;nbsp;widgets to be enabled/disabled along side required functionality.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Widget_File_Storage" name="Widget_File_Storage"&gt;&lt;/a&gt;Widget File Storage&lt;/h2&gt;
&lt;p&gt;Each factory default provider stores its default widgets in the Telligent Community filestorage under the default widgets folder using its identifier as the folder name. Widgets are stored as a single xml file under that folder. &amp;nbsp;Widget that have supplementary files store those files in a single folder named for that widget&amp;#39;s identifier.&lt;/p&gt;
&lt;p&gt;For example, assuming we have a file storage provider with identifier &amp;#39;e47bcf91df6144db81edc7dc6bca264e&amp;#39;. &amp;nbsp;That provider has two widgets Widget1 and Widget2. &amp;nbsp;If Widget 1 has no supplementary files and Widget 2 has 3 supplementary files and an&amp;nbsp;identifier of &amp;#39;5be59b2914fe46f8b09f61c51b4db256&amp;#39;. &amp;nbsp;The filestorage for this provider would be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;filestorage
&lt;ul&gt;
&lt;li&gt;defaultwidgets
&lt;ul&gt;
&lt;li&gt;e47bcf91df6144db81edc7dc6bca264e
&lt;ul&gt;
&lt;li&gt;Widget1.xml&lt;/li&gt;
&lt;li&gt;Widget2.xml&lt;/li&gt;
&lt;li&gt;5be59b2914fe46f8b09f61c51b4db256
&lt;ul&gt;
&lt;li&gt;ui.js&lt;/li&gt;
&lt;li&gt;image.jpg&lt;/li&gt;
&lt;li&gt;save.vm&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;a id="Creating_a_Widget_Factory_Default_Provider" name="Creating_a_Widget_Factory_Default_Provider"&gt;&lt;/a&gt;Creating a Widget Factory Default Provider&lt;/h2&gt;
&lt;p&gt;The [[api-documentation:IScriptedContentFragmentFactoryDefaultProvider Plugin Type|IScriptedContentFragmentFactoryDefaultProvider]]&amp;nbsp;interface has a single property:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;interface IScriptedContentFragmentFactoryDefaultProvider : IPlugin
{
	Guid ScriptedContentFragmentFactoryDefaultIdentifier { get;  }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This property should return a unique identifier for the provider.&lt;/p&gt;
&lt;h2&gt;&lt;a id="Example" name="Example"&gt;&lt;/a&gt;Example&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://community.telligent.com/cfs-file/__key/communityserver-wikis-components-files/00-00-00-12-83/6708_2E00_SampleWidgetProvider_2E00_cs"&gt;community.telligent.com/.../6708_2E00_SampleWidgetProvider_2E00_cs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The example creates a provider with the name &amp;quot;Sample Widget Provider&amp;quot;. Any widget source files in the filestorage/defaultwidgets/b740a034c218458db09413e1f913cff0 folder (using the format identified above) would be available in the widget editor when this plugin is enabled.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: IScriptedContentFragmentFactoryDefaultProvider&lt;/div&gt;
</description></item></channel></rss>