Package com.atlassian.bamboo.task
Class TaskDefinitionImpl
- java.lang.Object
-
- com.atlassian.bamboo.task.TaskDefinitionImpl
-
- All Implemented Interfaces:
EntityWithOid
,ImmutableEntityWithOid
,PluginKeyProvider
,TaskDefinition
,TaskIdentifier
,Serializable
- Direct Known Subclasses:
DecoratedTaskDefinitionImpl
,RuntimeTaskDefinitionImpl
@Internal public class TaskDefinitionImpl extends Object implements TaskDefinition
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.task.TaskDefinition
DISABLED, ENABLED
-
-
Constructor Summary
Constructors Constructor Description TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, boolean isEnabled, @NotNull List<TaskConditionConfig> conditions, @NotNull Map<String,String> configuration, boolean finalising)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, boolean isEnabled, @NotNull List<TaskConditionConfig> conditions, @NotNull Map<String,String> configuration, boolean finalising, @NotNull TaskRootDirectorySelector taskRootDirectorySelector)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> configuration)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> configuration, boolean finalising)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, boolean isEnabled, @NotNull Map<String,String> configuration, boolean finalising, @NotNull TaskRootDirectorySelector taskRootDirectorySelector)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, @NotNull Map<String,String> taskConfigMap)
TaskDefinitionImpl(long id, @NotNull String pluginKey, @Nullable String userDescription, @NotNull Map<String,String> configuration, boolean finalising)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object obj)
boolean
equals(Object o)
@NotNull List<TaskConditionConfig>
getConditions()
@NotNull Map<String,String>
getConfiguration()
Represents the raw configuration data for this configuration.long
getId()
BambooEntityOid
getOid()
OID assigned to this object.@NotNull String
getPluginKey()
@NotNull TaskRootDirectorySelector
getRootDirectorySelector()
@Nullable String
getUserDescription()
int
hashCode()
boolean
isEnabled()
boolean
isFinalising()
void
setConditions(@NotNull List<TaskConditionConfig> conditions)
void
setConfiguration(@NotNull Map<String,String> configuration)
void
setEnabled(boolean isEnabled)
Tells bamboo whether this task should run as a part of this build or not.void
setFinalising(boolean finalising)
void
setOid(BambooEntityOid oid)
Assign a newBambooEntityOid
to this object.void
setRootDirectorySelector(@NotNull TaskRootDirectorySelector rootDirectorySelector)
void
setUserDescription(@Nullable String userDescription)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.task.TaskDefinition
getEntityType
-
-
-
-
Constructor Detail
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, @NotNull @NotNull Map<String,String> taskConfigMap)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull Map<String,String> configuration)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull Map<String,String> configuration, boolean finalising)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull List<TaskConditionConfig> conditions, @NotNull @NotNull Map<String,String> configuration, boolean finalising)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, @NotNull @NotNull Map<String,String> configuration, boolean finalising)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull Map<String,String> configuration, boolean finalising, @NotNull @NotNull TaskRootDirectorySelector taskRootDirectorySelector)
-
TaskDefinitionImpl
public TaskDefinitionImpl(long id, @NotNull @NotNull String pluginKey, @Nullable @Nullable String userDescription, boolean isEnabled, @NotNull @NotNull List<TaskConditionConfig> conditions, @NotNull @NotNull Map<String,String> configuration, boolean finalising, @NotNull @NotNull TaskRootDirectorySelector taskRootDirectorySelector)
-
-
Method Detail
-
getId
public long getId()
- Specified by:
getId
in interfaceTaskIdentifier
- Returns:
- the id of this configuration. Unique within the given context (e.g.
Job
-
getPluginKey
@NotNull public @NotNull String getPluginKey()
- Specified by:
getPluginKey
in interfacePluginKeyProvider
- Specified by:
getPluginKey
in interfaceTaskIdentifier
- Returns:
- Complete key of the task type plugin module
-
getUserDescription
@Nullable public @Nullable String getUserDescription()
- Specified by:
getUserDescription
in interfaceTaskIdentifier
- Returns:
- the description of the task as defined by the user
-
setUserDescription
public void setUserDescription(@Nullable @Nullable String userDescription)
- Specified by:
setUserDescription
in interfaceTaskDefinition
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceTaskIdentifier
- Returns:
- whether the task is enabled or disabled
-
setEnabled
public void setEnabled(boolean isEnabled)
Description copied from interface:TaskDefinition
Tells bamboo whether this task should run as a part of this build or not.- Specified by:
setEnabled
in interfaceTaskDefinition
-
getConditions
@NotNull public @NotNull List<TaskConditionConfig> getConditions()
- Specified by:
getConditions
in interfaceTaskDefinition
- Returns:
- task conditions. UI supports only one condition per task.
-
setConditions
public void setConditions(@NotNull @NotNull List<TaskConditionConfig> conditions)
- Specified by:
setConditions
in interfaceTaskDefinition
-
getConfiguration
@NotNull public @NotNull Map<String,String> getConfiguration()
Description copied from interface:TaskDefinition
Represents the raw configuration data for this configuration. No variables are substituted.- Specified by:
getConfiguration
in interfaceTaskDefinition
- Returns:
- the plugin defined configuration for this task
-
setConfiguration
public void setConfiguration(@NotNull @NotNull Map<String,String> configuration)
- Specified by:
setConfiguration
in interfaceTaskDefinition
-
isFinalising
public boolean isFinalising()
- Specified by:
isFinalising
in interfaceTaskIdentifier
- Returns:
- true if the task should be run in finalisation phase
-
setFinalising
public void setFinalising(boolean finalising)
- Specified by:
setFinalising
in interfaceTaskDefinition
-
getRootDirectorySelector
@NotNull public @NotNull TaskRootDirectorySelector getRootDirectorySelector()
- Specified by:
getRootDirectorySelector
in interfaceTaskDefinition
- Returns:
- data defining tasks' root directory
-
setRootDirectorySelector
public void setRootDirectorySelector(@NotNull @NotNull TaskRootDirectorySelector rootDirectorySelector)
- Specified by:
setRootDirectorySelector
in interfaceTaskDefinition
-
compareTo
public int compareTo(Object obj)
-
setOid
public void setOid(BambooEntityOid oid)
Description copied from interface:EntityWithOid
Assign a newBambooEntityOid
to this object. TheBambooEntityOid.getEntityType()
should be the same as this object'sImmutableEntityWithOid.getEntityType()
.- Specified by:
setOid
in interfaceEntityWithOid
-
getOid
public BambooEntityOid getOid()
Description copied from interface:ImmutableEntityWithOid
OID assigned to this object. TheBambooEntityOid.getEntityType()
should be the same as this object'sImmutableEntityWithOid.getEntityType()
.- Specified by:
getOid
in interfaceImmutableEntityWithOid
-
-