Class ArtifactDefinitionContextImpl
- java.lang.Object
-
- com.atlassian.bamboo.plan.artifact.ArtifactDefinitionContextImpl
-
- All Implemented Interfaces:
BambooIdProvider
,ArtifactDefinitionBase
,ArtifactDefinitionContext
,ImmutableArtifactDefinitionBase
,NameProvider
,Serializable
public class ArtifactDefinitionContextImpl extends Object implements ArtifactDefinitionContext
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArtifactDefinitionContextImpl(@NotNull ImmutableArtifactDefinition definition, @Nullable SecureToken secureToken)
ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, boolean hiddenArtifact, @Nullable SecureToken secureToken)
ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, boolean hiddenArtifact, @Nullable SecureToken secureToken, boolean httpCompressionOn)
ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, @Nullable SecureToken secureToken)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull List<String>
fromStringForm(@Nullable String patterns)
@NotNull String
getCopyPattern()
Get artifact copy pattern@NotNull List<String>
getCopyPatterns()
Get artifact copy patternsList<String>
getExclusionPatterns()
Get artifact exclusion patternslong
getId()
Exposes the id of theArtifactDefinition
String
getLocation()
Get artifact location@NotNull String
getName()
Get artifact name@Nullable SecureToken
getSecureToken()
The secure token to use for authentication if neededboolean
hasSubscribers()
Marks if there are subscriptions for for this artifact.boolean
isHidden()
Hidden artifacts are items that are transferred as artifacts but are not listed on the result pages.boolean
isHttpCompressionOn()
boolean
isRequired()
boolean
isSharedArtifact()
Get value of "SharedArtifact" flag.void
setCopyPattern(@NotNull String copyPattern)
Set copy patternvoid
setCopyPatterns(List<String> copyPatterns)
Set copy patternsvoid
setExclusionPatterns(@NotNull List<String> exclusionPatterns)
Set exclusion patternsvoid
setHttpCompressionOn(boolean httpCompressionOn)
Sets "httpCompressionOn" flagvoid
setId(long id)
void
setLocation(@Nullable String location)
Set artifact locationvoid
setName(@NotNull String name)
Set labelvoid
setRequired(boolean requiredArtifact)
void
setSharedArtifact(boolean sharedArtifact)
Set "SharedArtifact" flagvoid
substituteVariables(CustomVariableContext customVariableContext)
String
toString()
static @NotNull String
toStringFrom(@Nullable List<String> patterns)
-
-
-
Constructor Detail
-
ArtifactDefinitionContextImpl
public ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, @Nullable @Nullable SecureToken secureToken)
-
ArtifactDefinitionContextImpl
public ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, boolean hiddenArtifact, @Nullable @Nullable SecureToken secureToken)
-
ArtifactDefinitionContextImpl
public ArtifactDefinitionContextImpl(String name, boolean sharedArtifact, boolean hiddenArtifact, @Nullable @Nullable SecureToken secureToken, boolean httpCompressionOn)
-
ArtifactDefinitionContextImpl
public ArtifactDefinitionContextImpl(@NotNull @NotNull ImmutableArtifactDefinition definition, @Nullable @Nullable SecureToken secureToken)
-
-
Method Detail
-
getSecureToken
@Nullable public @Nullable SecureToken getSecureToken()
Description copied from interface:ArtifactDefinitionContext
The secure token to use for authentication if needed- Specified by:
getSecureToken
in interfaceArtifactDefinitionContext
-
substituteVariables
public void substituteVariables(CustomVariableContext customVariableContext)
- Specified by:
substituteVariables
in interfaceArtifactDefinitionContext
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact name- Specified by:
getName
in interfaceImmutableArtifactDefinitionBase
- Specified by:
getName
in interfaceNameProvider
- Returns:
- Artifact name
-
setName
public void setName(@NotNull @NotNull String name)
Description copied from interface:ArtifactDefinitionBase
Set label- Specified by:
setName
in interfaceArtifactDefinitionBase
- Parameters:
name
- new value of label
-
getLocation
public String getLocation()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact location- Specified by:
getLocation
in interfaceImmutableArtifactDefinitionBase
- Returns:
- artifact's contents path or null if none specified (then build root is supposed to be used)
-
setLocation
public void setLocation(@Nullable @Nullable String location)
Description copied from interface:ArtifactDefinitionBase
Set artifact location- Specified by:
setLocation
in interfaceArtifactDefinitionBase
- Parameters:
location
- new artifact location
-
getCopyPattern
@NotNull public @NotNull String getCopyPattern()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy pattern- Specified by:
getCopyPattern
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy pattern
-
setCopyPattern
public void setCopyPattern(@NotNull @NotNull String copyPattern)
Description copied from interface:ArtifactDefinitionBase
Set copy pattern- Specified by:
setCopyPattern
in interfaceArtifactDefinitionBase
- Parameters:
copyPattern
- new value of copy pattern
-
getCopyPatterns
@NotNull public @NotNull List<String> getCopyPatterns()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy patterns- Specified by:
getCopyPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy patterns
-
setCopyPatterns
public void setCopyPatterns(List<String> copyPatterns)
Description copied from interface:ArtifactDefinitionBase
Set copy patterns- Specified by:
setCopyPatterns
in interfaceArtifactDefinitionBase
- Parameters:
copyPatterns
- new copy patterns
-
isSharedArtifact
public boolean isSharedArtifact()
Description copied from interface:ImmutableArtifactDefinitionBase
Get value of "SharedArtifact" flag.- Specified by:
isSharedArtifact
in interfaceImmutableArtifactDefinitionBase
- Returns:
- true if ArtifactDefinition is marked as "SharedArtifact"
-
setSharedArtifact
public void setSharedArtifact(boolean sharedArtifact)
Description copied from interface:ArtifactDefinitionBase
Set "SharedArtifact" flag- Specified by:
setSharedArtifact
in interfaceArtifactDefinitionBase
- Parameters:
sharedArtifact
- new value of "SharedArtifact" flag
-
isRequired
public boolean isRequired()
- Specified by:
isRequired
in interfaceImmutableArtifactDefinitionBase
- Returns:
- true if artifact is required for successful build completion
-
setRequired
public void setRequired(boolean requiredArtifact)
- Specified by:
setRequired
in interfaceArtifactDefinitionBase
- Parameters:
requiredArtifact
- if build should fail if can't publish artifact
-
isHttpCompressionOn
public boolean isHttpCompressionOn()
- Specified by:
isHttpCompressionOn
in interfaceImmutableArtifactDefinitionBase
- Returns:
- true if use of compression enabled to transfer artifact between server and agent (both directions)
-
setHttpCompressionOn
public void setHttpCompressionOn(boolean httpCompressionOn)
Description copied from interface:ArtifactDefinitionBase
Sets "httpCompressionOn" flag- Specified by:
setHttpCompressionOn
in interfaceArtifactDefinitionBase
- Parameters:
httpCompressionOn
- new value of "httpCompressionOn" flag
-
hasSubscribers
public boolean hasSubscribers()
Description copied from interface:ArtifactDefinitionContext
Marks if there are subscriptions for for this artifact. If there are subscriptions and artifact is not created/uploaded properly, producer job will fail. Otherwise, plan job will continue- Specified by:
hasSubscribers
in interfaceArtifactDefinitionContext
- Returns:
- true if artifact has subscriptions
-
getId
public long getId()
Description copied from interface:ImmutableArtifactDefinitionBase
Exposes the id of theArtifactDefinition
- Specified by:
getId
in interfaceBambooIdProvider
- Specified by:
getId
in interfaceImmutableArtifactDefinitionBase
- Returns:
- -1 if the id is unknown
-
setId
public void setId(long id)
-
isHidden
public boolean isHidden()
Description copied from interface:ArtifactDefinitionContext
Hidden artifacts are items that are transferred as artifacts but are not listed on the result pages. Example of hidden artifacts are build logs.- Specified by:
isHidden
in interfaceArtifactDefinitionContext
-
getExclusionPatterns
public List<String> getExclusionPatterns()
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact exclusion patterns- Specified by:
getExclusionPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible exclusion patterns
-
setExclusionPatterns
public void setExclusionPatterns(@NotNull @NotNull List<String> exclusionPatterns)
Description copied from interface:ArtifactDefinitionBase
Set exclusion patterns- Specified by:
setExclusionPatterns
in interfaceArtifactDefinitionBase
-
toStringFrom
@NotNull public static @NotNull String toStringFrom(@Nullable @Nullable List<String> patterns)
-
-