com.atlassian.bamboo.capability
Class CapabilityHibernateSetDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.bamboo.persistence.BambooHibernateObjectDao
                  extended by com.atlassian.bamboo.capability.CapabilityHibernateSetDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, CapabilitySetDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ImageCapabilitySetHibernateDao, LocalCapabilityHibernateSetDao, RemoteCapabilityHibernateSetDao

public class CapabilityHibernateSetDao
extends BambooHibernateObjectDao
implements CapabilitySetDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
CapabilityHibernateSetDao()
           
 
Method Summary
 java.util.List<java.lang.String> findUniqueCapabilityKeys()
          Finds all the distinct capability keys
 java.util.Collection<java.lang.String> getAllSystemKeysByType(java.lang.String type)
          Returns a list of Capability Keys that match the given type including those for Elastic images.
 ElasticImageConfiguration getElasticImageConfiguration(CapabilitySet capabilitySet)
          Finds ElasticImageConfiguration using capability set
 java.lang.Class getPersistentClass()
           
 PipelineDefinition getPipelineDefinition(CapabilitySet capabilitySet)
           
 CapabilitySet getSharedCapabilitySet()
          Accessor for getting shared capabilities
 java.util.Collection<Capability> getSystemCapabilities(java.lang.String type)
          Collection of Capability which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.
 java.util.Collection<Capability> getSystemCapabilitiesByKey(java.lang.String key)
          Collection of Capability which have the specified key
 java.util.Collection<java.lang.String> getSystemKeysExcludingElasticByType(java.lang.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
executeCountQuery, executeReturnLong, findById, findById
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
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
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

CapabilityHibernateSetDao

public CapabilityHibernateSetDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

getPipelineDefinition

@Nullable
public PipelineDefinition getPipelineDefinition(@NotNull
                                                         CapabilitySet capabilitySet)
Specified by:
getPipelineDefinition in interface CapabilitySetDao

getElasticImageConfiguration

@Nullable
public ElasticImageConfiguration getElasticImageConfiguration(@NotNull
                                                                       CapabilitySet capabilitySet)
Description copied from interface: CapabilitySetDao
Finds ElasticImageConfiguration using capability set

Specified by:
getElasticImageConfiguration in interface CapabilitySetDao
Returns:

getSharedCapabilitySet

public CapabilitySet getSharedCapabilitySet()
Description copied from interface: CapabilitySetDao
Accessor for getting shared capabilities

Specified by:
getSharedCapabilitySet in interface CapabilitySetDao
Returns:

findUniqueCapabilityKeys

@NotNull
public java.util.List<java.lang.String> findUniqueCapabilityKeys()
Description copied from interface: CapabilitySetDao
Finds all the distinct capability keys

Specified by:
findUniqueCapabilityKeys in interface CapabilitySetDao
Returns:

getSystemCapabilities

@NotNull
public java.util.Collection<Capability> getSystemCapabilities(java.lang.String type)
Description copied from interface: CapabilitySetDao
Collection of Capability which have keys prefixed with system.{type} Used to identify Bamboo system capabilities for Builders / JDKs.

Specified by:
getSystemCapabilities in interface CapabilitySetDao
Parameters:
type - eg "builder" or "jdk"
Returns:
capabilities

getSystemKeysExcludingElasticByType

@NotNull
public java.util.Collection<java.lang.String> getSystemKeysExcludingElasticByType(@NotNull
                                                                                          java.lang.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 interface CapabilitySetDao
Parameters:
type - eg "builder" or "jdk"
Returns:
list of capability keys eg. "system.builder.mvn2.Maven 2"

getAllSystemKeysByType

@NotNull
public java.util.Collection<java.lang.String> getAllSystemKeysByType(@NotNull
                                                                             java.lang.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 interface CapabilitySetDao
Parameters:
type - eg "builder" or "jdk"
Returns:
@return list of capability keys eg. "system.builder.mvn2.Maven 2"

getSystemCapabilitiesByKey

@NotNull
public java.util.Collection<Capability> getSystemCapabilitiesByKey(java.lang.String key)
Description copied from interface: CapabilitySetDao
Collection of Capability which have the specified key

Specified by:
getSystemCapabilitiesByKey in interface CapabilitySetDao
Returns:

saveCapabilitySet

public void saveCapabilitySet(CapabilitySet capabilitySet)
Description copied from interface: CapabilitySetDao
Persist capabilites

Specified by:
saveCapabilitySet in interface CapabilitySetDao


Copyright © 2010 Atlassian. All Rights Reserved.