@ Override public Entry postEntry ( final AtomRequest areq , final Entry entry ) throws AtomException { LOG . debug ( "postEntry" ) ; final String [ ] pathInfo = StringUtils . split ( areq . getPathInfo ( ) , "/" ) ; final String handle = pathInfo [ 0 ] ; final String collection = pathInfo [ 1 ] ; final FileBasedCollection col = service . findCollectionByHandle ( handle , collection ) ; try { return col . addEntry ( entry ) ; } catch ( final Exception fe ) { fe . printStackTrace ( ) ; throw new AtomException ( fe ) ; } }
Create a new entry specified by pathInfo and posted entry . We save the submitted Atom entry verbatim but we do set the id and reset the update time .