All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.servicerocket.confluence.randombits.conveyor.condition.HasPluginEnabledCondition Maven / Gradle / Ivy

There is a newer version: 2.5.12
Show newest version
package com.servicerocket.confluence.randombits.conveyor.condition;

import com.atlassian.plugin.PluginAccessor;

import java.util.Map;

/**
 * Checks if the provided plugin is currently installed and enabled. It should be passed the plugin key
 * as the 'pluginKey' parameter. Eg:
 *
 * 
 *   <condition class="com.servicerocket.confluence.randombits.conveyor.condition.HasPluginEnabledCondition">
 *     <param name="pluginKey">my.plugin.key</param>
 *   </condition>
 * 
 *
 * @see HasPluginInstalledCondition if you just want to check that it is installed, not also enabled.
 */
public class HasPluginEnabledCondition extends AbstractPluginCondition {

    public HasPluginEnabledCondition( PluginAccessor pluginAccessor ) {
        super( pluginAccessor );
    }

    public boolean shouldDisplay( Map stringObjectMap ) {
        return pluginAccessor.isPluginEnabled( pluginKey );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy