Verint | Telligent Community
Verint | Telligent Community
  • Site
  • User
  • Site
  • Search
  • User
Verint Community 11.x
  • Verint Community
Verint Community 11.x
Developer Training Managing Dependencies
  • User Documentation
  • Ask the Community
  • API Documentation
  • Manager Training
  • Developer Training
  • Tags
  • More
  • Cancel
  • New
  • +Getting Started
  • +External Integration
  • -Plugins/Framework extension
    • +In-Process API
    • -Plugins
      • Exceptions and Logging
      • -Plugin Examples
        • Creating Activity Stories
        • +Creating Custom Applications and Content
        • Defining Permissions
        • Executing Code Before Plugin Initialization
        • Exposing Configuration Options
        • Exposing Data to External Sources
        • File Viewers
        • Handling Embedded Files in Content
        • Handling Events
        • Interacting With Files
        • Managing Dependencies
        • Managing Physical File Storage
        • Notifications
        • Registering Tokens for Templates
        • Template-based Email
        • Translating Plugin Text
        • Using Widgets to Render Content From Plugins
      • Plugin Lifecycle
    • +Setting Up Your Development Environment
  • +Automations
  • +UI Customization
  • +Scripting

Managing Dependencies

Grouping plugins can make setup and configuration of your project more manageable using IPluginGroup. This will allow you to organize and create multiple plugins and group them in the administration panel.

[toc]

Why should I group plugins?

When creating a content type it may be necessary to add multiple integrations with core services such as IRateableContentType, ICommentableContentType and ILikeableContentType. By creating a Group Plugin these plugins will all be enabled simultaneously when the Group Plugin is enabled.

Creating a Group Plugin

The Group Plugin interface only has one property called Plugins. It returns a list of types to be grouped. In this sample there are three simple classes that implement IPlugin, these are grouped by the IPluginGroup interface.

Fullscreen MyGroupPlugin.cs Download
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telligent.Evolution.Extensibility.Version1;

namespace Samples
{
    public class MyGroupPlugin : IPluginGroup
    {
        public string Name
        {
            get { return "My Group Plugin"; }
        }

        public string Description
        {
            get { return "This plugin will demo how IPluginGroup works"; }
        }

        public void Initialize()
        {
            //No initialization required for IPluginGroup
        }

        public IEnumerable<Type> Plugins
        {
            get
            {
                return new[]
                {
                    typeof (MyPluginOne),
                    typeof (MyPluginTwo),
                    typeof (MyPluginThree)
                };
            }
        }
    }

    public class MyPluginOne : IPlugin
    {
        public string Name
        {
            get { return "Plugin One"; }
        }

        public string Description
        {
            get { return "Part 1 of 3 for test plugin group"; }
        }

        public void Initialize() { }
    }

    public class MyPluginTwo : IPlugin
    {
        public string Name
        {
            get { return "Plugin Two"; }
        }

        public string Description
        {
            get { return "Part 2 of 3 for test plugin group"; }
        }

        public void Initialize() { }
    }

    public class MyPluginThree : IPlugin
    {
        public string Name
        {
            get { return "Plugin Three"; }
        }

        public string Description
        {
            get { return "Part 3 of 3 for test plugin group"; }
        }

        public void Initialize() { }
    }
}

Here is how the Group Plugin is displayed in the UI.

  • IPluginGroup
  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Telligent
  • Professional Services
  • Submit a Support Ticket
  • Become a Partner
  • Request a Demo
  • Contact Us

About
Privacy Policy
Terms of use
Copyright 2024 Verint, Inc.
Powered by Verint Community