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