mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 19:47:36 +00:00
サンプルを生成するメソッド作成
This commit is contained in:
1 file changed
+10
+10
@@ -39,6 +39,8 @@ import one.nem.lacerta.model.document.DocumentMeta;
|
||||
import one.nem.lacerta.processor.DocumentProcessor;
|
||||
import one.nem.lacerta.processor.factory.DocumentProcessorFactory;
|
||||
|
||||
import one.nem.lacerta.utils.LacertaLogger;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
|
||||
@@ -56,6 +58,9 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
||||
@Inject
|
||||
DocumentProcessorFactory documentProcessorFactory;
|
||||
|
||||
@Inject
|
||||
LacertaLogger logger;
|
||||
|
||||
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
result -> {
|
||||
@@ -154,10 +159,15 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
||||
String id = UUID.randomUUID().toString();
|
||||
|
||||
Toast.makeText(getActivity(), "Generated id: " + id, Toast.LENGTH_LONG).show();
|
||||
logger.debug("CreateSample", "Generated id: " + id);
|
||||
|
||||
DocumentMeta meta = new DocumentMeta(
|
||||
id,
|
||||
"Sample" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()),
|
||||
new Date(),
|
||||
new Date());
|
||||
|
||||
return new DocumentDetail(meta, null, "SampleAuthor", "SampleDefaultBranch");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user