[ 
https://issues.apache.org/jira/browse/OLINGO-30?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Bolz updated OLINGO-30:
-------------------------------

    Description: 
At the EntityProviderWriteProperties we have now two additional fields for a 
mediaResourceSourceKey and mediaResourceTypeKey. If set we will look into the 
data map with this key and use the String we find there as a source link for 
this media resource during serialization.

For example this: <content type="image/jpeg" src="Employees('1')/$value"/> can 
now look like this <content type="image/jpeg" 
src="http://localhost:8080/Image.jpeg"/> if the src key is set and the data map 
is filled accordingly. The content type is filled the same way.

JUnit tests can be found here:
{{org.apache.olingo.odata2.core.ep.producer.AtomEntryProducerTest}}
 -> serializeWithCustomSrcAttributeOnEmployee
 -> serializeWithCustomSrcAndTypeAttributeOnEmployee
{{org.apache.olingo.odata2.core.ep.producer. JsonEntryEntityProducerTest}} 
 -> serializeWithCustomSrcAttributeOnEmployee
 -> serializeWithCustomSrcAndTypeAttributeOnEmployee


  was:
At the EntityProviderWriteProperties we have now two additional fields for a 
mediaResourceSourceKey and mediaResourceTypeKey. If set we will look into the 
data map with this key and use the String we find there as a source link for 
this media resource during serialization.

For example this: <content type="image/jpeg" src="Employees('1')/$value"/> can 
now look like this <content type="image/jpeg" 
src="http://localhost:8080/Image.jpeg"/> if the src key is set and the data map 
is filled accordingly. The content type is filled the same way.

JUnit tests can be found here:
org.apache.olingo.odata2.core.ep.producer.AtomEntryProducerTest -> 
serializeWithCustomSrcAttributeOnEmployee
                                                                                
                                                             -> 
serializeWithCustomSrcAndTypeAttributeOnEmployee
org.apache.olingo.odata2.core.ep.producer. JsonEntryEntityProducerTest -> 
serializeWithCustomSrcAttributeOnEmployee
                                                                                
                                                                       -> 
serializeWithCustomSrcAndTypeAttributeOnEmployee



> Enhanced Media Resource Handling
> --------------------------------
>
>                 Key: OLINGO-30
>                 URL: https://issues.apache.org/jira/browse/OLINGO-30
>             Project: Olingo
>          Issue Type: Improvement
>          Components: odata2-core
>    Affects Versions: 1.1.0
>            Reporter: Michael Bolz
>
> At the EntityProviderWriteProperties we have now two additional fields for a 
> mediaResourceSourceKey and mediaResourceTypeKey. If set we will look into the 
> data map with this key and use the String we find there as a source link for 
> this media resource during serialization.
> For example this: <content type="image/jpeg" src="Employees('1')/$value"/> 
> can now look like this <content type="image/jpeg" 
> src="http://localhost:8080/Image.jpeg"/> if the src key is set and the data 
> map is filled accordingly. The content type is filled the same way.
> JUnit tests can be found here:
> {{org.apache.olingo.odata2.core.ep.producer.AtomEntryProducerTest}}
>  -> serializeWithCustomSrcAttributeOnEmployee
>  -> serializeWithCustomSrcAndTypeAttributeOnEmployee
> {{org.apache.olingo.odata2.core.ep.producer. JsonEntryEntityProducerTest}} 
>  -> serializeWithCustomSrcAttributeOnEmployee
>  -> serializeWithCustomSrcAndTypeAttributeOnEmployee



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to