mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
メソッド追加
This commit is contained in:
2 files changed
+24
-1
No files matched your search
@@ -6,7 +6,6 @@ import java.util.concurrent.CompletableFuture;
|
||||
import one.nem.lacerta.model.VcsLogModel;
|
||||
import one.nem.lacerta.model.VcsRevModel;
|
||||
import one.nem.lacerta.model.document.DocumentDetail;
|
||||
import one.nem.lacerta.source.database.entity.VcsLogEntity;
|
||||
|
||||
public interface LacertaVcs {
|
||||
|
||||
@@ -25,6 +24,8 @@ public interface LacertaVcs {
|
||||
|
||||
public CompletableFuture<ArrayList<VcsLogModel>> getLogHistory();
|
||||
|
||||
public CompletableFuture<ArrayList<VcsLogModel>> getLogHistoryInRev(String revId);
|
||||
|
||||
public CompletableFuture<ArrayList<DocumentDetail>> getDocumentDetailAtRev(String revId);
|
||||
|
||||
|
||||
|
||||
@@ -154,6 +154,28 @@ public class LacertaVcsImpl implements LacertaVcs {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<ArrayList<VcsLogModel>> getLogHistoryInRev(String revId) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
logger.debug(TAG, "getLogHistoryAtRev");
|
||||
ArrayList<VcsLogModel> vcsLogModels = new ArrayList<>();
|
||||
|
||||
VcsRevEntity vcsRevEntity = database.vcsRevDao().findById(revId);
|
||||
vcsRevEntity.logIds.forEach(logId -> {
|
||||
VcsLogEntity vcsLogEntity = database.vcsLogDao().findById(logId);
|
||||
VcsLogModel vcsLogModel = new VcsLogModel();
|
||||
vcsLogModel.setId(vcsLogEntity.id);
|
||||
vcsLogModel.setDocumentId(vcsLogEntity.documentId);
|
||||
vcsLogModel.setBranchName(vcsLogEntity.branchName);
|
||||
vcsLogModel.setCreatedAt(vcsLogEntity.createdAt);
|
||||
vcsLogModel.setAction(vcsLogEntity.action);
|
||||
vcsLogModels.add(vcsLogModel);
|
||||
});
|
||||
|
||||
return vcsLogModels;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<ArrayList<DocumentDetail>> getDocumentDetailAtRev(String revId) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user