Class CapabilityContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.v2.build.agent.capability.CapabilityContextImpl
-
- All Implemented Interfaces:
CapabilityContext
public class CapabilityContextImpl extends Object implements CapabilityContext
-
-
Constructor Summary
Constructors Constructor Description CapabilityContextImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCapabilitySet()Removes whatever is currently stored in thread local@Nullable ReadOnlyCapabilitySetgetCapabilitySet()Retrieves the capability set currently stored within the context, If empty the shared local (server) capabilities are returned@Nullable StringgetCapabilityValue(@NotNull String key)Convenience method.voidsetCapabilitySet(@Nullable ReadOnlyCapabilitySet capabilitySet)Stores a specific capability set within the ThreadLocal
-
-
-
Method Detail
-
getCapabilitySet
@Nullable public @Nullable ReadOnlyCapabilitySet getCapabilitySet()
Description copied from interface:CapabilityContextRetrieves the capability set currently stored within the context, If empty the shared local (server) capabilities are returned- Specified by:
getCapabilitySetin interfaceCapabilityContext- Returns:
- ReadOnlyCapabilitySet
-
setCapabilitySet
public void setCapabilitySet(@Nullable @Nullable ReadOnlyCapabilitySet capabilitySet)Description copied from interface:CapabilityContextStores a specific capability set within the ThreadLocal- Specified by:
setCapabilitySetin interfaceCapabilityContext
-
clearCapabilitySet
public void clearCapabilitySet()
Description copied from interface:CapabilityContextRemoves whatever is currently stored in thread local- Specified by:
clearCapabilitySetin interfaceCapabilityContext
-
getCapabilityValue
@Nullable public @Nullable String getCapabilityValue(@NotNull @NotNull String key)
Description copied from interface:CapabilityContextConvenience method. Retrieves value of capability.- Specified by:
getCapabilityValuein interfaceCapabilityContext- Parameters:
key- capability key- Returns:
- capability value or null if there are no capabilities set or there's no capability of given key
-
-