mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
WIP
This commit is contained in:
parent
95beda8cc2
commit
c54967f016
|
@ -153,7 +153,11 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
|||
Log.d("ScannerDataManagerStubFragment", "button_init_document_processor clicked");
|
||||
Toast.makeText(getActivity(), "button_init_document_processor clicked", Toast.LENGTH_LONG).show();
|
||||
// TODO-rca: ここでDocumentProcessorを初期化する
|
||||
// DocumentProcessor documentProcessor = documentProcessorFactory.create();
|
||||
if (this.documentDetail == null) {
|
||||
Toast.makeText(getActivity(), "documentDetail is null", Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
DocumentProcessor documentProcessor = documentProcessorFactory.create(this.documentDetail);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
|
||||
@AssistedInject
|
||||
public DocumentProcessorImpl(@Assisted DocumentDetail documentDetail) {
|
||||
if (documentDetail == null) {
|
||||
throw new IllegalArgumentException("documentDetail must not be null");
|
||||
}
|
||||
this.documentDetail = documentDetail;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
package one.nem.lacerta.processor.module;
|
||||
|
||||
import dagger.assisted.Assisted;
|
||||
import dagger.assisted.AssistedInject;
|
||||
import one.nem.lacerta.model.document.DocumentDetail;
|
||||
|
||||
public class DocumentProcessorModule {
|
||||
|
||||
private final DocumentDetail documentDetail;
|
||||
|
||||
@AssistedInject
|
||||
public DocumentProcessorModule(@Assisted DocumentDetail documentDetail) {
|
||||
this.documentDetail = documentDetail;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user