Class ArtifactDefinitionContextImpl
java.lang.Object
com.atlassian.bamboo.plan.artifact.ArtifactDefinitionContextImpl
- All Implemented Interfaces:
BambooIdProvider
,ArtifactDefinitionBase
,ArtifactDefinitionContext
,ImmutableArtifactDefinitionBase
,NameProvider
,Serializable
- See Also:
-
Constructor Summary
ConstructorDescriptionArtifactDefinitionContextImpl
(@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
Modifier and TypeMethodDescriptionfromStringForm
(@Nullable String patterns) @NotNull String
Get artifact copy patternGet artifact copy patternsGet artifact exclusion patternslong
getId()
Exposes the id of theArtifactDefinition
Get artifact location@NotNull String
getName()
Get artifact name@Nullable SecureToken
The secure token to use for authentication if neededboolean
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
boolean
boolean
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
Set labelvoid
setRequired
(boolean requiredArtifact) void
setSharedArtifact
(boolean sharedArtifact) Set "SharedArtifact" flagvoid
substituteVariables
(CustomVariableContext customVariableContext) toString()
static @NotNull String
toStringFrom
(@Nullable List<String> patterns)
-
Constructor Details
-
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 Details
-
getSecureToken
Description copied from interface:ArtifactDefinitionContext
The secure token to use for authentication if needed- Specified by:
getSecureToken
in interfaceArtifactDefinitionContext
-
substituteVariables
- Specified by:
substituteVariables
in interfaceArtifactDefinitionContext
-
getName
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact name- Specified by:
getName
in interfaceImmutableArtifactDefinitionBase
- Specified by:
getName
in interfaceNameProvider
- Returns:
- Artifact name
-
setName
Description copied from interface:ArtifactDefinitionBase
Set label- Specified by:
setName
in interfaceArtifactDefinitionBase
- Parameters:
name
- new value of label
-
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
Description copied from interface:ArtifactDefinitionBase
Set artifact location- Specified by:
setLocation
in interfaceArtifactDefinitionBase
- Parameters:
location
- new artifact location
-
getCopyPattern
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy pattern- Specified by:
getCopyPattern
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy pattern
-
setCopyPattern
Description copied from interface:ArtifactDefinitionBase
Set copy pattern- Specified by:
setCopyPattern
in interfaceArtifactDefinitionBase
- Parameters:
copyPattern
- new value of copy pattern
-
getCopyPatterns
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact copy patterns- Specified by:
getCopyPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible copy patterns
-
setCopyPatterns
Description copied from interface:ArtifactDefinitionBase
Set copy patterns- Specified by:
setCopyPatterns
in interfaceArtifactDefinitionBase
- Parameters:
copyPatterns
- new copy patterns
-
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
Description copied from interface:ImmutableArtifactDefinitionBase
Get artifact exclusion patterns- Specified by:
getExclusionPatterns
in interfaceImmutableArtifactDefinitionBase
- Returns:
- Ant-compatible exclusion patterns
-
setExclusionPatterns
Description copied from interface:ArtifactDefinitionBase
Set exclusion patterns- Specified by:
setExclusionPatterns
in interfaceArtifactDefinitionBase
-
toString
-
toStringFrom
-
fromStringForm
-