@Test public void testNullFlatValue2Document() { marshaller.init(null, field, form, context); Document doc = marshaller.toRawValue(null); assertNull("Document must be null!", doc); }
@Override public Document toRawValue(DocumentData documentData) { if (documentData == null) { return null; } if (documentData.getStatus().equals(DocumentStatus.STORED)) { return originalValue; } return toDocument(documentData, documentStorage); }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public Document toRawValue(DocumentData documentData) { if (documentData == null) { return null; } if (documentData.getStatus().equals(DocumentStatus.STORED)) { return originalValue; } return toDocument(documentData, documentStorage); } }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public Document toRawValue(DocumentData documentData) { if (documentData == null) { return null; } if (documentData.getStatus().equals(DocumentStatus.STORED)) { return originalValue; } return toDocument(documentData, documentStorage); } @Inject  DocumentFieldValueMarshaller(UploadedDocumentStorage documentStorage); }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public Document toRawValue(DocumentData documentData) { if (documentData == null) { return null; } if (documentData.getStatus().equals(DocumentStatus.STORED)) { return originalValue; } return toDocument(documentData, documentStorage); } @Inject  DocumentFieldValueMarshaller(UploadedDocumentStorage documentStorage); @Override Class<DocumentFieldDefinition> getSupportedField(); @Override Supplier<FieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition>> newInstanceSupplier(); @Override DocumentData toFlatValue(); @Override Document toRawValue(DocumentData documentData); }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public Document toRawValue(DocumentData documentData) { if (documentData == null) { return null; } if (documentData.getStatus().equals(DocumentStatus.STORED)) { return originalValue; } return toDocument(documentData, documentStorage); } @Inject  DocumentFieldValueMarshaller(UploadedDocumentStorage documentStorage); @Override Class<DocumentFieldDefinition> getSupportedField(); @Override Supplier<FieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition>> newInstanceSupplier(); @Override DocumentData toFlatValue(); @Override Document toRawValue(DocumentData documentData); static final String SERVER_TEMPLATE_ID; }