com.atlassian.bamboo.v2.build.agent.capability
Interface CapabilityType

All Superinterfaces:
java.lang.Comparable<CapabilityType>
All Known Subinterfaces:
CapabilityTypeModule
All Known Implementing Classes:
AbstractCapabilityType, AbstractCapabilityTypeModule, BuilderCapabilityType, GenericCapabilityType, HgCapabilityTypeModule, JdkCapabilityType, PerforceCapabilityType

public interface CapabilityType
extends java.lang.Comparable<CapabilityType>

Effectively a capability type object that specifies certain behaviour characteristics.

A CapabilityType module may optionally implement the CapabilityDefaultsHelper interface for server- and agent-side capability auto detection.


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 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
 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 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 interface java.lang.Comparable
compareTo
 

Method Detail

getSortOrder

int getSortOrder()
Specifies how early in the UI the type should be shown

Returns:

getCapabilityTypeKey

@NotNull
java.lang.String getCapabilityTypeKey()
The key for the type typically lower case

Returns:

getCapabilityTypeLabel

@NotNull
java.lang.String getCapabilityTypeLabel()
Human readable version of the key

Returns:

getViewTypeAction

@Nullable
java.lang.String getViewTypeAction()
The action name of the list view action of this capability type

Returns:

validate

@NotNull
java.util.Map<java.lang.String,java.lang.String> validate(@NotNull
                                                                  java.util.Map<java.lang.String,java.lang.String[]> params)
Validate given an action params map.

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

getCapability

@NotNull
Capability getCapability(@NotNull
                                 java.util.Map<java.lang.String,java.lang.String[]> params)
Returns a new capability given the action params map

Parameters:
params -
Returns:
@TODO WMC 20080114 - Why did edwin make this @notnull? Need to check...

getLabel

@NotNull
java.lang.String getLabel(@NotNull
                                  java.lang.String key)
The display label

Parameters:
key -
Returns:

getExtraInfo

@Nullable
java.lang.String getExtraInfo(@NotNull
                                       java.lang.String key)
Displayed after the label

Parameters:
key -
Returns:

getValueDescriptionKey

@Nullable
java.lang.String getValueDescriptionKey(@NotNull
                                                 java.lang.String key,
                                                 @Nullable
                                                 java.lang.String value)
Given the key and value, show any custom description for the value

Parameters:
key -
value -
Returns:

isAllowRename

boolean isAllowRename()
Can you rename the key for this type

Returns:

getNewKeyFromLabel

@NotNull
java.lang.String getNewKeyFromLabel(@NotNull
                                            java.lang.String oldKey,
                                            @NotNull
                                            java.lang.String label)
From the key and label, return a new key. This is used in the rename process

Parameters:
key -
label -
Returns:

updatePlanForNewLabel

void updatePlanForNewLabel(@NotNull
                           Buildable plan,
                           @NotNull
                           java.lang.String oldLabel,
                           @NotNull
                           java.lang.String newLabel)
Perform custom work when the key has been updated.

Parameters:
plan -
oldLabel - label to replace
newLabel - new label


Copyright © 2011 Atlassian. All Rights Reserved.