Package com.atlassian.bamboo.plan.task
Class DecoratedTaskDefinitionImpl<T extends TaskContainer>
- java.lang.Object
-
- com.atlassian.bamboo.task.TaskDefinitionImpl
-
- com.atlassian.bamboo.plan.task.DecoratedTaskDefinitionImpl<T>
-
- All Implemented Interfaces:
EntityWithOid
,ImmutableEntityWithOid
,PluginKeyProvider
,DecoratedTaskDefinition<T>
,TaskDefinition
,TaskIdentifier
,Serializable
public class DecoratedTaskDefinitionImpl<T extends TaskContainer> extends TaskDefinitionImpl implements DecoratedTaskDefinition<T>
Decoration of task used when displaying on the UI.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.atlassian.bamboo.task.TaskDefinition
DISABLED, ENABLED
-
-
Constructor Summary
Constructors Constructor Description DecoratedTaskDefinitionImpl(@NotNull TaskDefinition taskDefinition, @Nullable TaskModuleDescriptor taskModuleDescriptor, T taskContainer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject
getJsonObject()
Retrieve a JSON representation of this task definition.@NotNull String
getName()
Retrieve the name of this task.T
getTaskContainer()
Retrieve the entity for which this task belongs.boolean
isValid()
Validate this Task Definition by checking whether it is linked to a taskModuleDescriptor.-
Methods inherited from class com.atlassian.bamboo.task.TaskDefinitionImpl
compareTo, equals, getConditions, getConfiguration, getId, getOid, getPluginKey, getRootDirectorySelector, getUserDescription, hashCode, isEnabled, isFinalising, setConditions, setConfiguration, setEnabled, setFinalising, setOid, setRootDirectorySelector, setUserDescription, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.atlassian.bamboo.core.EntityWithOid
setOid
-
Methods inherited from interface com.atlassian.bamboo.core.ImmutableEntityWithOid
getOid
-
Methods inherited from interface com.atlassian.bamboo.task.TaskDefinition
getConditions, getConfiguration, getEntityType, getRootDirectorySelector, setConditions, setConfiguration, setEnabled, setFinalising, setRootDirectorySelector, setUserDescription
-
Methods inherited from interface com.atlassian.bamboo.task.TaskIdentifier
getId, getPluginKey, getUserDescription, isEnabled, isFinalising
-
-
-
-
Constructor Detail
-
DecoratedTaskDefinitionImpl
public DecoratedTaskDefinitionImpl(@NotNull @NotNull TaskDefinition taskDefinition, @Nullable @Nullable TaskModuleDescriptor taskModuleDescriptor, @NotNull T taskContainer)
-
-
Method Detail
-
isValid
public boolean isValid()
Description copied from interface:DecoratedTaskDefinition
Validate this Task Definition by checking whether it is linked to a taskModuleDescriptor.- Specified by:
isValid
in interfaceDecoratedTaskDefinition<T extends TaskContainer>
- Returns:
- whether this DecoratedTaskDefinition is valid.
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:DecoratedTaskDefinition
Retrieve the name of this task.- Specified by:
getName
in interfaceDecoratedTaskDefinition<T extends TaskContainer>
- Returns:
- the name of this task. If the name is not defined in the TaskModuleDescriptor, the plugin key will be used.
-
getTaskContainer
@NotNull public T getTaskContainer()
Description copied from interface:DecoratedTaskDefinition
Retrieve the entity for which this task belongs.- Specified by:
getTaskContainer
in interfaceDecoratedTaskDefinition<T extends TaskContainer>
- Returns:
- the entity that contains this task definition.
-
getJsonObject
@NotNull public @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject getJsonObject() throws com.opensymphony.webwork.dispatcher.json.JSONException
Description copied from interface:DecoratedTaskDefinition
Retrieve a JSON representation of this task definition.- Specified by:
getJsonObject
in interfaceDecoratedTaskDefinition<T extends TaskContainer>
- Returns:
- a JSON representation of this task definition.
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException
-
-