mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 01:33:16 +00:00
メソッド追加
This commit is contained in:
parent
895cf64a15
commit
904ae8d39f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user