-
Notifications
You must be signed in to change notification settings - Fork 9
Polling Application
The poll example makes use of the IInstallablePlugin to enable self-installation. The compiled DLL includes all of the factory widgets, pages, SQL scripts, javascript, CSS, etc that is required by the application to execute. When the application is installed, it executes the appropriate install or upgrade SQL scripts, installs the polling pages into the site's group themes, installs the factory default implementations of its widgets, and adds its CSS file to the site theme. This makes the application easy to deploy and upgrade--its only ever a single file to deploy and the file can handle initial installs and upgrades to new versions.
The source code exposes a REST API, an in-process API (Telligent.BigSocial.Polling.PublicAPI namespace), and a Widget API (See $telligent_v1_poll-based widget extensions in Widget Studio after installation). It integrates with Zimbra Social via the following plugins:
This PollingApplication plugin represents the "Polling Application" plugin shown in the main list of Manage Plugins within the Control Panel. It uses IConfigurablePlugin and IRequiredConfigurationPlugin to collect the database connection string and ensure that it is valid. It makes use of IInstallablePlugin to manage installation, upgrading, and uninstallation of the database objects, pages, and navigation items. Via IPluginGroup, it defines the other plugins that are required to implement the functionality of the polling application:
- PollContentType (IPlugin, IContentType, ITranslatablePlugin, ICommentableContentType, IAbuseCheckingContentType, ITaggableContentType, IHashtaggableContentType, IMentionContainingContentType, ISearchableContentType) Provides the integration details for polls within Zimbra Social. It supports commenting, abuse, tags, hashtags, mentions, and searching core services.
- PollSearchCategories (IPlugin, ISearchCategories, ITranslatablePlugin) Defines the "Poll" search category.
- PollRestEndpoints (IPlugin, IRestEndpoints) Defines all of the poll-related REST endpoints.
- PollVotesMetric (IPlugin, IMetric) Defines the implementation of the poll votes metric to be used within the scoring core service.
- TopPollsScore (IPlugin, IScore, IContentTypeLimitedScore) Defines the top polls score for the scoring core service. The poll API supports retrieving polls sorted by this score.
- PollAnswerWidgetExtension (IPlugin, IScriptedContentFragmentExtension) Exposes poll answer entities to Widget Studio.
- PollFactoryDefaultWidgetProvider (IPlugin, IScriptedContentFragmentExtension) Defines the default set of widgets that implement base polling UI.
- PollGroupNavigation (IPlugin, ITranslatablePlugin, IGroupCustomNavigationPlugin, IGroupDefaultCustomNavigationPlugin) Implements the "Poll" tab in Group Application Navigation and adds this tab as a default.
- PollHeaderExtension (IPlugin, ITranslatablePlugin, IHtmlHeaderExtension, IHttpCallback) Adds the poll UI component javascript to all rendered pages via an HTML header extension and serves the file as an embedded resource via IHttpCallback.
- PollNewPostLink (IPlugin, ITranslatablePlugin, IGroupNewPostLinkPlugin) Integrates poll creation with the "New Post" button on Group Application Navigation.
- PollUrlsWidgetExtension (IPlugin, IScriptedContentFragmentExtension) Exposes poll-related URLs to Widget Studio.
- PollViewer (IPlugin, IFileViewer) Implements the ability to detect poll URLs within content and render an interaction poll in the URL's place. This enables polls to be embedded within any content type in Zimbra Social.
- PollVoteWidgetExtension (IPlugin, IScriptedContentFragmentExtension) Exposes poll vote entities to Widget Studio.
- PollWidgetContextProvider (IPlugin, IScriptedContentFragmentContextProvider) Exposes support for the "Poll" context to Widget Studio.
- PollWidgetExtension (IPlugin, IScriptedContentFragmentExtension) Exposes the poll entity to Widget Studio.
This plugin is the only other plugin in the polling application that is not part of the "Polling Application" plugin's group. This makes it possible to turn its functionality on and off separately from the polling application. This plugin implements the activity story stream integration via IActivityStoryType and allows the stories to be translated into other languages via ITranslatablePlugin.