Class RemainingRepositoryState
- java.lang.Object
-
- jetbrains.buildServer.buildTriggers.vcs.RemainingRepositoryState
-
- All Implemented Interfaces:
RepositoryState
,VcsDataObject
,VcsRepositoryState
public class RemainingRepositoryState extends Object implements RepositoryState
-
-
Constructor Summary
Constructors Constructor Description RemainingRepositoryState(RepositoryState originalState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
excludeBranches(Set<String> branches)
Map<String,Long>
getBranchCreateTimestamps()
Map<String,String>
getBranchRevisions()
Date
getCreateTimestamp()
String
getDefaultBranchName()
String
getDefaultBranchRevision()
String
getLastUpdatedBy()
Date
getLoadFromPersistentStorageTimestamp()
RepositoryState
getOriginalState()
boolean
isEmpty()
void
setBranchCreateTimestamp(String name, long createTimeMillis)
Sets time when the specified branch has been created in VCS repositoryvoid
setBranchRevision(String name, String revision)
Sets revision of specified branch
-
-
-
Constructor Detail
-
RemainingRepositoryState
public RemainingRepositoryState(@NotNull RepositoryState originalState)
-
-
Method Detail
-
setBranchRevision
public void setBranchRevision(@NotNull String name, @NotNull String revision)
Description copied from interface:RepositoryState
Sets revision of specified branch- Specified by:
setBranchRevision
in interfaceRepositoryState
- Parameters:
name
- branch namerevision
- branch revision
-
getCreateTimestamp
@NotNull public Date getCreateTimestamp()
- Specified by:
getCreateTimestamp
in interfaceRepositoryState
- Returns:
- timestamp when this state was created.
-
setBranchCreateTimestamp
public void setBranchCreateTimestamp(@NotNull String name, long createTimeMillis)
Description copied from interface:RepositoryState
Sets time when the specified branch has been created in VCS repository- Specified by:
setBranchCreateTimestamp
in interfaceRepositoryState
- Parameters:
name
- branch namecreateTimeMillis
- time when branch was created
-
getBranchCreateTimestamps
@NotNull public Map<String,Long> getBranchCreateTimestamps()
- Specified by:
getBranchCreateTimestamps
in interfaceRepositoryState
- Returns:
- map of branch name to the branch create time in milliseconds
-
getLastUpdatedBy
@NotNull public String getLastUpdatedBy()
- Specified by:
getLastUpdatedBy
in interfaceRepositoryState
- Returns:
- id of the node which was the last who updated this state
-
getLoadFromPersistentStorageTimestamp
@Nullable public Date getLoadFromPersistentStorageTimestamp()
- Specified by:
getLoadFromPersistentStorageTimestamp
in interfaceRepositoryState
- Returns:
- timestamp when this repository state has been loaded from the persistent storage or null if it has not been persisted yet
-
getBranchRevisions
@NotNull public Map<String,String> getBranchRevisions()
- Specified by:
getBranchRevisions
in interfaceVcsRepositoryState
- Returns:
- VCS branch to Revision state for the repository. If the map is empty, the operation for collection of repositoryState wasn't performed as expensive
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceVcsRepositoryState
- Returns:
- true if this RepositoryState doesn't contain any information, i.e. it is Null object
-
getDefaultBranchName
@NotNull public String getDefaultBranchName()
- Specified by:
getDefaultBranchName
in interfaceVcsRepositoryState
- Returns:
- The branch which is considered default for the moment of changes collecting
-
getDefaultBranchRevision
@Nullable public String getDefaultBranchRevision()
- Specified by:
getDefaultBranchRevision
in interfaceVcsRepositoryState
- Returns:
- revision for the #getDefaultBranchName branch
-
getOriginalState
@NotNull public RepositoryState getOriginalState()
-
-