com.atlassian.bamboo.plugins.hg
Class HgCapabilityType

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.plugins.hg.HgCapabilityType
All Implemented Interfaces:
InitablePluginModule, BambooPluginModule, CapabilityType, CapabilityTypeModule, com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork.LocaleProvider, java.lang.Comparable<CapabilityType>

public class HgCapabilityType
extends AbstractCapabilityTypeModule
implements com.atlassian.core.i18n.I18nTextProvider, com.opensymphony.xwork.LocaleProvider


Field Summary
static java.lang.String EXECUTABLE_KIND_FIELD
           
static java.lang.String HG_CAPABILITY
           
static java.lang.String SSH_CAPABILITY
           
 
Constructor Summary
HgCapabilityType()
           
 
Method Summary
 Capability getCapability(java.util.Map<java.lang.String,java.lang.String[]> params)
          Returns a new capability given the action params map
 java.lang.String getExecutableDescription(java.lang.String key)
           
 java.util.Map<java.lang.String,java.lang.String> getExecutableTypes()
           
 java.lang.String getLabel(java.lang.String key)
          The display label
 java.util.Locale getLocale()
           
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)
           
 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 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, init, isAllowRename, setTemplateRenderer
 
Methods inherited from class com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityType
compareTo, equals, getViewTypeAction, hashCode, toString, updatePlanForNewLabel
 
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

EXECUTABLE_KIND_FIELD

public static final java.lang.String EXECUTABLE_KIND_FIELD
See Also:
Constant Field Values

HG_CAPABILITY

public static final java.lang.String HG_CAPABILITY
See Also:
Constant Field Values

SSH_CAPABILITY

public static final java.lang.String SSH_CAPABILITY
See Also:
Constant Field Values
Constructor Detail

HgCapabilityType

public HgCapabilityType()
Method Detail

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:

getExecutableTypes

public java.util.Map<java.lang.String,java.lang.String> getExecutableTypes()

getExecutableDescription

public java.lang.String getExecutableDescription(java.lang.String key)

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
Overrides:
getValueDescriptionKey in class AbstractCapabilityTypeModule
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...

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 © 2010 Atlassian. All Rights Reserved.