[OLINGO-713] Minor Media Entity tutorial improvement

This commit is contained in:
Christian Holzer 2015-10-21 12:03:03 +02:00
parent 85bebce009
commit 211e8ad57f
2 changed files with 26 additions and 0 deletions

View File

@ -458,6 +458,19 @@ public class DemoEntityProcessor implements EntityProcessor, MediaEntityProcesso
public void deleteMediaEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo)
throws ODataApplicationException, ODataLibraryException {
/*
* In this tutorial, the content of the media entity is stored in a special property.
* So no additional steps to delete the content of the media entity are necessary.
*
* A real service may store the content on the file system. So we have to take care to
* delete external files too.
*
* DELETE request to /Advertisments(ID) will be dispatched to the deleteEntity(...) method
* DELETE request to /Advertisments(ID)/$value will be dispatched to the deleteMediaEntity(...) method
*
* So it is a good idea handle deletes in a central place.
*/
deleteEntity(request, response, uriInfo);
}
}

View File

@ -322,6 +322,19 @@ public class DemoEntityProcessor implements EntityProcessor, MediaEntityProcesso
public void deleteMediaEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo)
throws ODataApplicationException, ODataLibraryException {
/*
* In this tutorial, the content of the media entity is stored in a special property.
* So no additional steps to delete the content of the media entity are necessary.
*
* A real service may store the content on the file system. So we have to take care to
* delete external files too.
*
* DELETE request to /Advertisments(ID) will be dispatched to the deleteEntity(...) method
* DELETE request to /Advertisments(ID)/$value will be dispatched to the deleteMediaEntity(...) method
*
* So it is a good idea handle deletes in a central place.
*/
deleteEntity(request, response, uriInfo);
}
}