To ensure that a plugin is recognized and displayed on your intranet, you need to create a GrailsPlugin that implements TaackPlugin.

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 is a list of PluginRole objects that associate roles from springSecurityService with a RoleRanking. The RoleRanking ranges from the lowest access level (USER) to the highest access level (DIRECTOR).

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

linkClasses contains a list of TaackLinkClass that defines classes to be linked from other objects and their default behavior(Attribute displayed as name and controller action to redirect to). In this example, we specify that the Attachment class should be displayed in other classes using its publicName attribute, and the redirection should be set to the showAttachment action.

Plugin configuration

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

This is the section where we configure the application’s name, icon, package, and available language. It is also where we specify that the plugin uses the previously defined PluginRole and LinkClasses lists. In this case, we only populate the PluginRoleList.