com.atlassian.bamboo.util
Class BambooSpringUtils

java.lang.Object
  extended by com.atlassian.bamboo.util.BambooSpringUtils

public class BambooSpringUtils
extends Object


Method Summary
static
<T> T
autowireComponent(T object)
          Autowires the supplied objects and returns it for easy chaining.
static
<T> T
createCompleteComponent(Class<T> objectClass)
          Creates a new Spring bean of the given class.
static org.springframework.transaction.support.TransactionTemplate readOnly(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
          Clones the supplied template.
static org.springframework.transaction.support.TransactionTemplate requiresNew(org.springframework.transaction.support.TransactionTemplate transactionTemplate)
          Clones the supplied template.
static Object unwrapIfProxy(Object bean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readOnly

@NotNull
public static org.springframework.transaction.support.TransactionTemplate readOnly(@NotNull
                                                                                           org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Clones the supplied template. The clone will produce read-only transactions.


requiresNew

@NotNull
public static org.springframework.transaction.support.TransactionTemplate requiresNew(@NotNull
                                                                                              org.springframework.transaction.support.TransactionTemplate transactionTemplate)
Clones the supplied template. The clone will produce new transactions each time it's used.


unwrapIfProxy

public static Object unwrapIfProxy(@NotNull
                                   Object bean)
                            throws Exception
Throws:
Exception

autowireComponent

public static <T> T autowireComponent(T object)
Autowires the supplied objects and returns it for easy chaining.


createCompleteComponent

@NotNull
public static <T> T createCompleteComponent(@NotNull
                                                    Class<T> objectClass)
Creates a new Spring bean of the given class. The new instance is fully initialized - all it's dependencies are properly injected (all lifecycle processes are executed during object creation).

Type Parameters:
T - type of the component
Parameters:
objectClass - class of the object to be created as a Spring component
Returns:
new instance of the component


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.