jetbrains.buildServer.artifacts
Class RevisionRules

java.lang.Object
  extended by jetbrains.buildServer.artifacts.RevisionRules

public class RevisionRules
extends java.lang.Object

Revision rules factory.


Nested Class Summary
static class RevisionRules.AbstractRevisionRule
           
 
Field Summary
static java.lang.String BRANCH_ATTR
           
static java.lang.String BUILD_ID_NAME
           
static java.lang.String BUILD_ID_SUFFIX
           
static java.lang.String BUILD_NUMBER_NAME
           
static java.lang.String BUILD_TAG_NAME
           
static java.lang.String BUILD_TAG_SUFFIX
           
static java.lang.String LAST_FINISHED_NAME
           
static RevisionRule LAST_FINISHED_RULE
          Rule for last finished build artifacts selection
static java.lang.String LAST_FINISHED_SAME_CHAIN_NAME
           
static RevisionRule LAST_FINISHED_SAME_CHAIN_RULE
          Rule for last finished build from the same build chain
static java.lang.String LAST_PINNED_NAME
           
static RevisionRule LAST_PINNED_RULE
          Rule for last pinned build artifacts selection
static java.lang.String LAST_SUCCESSFUL_NAME
           
static RevisionRule LAST_SUCCESSFUL_RULE
          Rule for last successful build artifacts selection
static java.lang.String NAME_ATTR
           
static java.lang.String REVISION_ATTR
           
static java.lang.String REVISION_RULE_TAG
           
 
Method Summary
static RevisionRule newBranchRevisionRule(java.lang.String revision, java.lang.String branch)
          Attempts to create revision rule object by specified revision and branch.
static RevisionRule newBranchRevisionRule(java.lang.String name, java.lang.String value, java.lang.String branch)
          Returns new revision rule from given name, value and branch.
static RevisionRule newBuildIdRule(long buildId, java.lang.String buildNumber)
          Creates new revision rule for build id
static RevisionRule newBuildNumberRule(java.lang.String buildNumber)
          Creates revision rule that will select build artifacts using build number pattern.
static RevisionRule newBuildTagRule(java.lang.String buildTagParam)
           
static RevisionRule newBuildTagRule(java.lang.String buildTagParam, java.lang.String branch)
          Returns a build tag rule for given tag and branch
static RevisionRule newRevisionRule(java.lang.String revision)
          Attempts to create revision rule object by specified revision only.
static RevisionRule newRevisionRule(java.lang.String name, java.lang.String value)
          Creates new revision rule from given name and value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION_RULE_TAG

@NonNls
public static final java.lang.String REVISION_RULE_TAG
See Also:
Constant Field Values

NAME_ATTR

@NonNls
public static final java.lang.String NAME_ATTR
See Also:
Constant Field Values

REVISION_ATTR

@NonNls
public static final java.lang.String REVISION_ATTR
See Also:
Constant Field Values

BRANCH_ATTR

@NonNls
public static final java.lang.String BRANCH_ATTR
See Also:
Constant Field Values

BUILD_ID_SUFFIX

public static final java.lang.String BUILD_ID_SUFFIX
See Also:
Constant Field Values

BUILD_TAG_SUFFIX

public static final java.lang.String BUILD_TAG_SUFFIX
See Also:
Constant Field Values

LAST_PINNED_NAME

public static final java.lang.String LAST_PINNED_NAME
See Also:
Constant Field Values

LAST_SUCCESSFUL_NAME

public static final java.lang.String LAST_SUCCESSFUL_NAME
See Also:
Constant Field Values

LAST_FINISHED_NAME

public static final java.lang.String LAST_FINISHED_NAME
See Also:
Constant Field Values

LAST_FINISHED_SAME_CHAIN_NAME

public static final java.lang.String LAST_FINISHED_SAME_CHAIN_NAME
See Also:
Constant Field Values

BUILD_NUMBER_NAME

public static final java.lang.String BUILD_NUMBER_NAME
See Also:
Constant Field Values

BUILD_ID_NAME

public static final java.lang.String BUILD_ID_NAME
See Also:
Constant Field Values

BUILD_TAG_NAME

public static final java.lang.String BUILD_TAG_NAME
See Also:
Constant Field Values

LAST_PINNED_RULE

@NotNull
public static final RevisionRule LAST_PINNED_RULE
Rule for last pinned build artifacts selection


LAST_SUCCESSFUL_RULE

@NotNull
public static final RevisionRule LAST_SUCCESSFUL_RULE
Rule for last successful build artifacts selection


LAST_FINISHED_RULE

@NotNull
public static final RevisionRule LAST_FINISHED_RULE
Rule for last finished build artifacts selection


LAST_FINISHED_SAME_CHAIN_RULE

@NotNull
public static final RevisionRule LAST_FINISHED_SAME_CHAIN_RULE
Rule for last finished build from the same build chain

Method Detail

newBuildNumberRule

@NotNull
public static RevisionRule newBuildNumberRule(java.lang.String buildNumber)
Creates revision rule that will select build artifacts using build number pattern.

Parameters:
buildNumber - build number
Returns:
new build number revision rule

newBuildTagRule

@NotNull
public static RevisionRule newBuildTagRule(@Nullable
                                                   java.lang.String buildTagParam)

newBuildTagRule

public static RevisionRule newBuildTagRule(@Nullable
                                           java.lang.String buildTagParam,
                                           @Nullable
                                           java.lang.String branch)
Returns a build tag rule for given tag and branch

Parameters:
buildTagParam - build tag
branch - branch
Returns:
see above

newBuildIdRule

@NotNull
public static RevisionRule newBuildIdRule(long buildId,
                                                  @Nullable
                                                  java.lang.String buildNumber)
Creates new revision rule for build id

Parameters:
buildId - build id
Returns:
see above
Since:
6.0

newRevisionRule

@NotNull
public static RevisionRule newRevisionRule(@NotNull
                                                   java.lang.String name,
                                                   @Nullable
                                                   java.lang.String value)
Creates new revision rule from given name and value. Value is ignored for all rules except build number rule.

Parameters:
name - name of the rule
value - additional value of the rule
Returns:
new revision rule

newBranchRevisionRule

@NotNull
public static RevisionRule newBranchRevisionRule(@NotNull
                                                         java.lang.String name,
                                                         @Nullable
                                                         java.lang.String value,
                                                         @Nullable
                                                         java.lang.String branch)
Returns new revision rule from given name, value and branch. Value and branch used only in rules that support them.

Parameters:
name - name of the rule
value - additional value of the rule
branch - branch
Returns:
see above

newRevisionRule

@Nullable
public static RevisionRule newRevisionRule(@NotNull
                                                    java.lang.String revision)
Attempts to create revision rule object by specified revision only.

Parameters:
revision - revision
Returns:
see above
Since:
6.0

newBranchRevisionRule

@Nullable
public static RevisionRule newBranchRevisionRule(@NotNull
                                                          java.lang.String revision,
                                                          @Nullable
                                                          java.lang.String branch)
Attempts to create revision rule object by specified revision and branch.

Parameters:
revision - revision
branch - branch
Returns:
see above
Since:
8.0