Class ThirdPartyComponentModuleDescriptor

java.lang.Object
com.atlassian.plugin.descriptors.AbstractModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
com.codebarrel.jira.plugin.automation.thirdparty.ThirdPartyComponentModuleDescriptor
All Implemented Interfaces:
com.atlassian.plugin.ModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>, com.atlassian.plugin.Resourced, com.atlassian.plugin.ScopeAware, com.atlassian.plugin.StateAware, Comparable<AutomationActionModuleDescriptor>

public class ThirdPartyComponentModuleDescriptor extends com.atlassian.plugin.descriptors.AbstractModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent> implements Comparable<AutomationActionModuleDescriptor>
  • Field Summary

    Fields inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor

    key, moduleClass, moduleClassName, moduleFactory, name, plugin, resources
  • Constructor Summary

    Constructors
    Constructor
    Description
    ThirdPartyComponentModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    com.codebarrel.automation.api.config.ComponentType
     
    com.codebarrel.automation.api.thirdparty.AutomationRuleComponent
     
    void
    init(com.atlassian.plugin.Plugin plugin, com.atlassian.plugin.module.Element element)
     
    boolean
    This allows this rule component to be added in project specific rules in the project admin section Pluggable components should only allow this if the rule component is safe to be used by project administrators and cannot be used by them to escalate their permissions.
    protected void
    validate(com.atlassian.plugin.module.Element element)
     

    Methods inherited from class com.atlassian.plugin.descriptors.AbstractModuleDescriptor

    assertModuleClassImplements, checkPermissions, destroy, disabled, enabled, equals, getCompleteKey, getDescription, getDescriptionKey, getI18nNameKey, getKey, getMinJavaVersion, getModuleClass, getModuleClassName, getName, getParams, getPlugin, getPluginKey, getRequiredPermissions, getResourceDescriptor, getResourceDescriptors, getResourceLocation, getScopeKey, hashCode, isBroken, isEnabled, isEnabledByDefault, isSystemModule, loadClass, satisfiesMinJavaVersion, setBroken, setPlugin, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.atlassian.plugin.ModuleDescriptor

    getDisplayName
  • Constructor Details

    • ThirdPartyComponentModuleDescriptor

      public ThirdPartyComponentModuleDescriptor(com.atlassian.plugin.module.ModuleFactory moduleFactory)
  • Method Details

    • validate

      protected void validate(com.atlassian.plugin.module.Element element)
      Overrides:
      validate in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
    • init

      public void init(@Nonnull com.atlassian.plugin.Plugin plugin, @Nonnull com.atlassian.plugin.module.Element element) throws com.atlassian.plugin.PluginParseException
      Specified by:
      init in interface com.atlassian.plugin.ModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
      Overrides:
      init in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
      Throws:
      com.atlassian.plugin.PluginParseException
    • getModule

      public com.codebarrel.automation.api.thirdparty.AutomationRuleComponent getModule()
      Specified by:
      getModule in interface com.atlassian.plugin.ModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
      Specified by:
      getModule in class com.atlassian.plugin.descriptors.AbstractModuleDescriptor<com.codebarrel.automation.api.thirdparty.AutomationRuleComponent>
    • compareTo

      public int compareTo(AutomationActionModuleDescriptor otherDescriptor)
      Specified by:
      compareTo in interface Comparable<AutomationActionModuleDescriptor>
    • getComponentType

      public com.codebarrel.automation.api.config.ComponentType getComponentType()
    • isProjectSafe

      public boolean isProjectSafe()
      This allows this rule component to be added in project specific rules in the project admin section Pluggable components should only allow this if the rule component is safe to be used by project administrators and cannot be used by them to escalate their permissions. This generally means:
      • Don't use velocity rendering (velocity allows access to any underlying objects and methods which could be used to get around permission checks)
      • Perform appropriate permission checks in your server-side validation if your rule action can perform actions that now all users should be able to do.

      Return false by default.

      Returns:
      true if this module can show up in project admin