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

java.lang.Object
  extended by com.atlassian.bamboo.v2.build.agent.capability.AbstractCapabilityType
      extended by com.atlassian.bamboo.v2.build.agent.capability.BuilderCapabilityType
All Implemented Interfaces:
CapabilityType, java.lang.Comparable<CapabilityType>

public class BuilderCapabilityType
extends AbstractCapabilityType


Constructor Summary
BuilderCapabilityType()
           
 
Method Summary
 java.util.Collection<BuilderCapabilityDescriptor> getBuilderTypes()
           
 Capability getCapability(java.util.Map<java.lang.String,java.lang.String[]> params)
          Returns a new capability given the action params map.
 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 getExtraInfo(java.lang.String key)
          Displayed after the label
 java.lang.String getLabel(java.lang.String key)
          The display 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
 TaskManager getTaskManager()
           
 com.opensymphony.xwork.TextProvider getTextProvider()
           
 java.lang.String getValueDescriptionKey(java.lang.String key, java.lang.String value)
          Given the key and value, show any custom description for the value
 java.lang.String getViewTypeAction()
          The action name of the list view action of this capability type
 boolean isAllowRename()
          Can you rename the key for this type
 void setTaskManager(TaskManager taskManager)
           
 void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)
           
 void updatePlanForNewLabel(Buildable plan, java.lang.String oldLabel, java.lang.String newLabel)
          Perform custom work when the key has been updated.
 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.AbstractCapabilityType
compareTo, equals, hashCode, toString, updateTasksForNewLabel
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuilderCapabilityType

public BuilderCapabilityType()
Method Detail

getSortOrder

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

Returns:

getCapabilityTypeKey

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

Returns:

getCapabilityTypeLabel

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

Returns:

getViewTypeAction

@Nullable
public java.lang.String getViewTypeAction()
Description copied from interface: CapabilityType
The action name of the list view action of this capability type

Specified by:
getViewTypeAction in interface CapabilityType
Overrides:
getViewTypeAction in class AbstractCapabilityType
Returns:

getLabel

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

Returns:

getExtraInfo

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

Returns:

getValueDescriptionKey

@Nullable
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

Returns:

isAllowRename

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

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

Returns:

updatePlanForNewLabel

public void updatePlanForNewLabel(@NotNull
                                  Buildable plan,
                                  @NotNull
                                  java.lang.String oldLabel,
                                  @NotNull
                                  java.lang.String newLabel)
Description copied from interface: CapabilityType
Perform custom work when the key has been updated.

Specified by:
updatePlanForNewLabel in interface CapabilityType
Overrides:
updatePlanForNewLabel in class AbstractCapabilityType
oldLabel - label to replace
newLabel - new label

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.

Returns:
Map with errors. key = field name, value = error message

getCapability

@NotNull
public Capability getCapability(@NotNull
                                        java.util.Map<java.lang.String,java.lang.String[]> params)
Returns a new capability given the action params map. For builders that are not "LabelPathMapConfigurable" label and path are not fetched from action params but rather from a call to Builder#addDefaultLabelPathMaps.

Parameters:
params - action params
Returns:
new capability

getBuilderTypes

public java.util.Collection<BuilderCapabilityDescriptor> getBuilderTypes()

getTaskManager

public TaskManager getTaskManager()

setTaskManager

public void setTaskManager(TaskManager taskManager)

getTextProvider

public com.opensymphony.xwork.TextProvider getTextProvider()

setTextProvider

public void setTextProvider(com.opensymphony.xwork.TextProvider textProvider)


Copyright © 2012 Atlassian. All Rights Reserved.