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

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityType
      extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityTypeModule
          extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractExecutableCapabilityTypeModule
All Implemented Interfaces:
InitablePluginModule, BambooPluginModule, CapabilityDefaultsHelper, CapabilityType, CapabilityTypeModule, com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork.LocaleProvider, java.lang.Comparable<CapabilityType>
Direct Known Subclasses:
AbstractMultipleExecutableCapabilityTypeModule, SshCapabilityTypeModule

public abstract class AbstractExecutableCapabilityTypeModule
extends AbstractCapabilityTypeModule
implements CapabilityDefaultsHelper, com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork.LocaleProvider


Field Summary
protected static java.lang.String AGENT_CAPABILITY_TYPE_PREFIX
           
 
Fields inherited from interface com.atlassian.bamboo.v2.build.agent.capability.CapabilityDefaultsHelper
CAPABILITY_BUILDER_PREFIX, CAPABILITY_BUILDER_TYPE
 
Constructor Summary
AbstractExecutableCapabilityTypeModule()
           
 
Method Summary
 CapabilitySet addDefaultCapabilities(CapabilitySet capabilitySet)
          Adds default Capabilities for this module.
 Capability getCapability(java.util.Map<java.lang.String,java.lang.String[]> params)
          Returns a new capability given the action params map
abstract  java.lang.String getCapabilityUndefinedKey()
           
abstract  java.util.List<java.lang.String> getDefaultWindowPaths()
           
abstract  java.lang.String getExecutableFilename()
           
abstract  java.lang.String getExecutableKey()
           
 java.lang.String getLabel(java.lang.String key)
          The display label
 java.util.Locale getLocale()
           
abstract  java.lang.String getMandatoryCapabilityKey()
           
static java.lang.String getParamValue(java.util.Map<java.lang.String,java.lang.String[]> params, java.lang.String field)
           
 java.lang.String getText(java.lang.String key)
           
 java.lang.String getText(java.lang.String s, java.lang.Object[] objects)
           
 java.lang.String getText(java.lang.String key, java.lang.String[] args)
           
protected  com.opensymphony.xwork.TextProvider getTextProvider()
           
 void setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)
           
 java.util.Map<java.lang.String,java.lang.String> validate(java.util.Map<java.lang.String,java.lang.String[]> params)
          Validate given an action params map.
 
Methods inherited from class com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityTypeModule
getCapabilityTypeKey, getCapabilityTypeLabel, getEditHtml, getExtraInfo, getNewKeyFromLabel, getSortOrder, getValueDescriptionKey, init, isAllowRename, setTemplateRenderer
 
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
getViewTypeAction, updatePlanForNewLabel
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

AGENT_CAPABILITY_TYPE_PREFIX

protected static final java.lang.String AGENT_CAPABILITY_TYPE_PREFIX
See Also:
Constant Field Values
Constructor Detail

AbstractExecutableCapabilityTypeModule

public AbstractExecutableCapabilityTypeModule()
Method Detail

getMandatoryCapabilityKey

public abstract java.lang.String getMandatoryCapabilityKey()

getExecutableKey

public abstract java.lang.String getExecutableKey()

getCapabilityUndefinedKey

public abstract java.lang.String getCapabilityUndefinedKey()

getDefaultWindowPaths

public abstract java.util.List<java.lang.String> getDefaultWindowPaths()

getExecutableFilename

public abstract java.lang.String getExecutableFilename()

getLabel

@NotNull
public java.lang.String getLabel(@NotNull
                                         java.lang.String key)
Description copied from interface: CapabilityType
The display label

Specified by:
getLabel in interface CapabilityType
Returns:

validate

@NotNull
public java.util.Map<java.lang.String,java.lang.String> validate(@NotNull
                                                                         java.util.Map<java.lang.String,java.lang.String[]> params)
Description copied from interface: CapabilityType
Validate given an action params map.

Specified by:
validate in interface CapabilityType
Returns:
Map with errors. key = field name, value = error message

getParamValue

@Nullable
public static java.lang.String getParamValue(@NotNull
                                                      java.util.Map<java.lang.String,java.lang.String[]> params,
                                                      java.lang.String field)

getCapability

@NotNull
public Capability getCapability(@NotNull
                                        java.util.Map<java.lang.String,java.lang.String[]> params)
Description copied from interface: CapabilityType
Returns a new capability given the action params map

Specified by:
getCapability in interface CapabilityType
Returns:
@TODO WMC 20080114 - Why did edwin make this @notnull? Need to check...

addDefaultCapabilities

@NotNull
public CapabilitySet addDefaultCapabilities(@NotNull
                                                    CapabilitySet capabilitySet)
Description copied from interface: CapabilityDefaultsHelper
Adds default Capabilities for this module. Used during auto-detecting server capabilities.

Specified by:
addDefaultCapabilities in interface CapabilityDefaultsHelper
Parameters:
capabilitySet - to add the capability to
Returns:
the supplied capabilitySet with the new capabilities included if found, else the given capabilitySet

getTextProvider

protected com.opensymphony.xwork.TextProvider getTextProvider()

getText

public java.lang.String getText(java.lang.String key)
Specified by:
getText in interface com.atlassian.core.i18n.I18nTextProvider

getText

public java.lang.String getText(java.lang.String s,
                                java.lang.Object[] objects)
Specified by:
getText in interface com.atlassian.core.i18n.I18nTextProvider

getText

public java.lang.String getText(java.lang.String key,
                                java.lang.String[] args)

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface com.opensymphony.xwork.LocaleProvider

setI18nBeanFactory

public final void setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)


Copyright © 2012 Atlassian. All Rights Reserved.