com.atlassian.bamboo.ww2.beans
Class DecoratedPlan

java.lang.Object
  extended by com.atlassian.bamboo.ww2.beans.DecoratedPlan
All Implemented Interfaces:
BambooIdProvider, PlanIdentifier, DescriptionProvider, NameProvider, DecoratedNavObject

@Immutable
public class DecoratedPlan
extends java.lang.Object
implements DecoratedNavObject, PlanIdentifier


Method Summary
 com.google.common.collect.ImmutableList<DecoratedPlan> getBranches()
           
 java.lang.String getBranchName()
           
 java.lang.String getBuildKey()
          This objects specific portion of the key.
 java.lang.String getBuildName()
           
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
           
 long getId()
           
 java.lang.String getKey()
           
 com.google.common.collect.ImmutableList<java.lang.String> getLabelNames()
           
 java.lang.String getLinkedJiraIssue()
           
 PlanIdentifier getMaster()
          The master plan iff the plan is a branched plan and it has a master.
 long getMasterId()
          Database id of master of this ChainBranch
 java.lang.String getName()
          Returns the full name for the build in the form of "project name - build name" e.g.
 com.google.common.collect.ImmutableList<? extends DecoratedNavGroupObject> getNavGroups()
           
 DecoratedPlan getParent()
           
 PlanKey getPlanKey()
          Get the PlanKey identifier for this Plan
 PlanType getPlanType()
           
 ProjectIdentifier getProject()
          Returns the parent Project
 com.google.common.collect.ImmutableList<DecoratedStage> getStages()
           
 DecoratedNavObjectStatus getStatus()
           
 java.lang.String getType()
           
 boolean isRemoteJiraLinkRequired()
           
 boolean isResult()
           
 boolean isSuspendedFromBuilding()
          Checks if the build has been enabled / disabled.
 java.lang.String replaceKey(java.lang.String url, DecoratedNavObject originalObject)
          Given an existing url (may be directly from the originalObject or may be with a static ${planKey} reference) generate the new url for this object
 void setLabels(com.google.common.collect.ImmutableList<java.lang.String> labels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKey

@NotNull
public java.lang.String getKey()
Specified by:
getKey in interface DecoratedNavObject
Returns:
full key of the object

getBuildKey

@NotNull
public java.lang.String getBuildKey()
Description copied from interface: PlanIdentifier
This objects specific portion of the key. You probably want to use PlanIdentifier.getPlanKey().

Specified by:
getBuildKey in interface PlanIdentifier
Returns:
This objects specific portion of the key

getDisplayName

@NotNull
public java.lang.String getDisplayName()
Specified by:
getDisplayName in interface DecoratedNavObject
Returns:
display name of this object

getNavGroups

@NotNull
public com.google.common.collect.ImmutableList<? extends DecoratedNavGroupObject> getNavGroups()
Specified by:
getNavGroups in interface DecoratedNavObject
Returns:
any children groups of this object

getParent

@Nullable
public DecoratedPlan getParent()
Specified by:
getParent in interface DecoratedNavObject
Returns:
the parent of this object (does not take into account groups)

getPlanType

@NotNull
public PlanType getPlanType()
Specified by:
getPlanType in interface PlanIdentifier
Specified by:
getPlanType in interface DecoratedNavObject
Returns:
plantype associated with this object.

getStatus

@Nullable
public DecoratedNavObjectStatus getStatus()
Specified by:
getStatus in interface DecoratedNavObject
Returns:
provide the status of this object if applicable

replaceKey

@Nullable
public java.lang.String replaceKey(java.lang.String url,
                                            DecoratedNavObject originalObject)
Description copied from interface: DecoratedNavObject
Given an existing url (may be directly from the originalObject or may be with a static ${planKey} reference) generate the new url for this object

Specified by:
replaceKey in interface DecoratedNavObject
Parameters:
url - - to manipulate
originalObject - - the object the original url may have belonged to
Returns:
the new url referencing this object

getMaster

@Nullable
public PlanIdentifier getMaster()
Description copied from interface: DecoratedNavObject
The master plan iff the plan is a branched plan and it has a master.

Specified by:
getMaster in interface DecoratedNavObject
Returns:

getId

public long getId()
Specified by:
getId in interface BambooIdProvider
Specified by:
getId in interface PlanIdentifier
Returns:
Database id of the plan

getPlanKey

@NotNull
public PlanKey getPlanKey()
Description copied from interface: PlanIdentifier
Get the PlanKey identifier for this Plan

Specified by:
getPlanKey in interface PlanIdentifier
Returns:
planKey

getName

@NotNull
public java.lang.String getName()
Description copied from interface: PlanIdentifier
Returns the full name for the build in the form of "project name - build name" e.g. "Confluence - HEAD"

Specified by:
getName in interface PlanIdentifier
Specified by:
getName in interface DescriptionProvider
Specified by:
getName in interface NameProvider
Returns:
String

getProject

@NotNull
public ProjectIdentifier getProject()
Description copied from interface: PlanIdentifier
Returns the parent Project

Specified by:
getProject in interface PlanIdentifier
Returns:
Project. Never null

getBuildName

@NotNull
public java.lang.String getBuildName()
Specified by:
getBuildName in interface PlanIdentifier
Returns:
The plan specific portion of the name (without the project and/or parent's names). You probably want to use PlanIdentifier.getName()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface DescriptionProvider

getMasterId

public long getMasterId()
Description copied from interface: PlanIdentifier
Database id of master of this ChainBranch

Specified by:
getMasterId in interface PlanIdentifier
Returns:

getLabelNames

public com.google.common.collect.ImmutableList<java.lang.String> getLabelNames()

getType

@NotNull
public java.lang.String getType()
Specified by:
getType in interface DecoratedNavObject
Returns:
plantype associated with this object.

isResult

public boolean isResult()
Specified by:
isResult in interface DecoratedNavObject
Returns:
true if the nav object represents a result otherwise false

isSuspendedFromBuilding

public boolean isSuspendedFromBuilding()
Description copied from interface: PlanIdentifier
Checks if the build has been enabled / disabled.

Specified by:
isSuspendedFromBuilding in interface PlanIdentifier
Returns:
true if plan is disabled

getStages

public com.google.common.collect.ImmutableList<DecoratedStage> getStages()

getBranches

public com.google.common.collect.ImmutableList<DecoratedPlan> getBranches()

setLabels

public void setLabels(com.google.common.collect.ImmutableList<java.lang.String> labels)

getBranchName

@Nullable
public java.lang.String getBranchName()

getLinkedJiraIssue

@Nullable
public java.lang.String getLinkedJiraIssue()

isRemoteJiraLinkRequired

public boolean isRemoteJiraLinkRequired()


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.