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:
  • Constructor Details

    • DecoratedTaskDefinitionImpl

      public DecoratedTaskDefinitionImpl(@NotNull @NotNull TaskDefinition taskDefinition, @Nullable @Nullable TaskModuleDescriptor taskModuleDescriptor, @NotNull T taskContainer)
  • Method Details

    • 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 interface DecoratedTaskDefinition<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 interface DecoratedTaskDefinition<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 interface DecoratedTaskDefinition<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 interface DecoratedTaskDefinition<T extends TaskContainer>
      Returns:
      a JSON representation of this task definition.
      Throws:
      com.opensymphony.webwork.dispatcher.json.JSONException