jetbrains.buildServer.vcs
Class RepositoryStateData

java.lang.Object
  extended by jetbrains.buildServer.vcs.RepositoryStateData
All Implemented Interfaces:
VcsDataObject, VcsRepositoryState

public class RepositoryStateData
extends java.lang.Object
implements VcsRepositoryState

Represents repository state of changes collection. Value object //TODO: VCS - this object may contain NO VERSION, //TODO: VCS - while we have @NotNull for it

Since:
8.0
Author:
Eugene Petrenko (eugene.petrenko@jetbrains.com)

Field Summary
static java.lang.String SPECIAL_BRANCH_NAME
           
 
Method Summary
static RepositoryStateData createFromState(VcsRepositoryState state)
           
static RepositoryStateData createSingleVersionState(java.lang.String version)
           
static RepositoryStateData createVersionState(java.lang.String defaultBranchName, java.util.Map<java.lang.String,java.lang.String> state)
           
 boolean equals(java.lang.Object o)
           
 java.util.Map<java.lang.String,java.lang.String> getBranchRevisions()
          Returns map from branch name to branch revision
 java.lang.String getDefaultBranchName()
          //TODO: Is it required for plugin?
 int hashCode()
           
 boolean isEmpty()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SPECIAL_BRANCH_NAME

public static final java.lang.String SPECIAL_BRANCH_NAME
See Also:
Constant Field Values
Method Detail

getBranchRevisions

@NotNull
public java.util.Map<java.lang.String,java.lang.String> getBranchRevisions()
Returns map from branch name to branch revision

Specified by:
getBranchRevisions in interface VcsRepositoryState
Returns:
see above

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface VcsRepositoryState
Returns:
true if this RepositoryState doesn't contain any information, i.e. it is Null object

getDefaultBranchName

@NotNull
public java.lang.String getDefaultBranchName()
//TODO: Is it required for plugin?

Specified by:
getDefaultBranchName in interface VcsRepositoryState
Returns:
The branch which is considered default for the moment of changes collecting

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createSingleVersionState

@NotNull
public static RepositoryStateData createSingleVersionState(@Nullable
                                                                   java.lang.String version)
Parameters:
version - version
Returns:
single version RevisionStateData
Since:
8.0

createVersionState

@NotNull
public static RepositoryStateData createVersionState(@NotNull
                                                             java.lang.String defaultBranchName,
                                                             @NotNull
                                                             java.util.Map<java.lang.String,java.lang.String> state)
Parameters:
defaultBranchName - default branch name
state - map of branch to version
Returns:
revision state data
Since:
8.0

createFromState

@NotNull
public static RepositoryStateData createFromState(VcsRepositoryState state)
Parameters:
state - state of a VCS Repository
Returns:
revision state data
Since:
8.0