Class SingleVersionRepositoryStateAdapter

    • Constructor Detail

      • SingleVersionRepositoryStateAdapter

        public SingleVersionRepositoryStateAdapter​(@Nullable
                                                   String repositoryRevision)
      • SingleVersionRepositoryStateAdapter

        public SingleVersionRepositoryStateAdapter​(@Nullable
                                                   String repositoryRevision,
                                                   @NotNull
                                                   Date timestamp)
    • Method Detail

      • getBranchRevisions

        @NotNull
        public Map<String,​String> getBranchRevisions()
        Specified by:
        getBranchRevisions in interface VcsRepositoryState
        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
      • setBranchRevision

        public void setBranchRevision​(@NotNull
                                      String name,
                                      @NotNull
                                      String revision)
        Description copied from interface: RepositoryState
        Sets revision of specified branch
        Specified by:
        setBranchRevision in interface RepositoryState
        Parameters:
        name - branch name
        revision - branch revision
      • 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 String getDefaultBranchName()
        Specified by:
        getDefaultBranchName in interface VcsRepositoryState
        Returns:
        The branch which is considered default for the moment of changes collecting
      • 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 interface RepositoryState
        Parameters:
        name - branch name
        createTimeMillis - time when branch was created
      • getLastUpdatedBy

        @NotNull
        public String getLastUpdatedBy()
        Specified by:
        getLastUpdatedBy in interface RepositoryState
        Returns:
        id of the node which was the last who updated this state
      • getLoadFromPersistentStorageTimestamp

        @Nullable
        public Date getLoadFromPersistentStorageTimestamp()
        Specified by:
        getLoadFromPersistentStorageTimestamp in interface RepositoryState
        Returns:
        timestamp when this repository state has been loaded from the persistent storage or null if it has not been persisted yet
      • setLoadFromStorageTimestamp

        public void setLoadFromStorageTimestamp​(@Nullable
                                                Date loadFromStorageTimestamp)
      • setLastUpdatedBy

        public void setLastUpdatedBy​(@NotNull
                                     String lastUpdatedBy)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object