Package com.atlassian.bamboo.capability
Class CapabilityHibernateSetDao
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate5.support.HibernateDaoSupport
-
- com.atlassian.bamboo.persistence.BambooHibernateObjectDao
-
- com.atlassian.bamboo.capability.CapabilityHibernateSetDao
-
- All Implemented Interfaces:
bucket.core.persistence.ObjectDao
,CapabilitySetDao
,BambooObjectDao
,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
EphemeralAgentTemplateCapabilitySetHibernateDao
,ImageCapabilitySetHibernateDao
,LocalCapabilityHibernateSetDao
,RemoteCapabilityHibernateSetDao
public class CapabilityHibernateSetDao extends BambooHibernateObjectDao implements CapabilitySetDao
-
-
Constructor Summary
Constructors Constructor Description CapabilityHibernateSetDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull List<String>
findUniqueCapabilityKeys()
Finds all the distinct capability keys@NotNull Collection<String>
getAllSystemKeysByType(@NotNull String type)
Returns a list of Capability Keys that match the given type including those for Elastic images.@Nullable ElasticImageConfiguration
getElasticImageConfiguration(@NotNull CapabilitySet capabilitySet)
Finds ElasticImageConfiguration using capability setClass
getPersistentClass()
@Nullable PipelineDefinition
getPipelineDefinition(@NotNull CapabilitySet capabilitySet)
CapabilitySet
getSharedCapabilitySet()
Accessor for getting shared capabilities@NotNull Collection<Capability>
getSystemCapabilities(String type)
Collection ofCapability
which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.@NotNull Collection<Capability>
getSystemCapabilitiesByKey(String key)
Collection ofCapability
which have the specified key@NotNull Collection<String>
getSystemKeysExcludingElasticByType(@NotNull String type)
Returns a list of Capability Keys that match the given type but not for capabilities used by Elastic Images.void
saveCapabilitySet(CapabilitySet capabilitySet)
Persist capabilites-
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, updateModificationData
-
Methods inherited from class org.springframework.orm.hibernate5.support.HibernateDaoSupport
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
-
-
-
-
Method Detail
-
getPersistentClass
public Class getPersistentClass()
- Specified by:
getPersistentClass
in interfacebucket.core.persistence.ObjectDao
-
getPipelineDefinition
@Nullable public @Nullable PipelineDefinition getPipelineDefinition(@NotNull @NotNull CapabilitySet capabilitySet)
- Specified by:
getPipelineDefinition
in interfaceCapabilitySetDao
-
getElasticImageConfiguration
@Nullable public @Nullable ElasticImageConfiguration getElasticImageConfiguration(@NotNull @NotNull CapabilitySet capabilitySet)
Description copied from interface:CapabilitySetDao
Finds ElasticImageConfiguration using capability set- Specified by:
getElasticImageConfiguration
in interfaceCapabilitySetDao
- Returns:
-
getSharedCapabilitySet
public CapabilitySet getSharedCapabilitySet()
Description copied from interface:CapabilitySetDao
Accessor for getting shared capabilities- Specified by:
getSharedCapabilitySet
in interfaceCapabilitySetDao
- Returns:
-
findUniqueCapabilityKeys
@NotNull public @NotNull List<String> findUniqueCapabilityKeys()
Description copied from interface:CapabilitySetDao
Finds all the distinct capability keys- Specified by:
findUniqueCapabilityKeys
in interfaceCapabilitySetDao
- Returns:
-
getSystemCapabilities
@NotNull public @NotNull Collection<Capability> getSystemCapabilities(String type)
Description copied from interface:CapabilitySetDao
Collection ofCapability
which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.- Specified by:
getSystemCapabilities
in interfaceCapabilitySetDao
- Parameters:
type
- eg "builder" or "jdk"- Returns:
- capabilities
-
getSystemKeysExcludingElasticByType
@NotNull public @NotNull Collection<String> getSystemKeysExcludingElasticByType(@NotNull @NotNull String type)
Description copied from interface:CapabilitySetDao
Returns a list of Capability Keys that match the given type but not for capabilities used by Elastic Images.- Specified by:
getSystemKeysExcludingElasticByType
in interfaceCapabilitySetDao
- Parameters:
type
- eg "builder" or "jdk"- Returns:
- list of capability keys eg. "system.builder.mvn2.Maven 2"
-
getAllSystemKeysByType
@NotNull public @NotNull Collection<String> getAllSystemKeysByType(@NotNull @NotNull String type)
Description copied from interface:CapabilitySetDao
Returns a list of Capability Keys that match the given type including those for Elastic images.- Specified by:
getAllSystemKeysByType
in interfaceCapabilitySetDao
- Parameters:
type
- eg "builder" or "jdk"- Returns:
-
getSystemCapabilitiesByKey
@NotNull public @NotNull Collection<Capability> getSystemCapabilitiesByKey(String key)
Description copied from interface:CapabilitySetDao
Collection ofCapability
which have the specified key- Specified by:
getSystemCapabilitiesByKey
in interfaceCapabilitySetDao
- Returns:
-
saveCapabilitySet
public void saveCapabilitySet(CapabilitySet capabilitySet)
Description copied from interface:CapabilitySetDao
Persist capabilites- Specified by:
saveCapabilitySet
in interfaceCapabilitySetDao
-
-