Class CapabilityHelperImpl
java.lang.Object
com.atlassian.bamboo.v2.build.agent.capability.CapabilityHelperImpl
- All Implemented Interfaces:
CapabilityHelper
Class that helps the display and configuration of capabilities and requirements
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull com.opensymphony.webwork.dispatcher.json.JSONObjectbuildCapabilityJsonObject(@NotNull Capability capability) Build JSON object from capability.@Nullable Stringtries to figure out the extra information of a capability based on the key.@NotNull StringgetCapabilityLabel(String key) Tries to figure out the capability Label.Get the jquery represnetation of the capability to pick the correct tab to navigate to.getCapabilityType(String key) The key of the type of capability e.g.@NotNull CapabilityTypeget capability Type object from capability key.@Nullable CapabilityTypegetCapabilityTypeFromTypeString(String capabilityTypeKey) getFilteredBuildersFromTypeString(String capabilityTypeKey, String capabilityPrefix)
-
Field Details
-
builtinCapabilityTypes
-
-
Constructor Details
-
CapabilityHelperImpl
public CapabilityHelperImpl(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
-
Method Details
-
buildCapabilityJsonObject
@NotNull public @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject buildCapabilityJsonObject(@NotNull @NotNull Capability capability) throws com.opensymphony.webwork.dispatcher.json.JSONException Build JSON object from capability.- Specified by:
buildCapabilityJsonObjectin interfaceCapabilityHelper- Parameters:
capability- Capability- Returns:
- JSON object
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException- When an error occurs during creation of JSON object
-
getCapabilityTypeFromTypeString
- Specified by:
getCapabilityTypeFromTypeStringin interfaceCapabilityHelper
-
getFilteredBuildersFromTypeString
public Collection<BuilderCapabilityDescriptor> getFilteredBuildersFromTypeString(String capabilityTypeKey, String capabilityPrefix) - Specified by:
getFilteredBuildersFromTypeStringin interfaceCapabilityHelper
-
getCapabilityTypeFromKey
Description copied from interface:CapabilityHelperget capability Type object from capability key. e.g. Jdk, Builder, Generic (for custom)- Specified by:
getCapabilityTypeFromKeyin interfaceCapabilityHelper- Parameters:
key- of the capability- Returns:
- capbilty type for the given key
-
getCapabilityType
Description copied from interface:CapabilityHelperThe key of the type of capability e.g. "jdk"- Specified by:
getCapabilityTypein interfaceCapabilityHelper- Parameters:
key- of the capability- Returns:
- key representing the capability type
-
getCapabilityLabel
Tries to figure out the capability Label. If it fails it will return the original key.- Specified by:
getCapabilityLabelin interfaceCapabilityHelper- Parameters:
key- to find the label for- Returns:
- the label for the capability (or the original passed in key, if it fails)
-
getCapabilityExtraInfo
tries to figure out the extra information of a capability based on the key. If it fails it returns null.- Specified by:
getCapabilityExtraInfoin interfaceCapabilityHelper- Parameters:
key- of the capability- Returns:
- the extra information (pretty) for that capability.
-
getCapabilityTabForKey
Get the jquery represnetation of the capability to pick the correct tab to navigate to.- Specified by:
getCapabilityTabForKeyin interfaceCapabilityHelper- Parameters:
key- to replace (usually the Label of the capability)- Returns:
- jquery representation of the key.
-
getCapabilityTypes
- Specified by:
getCapabilityTypesin interfaceCapabilityHelper- Returns:
- a list of all selectable capability types.
-