For a plugin to be recognized and to be shown on your intranet, you will need to create a GrailsPlugin that implements TaackPlugin.

See here for example: CrewGrailsPlugin.groovy

In this file we configured the following things:

Roles and access

static final List<TaackPluginConfiguration.PluginRole> crewPluginRoles = [
    new TaackPluginConfiguration.PluginRole(
        "ROLE_CREW_ADMIN",
        TaackPluginConfiguration.PluginRole.RoleRanking.DIRECTOR),
    new TaackPluginConfiguration.PluginRole(
        "ROLE_CREW_MANAGER",
        TaackPluginConfiguration.PluginRole.RoleRanking.MANAGER),
    new TaackPluginConfiguration.PluginRole(
        "ROLE_CREW_USER",
        TaackPluginConfiguration.PluginRole.RoleRanking.USER),
]

crewPluginRoles contains a list of PluginRole that relates a springSecurityService’s Role to a RoleRanking going from lowest-access (USER) to highest-access (DIRECTOR).

static final List<TaackPluginConfiguration.TaackLinkClass> linkClasses = [
    new TaackPluginConfiguration.TaackLinkClass(
            Attachment.class,
            'publicName',
            AttachmentController.&showAttachment as MC)
]

linkClasses contains a list of TaackLinkClass, this defines classes that will be linked from other objects and their default comportment (Attribute displayed as name and controller action to redirect to). In this example we want Attachment to be able to be displayed in other classes under its publicName and we want it to redirect to showAttachment.

Plugin configuration

static final TaackPluginConfiguration pc = new TaackPluginConfiguration(
    "Crew",
    "/crew/crew.svg", "crew", Language.values() as List,
    new TaackPluginConfiguration.IPluginRole() {
        @Override
        List<TaackPluginConfiguration.PluginRole> getPluginRoles() {
            crewPluginRoles
        }
    })

This is where we set the app name, its icon, its package and the language in which it’s available, this is also where we indicate that the plugin uses the previously created PluginRole and LinkClasses list (In this case we only fill out the PluginRoleList).