com.atlassian.bamboo.plugin
Class BambooPluginUtils

java.lang.Object
  extended by com.atlassian.bamboo.plugin.BambooPluginUtils

public class BambooPluginUtils
extends java.lang.Object


Field Summary
static java.lang.String BAMBOO_APPLICATION_KEY
           
static java.lang.String BAMBOO_REMOTE_AGENT_APPLICATION_KEY
           
static java.lang.String PLUGIN_DESCRIPTOR_FILENAME
           
static java.lang.String SVN_REPOSITORY_PLUGIN_KEY
           
static java.lang.String TASK_VCS_CHECKOUT_PLUGIN_KEY
           
 
Method Summary
static java.lang.Iterable<TaskDefinition> filterTasks(BuildContext buildContext, java.lang.String pluginKey)
           
static java.lang.Iterable<TaskDefinition> filterTasks(java.lang.Iterable<TaskDefinition> taskDefinitions, java.lang.String pluginKey)
           
static java.lang.Iterable<TaskDefinition> filterTasks(Job job, java.lang.String pluginKey)
           
static com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> getModuleDescriptorNameOrdering()
           
static void handleError(java.lang.String message, java.lang.Error error)
          Checks whether an error is critical and should be thrown further, or whether to just log the message and continue the execution.
static
<T> com.google.common.base.Function<com.atlassian.plugin.ModuleDescriptor<T>,T>
instantiateModule()
           
static com.google.common.base.Predicate<TaskProcessCommandDecoratorModuleDescriptor> isTaskProcessCommandDecoratorApplicableTo(java.lang.String pluginKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BAMBOO_APPLICATION_KEY

public static final java.lang.String BAMBOO_APPLICATION_KEY
See Also:
Constant Field Values

BAMBOO_REMOTE_AGENT_APPLICATION_KEY

public static final java.lang.String BAMBOO_REMOTE_AGENT_APPLICATION_KEY
See Also:
Constant Field Values

PLUGIN_DESCRIPTOR_FILENAME

public static final java.lang.String PLUGIN_DESCRIPTOR_FILENAME
See Also:
Constant Field Values

TASK_VCS_CHECKOUT_PLUGIN_KEY

public static final java.lang.String TASK_VCS_CHECKOUT_PLUGIN_KEY
See Also:
Constant Field Values

SVN_REPOSITORY_PLUGIN_KEY

public static final java.lang.String SVN_REPOSITORY_PLUGIN_KEY
See Also:
Constant Field Values
Method Detail

handleError

public static void handleError(java.lang.String message,
                               java.lang.Error error)
Checks whether an error is critical and should be thrown further, or whether to just log the message and continue the execution. Use this method to handle exceptions thrown within Plugins, as we don't want them to bork our configuration pages nor damage normal Bamboo behaviour (except for the critical errors, like OOM and similar).

Parameters:
message - Message to be displayed in logs.
error - Error causing the trouble.

instantiateModule

public static <T> com.google.common.base.Function<com.atlassian.plugin.ModuleDescriptor<T>,T> instantiateModule()

isTaskProcessCommandDecoratorApplicableTo

public static com.google.common.base.Predicate<TaskProcessCommandDecoratorModuleDescriptor> isTaskProcessCommandDecoratorApplicableTo(@NotNull
                                                                                                                                      java.lang.String pluginKey)

getModuleDescriptorNameOrdering

@NotNull
public static com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> getModuleDescriptorNameOrdering()

filterTasks

public static java.lang.Iterable<TaskDefinition> filterTasks(BuildContext buildContext,
                                                             java.lang.String pluginKey)

filterTasks

public static java.lang.Iterable<TaskDefinition> filterTasks(java.lang.Iterable<TaskDefinition> taskDefinitions,
                                                             java.lang.String pluginKey)

filterTasks

public static java.lang.Iterable<TaskDefinition> filterTasks(Job job,
                                                             java.lang.String pluginKey)


Copyright © 2012 Atlassian. All Rights Reserved.