com.atlassian.bamboo.v2.build.agent.capability
Class AbstractCapabilityTypeModule

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityType
      extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityTypeModule
All Implemented Interfaces:
InitablePluginModule, BambooPluginModule, CapabilityType, CapabilityTypeModule, java.lang.Comparable<CapabilityType>
Direct Known Subclasses:
AbstractExecutableCapabilityTypeModule

public abstract class AbstractCapabilityTypeModule
extends AbstractCapabilityType
implements CapabilityTypeModule


Constructor Summary
AbstractCapabilityTypeModule()
           
 
Method Summary
 java.lang.String getCapabilityTypeKey()
          The key for the type typically lower case
 java.lang.String getCapabilityTypeLabel()
          Human readable version of the key
 java.lang.String getEditHtml()
          Renders the edit form using the ftl template declared in module descriptor.
 java.lang.String getExtraInfo(java.lang.String key)
          Displayed after the label
 java.lang.String getNewKeyFromLabel(java.lang.String oldKey, java.lang.String label)
          From the key and label, return a new key.
 int getSortOrder()
          Specifies how early in the UI the type should be shown
 java.lang.String getValueDescriptionKey(java.lang.String key, java.lang.String value)
          Given the key and value, show any custom description for the value
 void init(com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
          Initialises the Plugin with the plugin module descriptor
 boolean isAllowRename()
          Can you rename the key for this type
 void setTemplateRenderer(TemplateRenderer templateRenderer)
           
 
Methods inherited from class com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityType
compareTo, equals, getViewTypeAction, hashCode, toString, updatePlanForNewLabel, updateTasksForNewLabel
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.bamboo.v2.build.agent.capability.CapabilityType
getCapability, getLabel, getViewTypeAction, updatePlanForNewLabel, validate
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

AbstractCapabilityTypeModule

public AbstractCapabilityTypeModule()
Method Detail

getSortOrder

public int getSortOrder()
Description copied from interface: CapabilityType
Specifies how early in the UI the type should be shown

Specified by:
getSortOrder in interface CapabilityType
Returns:

getCapabilityTypeKey

@NotNull
public java.lang.String getCapabilityTypeKey()
Description copied from interface: CapabilityType
The key for the type typically lower case

Specified by:
getCapabilityTypeKey in interface CapabilityType
Returns:

getCapabilityTypeLabel

@NotNull
public java.lang.String getCapabilityTypeLabel()
Description copied from interface: CapabilityType
Human readable version of the key

Specified by:
getCapabilityTypeLabel in interface CapabilityType
Returns:

getExtraInfo

public java.lang.String getExtraInfo(@NotNull
                                     java.lang.String key)
Description copied from interface: CapabilityType
Displayed after the label

Specified by:
getExtraInfo in interface CapabilityType
Returns:

getValueDescriptionKey

public java.lang.String getValueDescriptionKey(@NotNull
                                               java.lang.String key,
                                               @Nullable
                                               java.lang.String value)
Description copied from interface: CapabilityType
Given the key and value, show any custom description for the value

Specified by:
getValueDescriptionKey in interface CapabilityType
Returns:

isAllowRename

public boolean isAllowRename()
Description copied from interface: CapabilityType
Can you rename the key for this type

Specified by:
isAllowRename in interface CapabilityType
Returns:

getNewKeyFromLabel

@NotNull
public java.lang.String getNewKeyFromLabel(@NotNull
                                                   java.lang.String oldKey,
                                                   @NotNull
                                                   java.lang.String label)
Description copied from interface: CapabilityType
From the key and label, return a new key. This is used in the rename process

Specified by:
getNewKeyFromLabel in interface CapabilityType
Returns:

getEditHtml

public java.lang.String getEditHtml()
Renders the edit form using the ftl template declared in module descriptor.

This method sets this as capabilityType variable which you can use in the template

Override this method if you need custom rendering.

Specified by:
getEditHtml in interface CapabilityTypeModule
Returns:
the Edit html

init

public void init(@NotNull
                 com.atlassian.plugin.ModuleDescriptor moduleDescriptor)
Description copied from interface: InitablePluginModule
Initialises the Plugin with the plugin module descriptor

Specified by:
init in interface InitablePluginModule
Parameters:
moduleDescriptor - Plugin module descriptor

setTemplateRenderer

public void setTemplateRenderer(TemplateRenderer templateRenderer)


Copyright © 2012 Atlassian. All Rights Reserved.