Class CapabilityContextImpl
java.lang.Object
com.atlassian.bamboo.v2.build.agent.capability.CapabilityContextImpl
- All Implemented Interfaces:
CapabilityContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes whatever is currently stored in thread local@Nullable ReadOnlyCapabilitySet
Retrieves the capability set currently stored within the context, If empty the shared local (server) capabilities are returned@Nullable String
getCapabilityValue
(@NotNull String key) Convenience method.void
setCapabilitySet
(@Nullable ReadOnlyCapabilitySet capabilitySet) Stores a specific capability set within the ThreadLocal
-
Constructor Details
-
CapabilityContextImpl
public CapabilityContextImpl()
-
-
Method Details
-
getCapabilitySet
Description copied from interface:CapabilityContext
Retrieves the capability set currently stored within the context, If empty the shared local (server) capabilities are returned- Specified by:
getCapabilitySet
in interfaceCapabilityContext
- Returns:
- ReadOnlyCapabilitySet
-
setCapabilitySet
Description copied from interface:CapabilityContext
Stores a specific capability set within the ThreadLocal- Specified by:
setCapabilitySet
in interfaceCapabilityContext
-
clearCapabilitySet
public void clearCapabilitySet()Description copied from interface:CapabilityContext
Removes whatever is currently stored in thread local- Specified by:
clearCapabilitySet
in interfaceCapabilityContext
-
getCapabilityValue
Description copied from interface:CapabilityContext
Convenience method. Retrieves value of capability.- Specified by:
getCapabilityValue
in interfaceCapabilityContext
- Parameters:
key
- capability key- Returns:
- capability value or null if there are no capabilities set or there's no capability of given key
-