@Test public void testNull2FlatValue() { marshaller.init(null, field, form, context); DocumentData documentData = marshaller.toFlatValue(); assertNull("DocumentData must be null!", documentData); }
@Override public DocumentData toFlatValue() { if (originalValue == null) { return null; } String templateId = (String) context.getAttributes().get(SERVER_TEMPLATE_ID); return fromDocument(originalValue, templateId); }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public DocumentData toFlatValue() { if (originalValue == null) { return null; } String templateId = (String) context.getAttributes().get(SERVER_TEMPLATE_ID); return fromDocument(originalValue, templateId); } }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public DocumentData toFlatValue() { if (originalValue == null) { return null; } String templateId = (String) context.getAttributes().get(SERVER_TEMPLATE_ID); return fromDocument(originalValue, templateId); } @Inject  DocumentFieldValueMarshaller(UploadedDocumentStorage documentStorage); }
DocumentFieldValueMarshaller extends AbstractFieldValueMarshaller<Document, DocumentData, DocumentFieldDefinition> { @Override public DocumentData toFlatValue() { if (originalValue == null) { return null; } String templateId = (String) context.getAttributes().get(SERVER_TEMPLATE_ID); return fromDocument(originalValue, templateId); } @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 DocumentData toFlatValue() { if (originalValue == null) { return null; } String templateId = (String) context.getAttributes().get(SERVER_TEMPLATE_ID); return fromDocument(originalValue, templateId); } @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; }