[Geoserver-users] add new layer programmatically

ciao,

I'm sorry if I wrote this request as a response to another e-mail, now i rewrite it new...

i wrote a custom ows service that nedds to add new layers (both raster and vector).
In my service bean i declared a contructor that take the Geoserver object as parameter so i can easily create and read workspace, namespace, styles etc...
In order to add new layer i've tried to read the rest and rest_config modules sources, but they are quite complicated.

I hope that somewhere there is a method like addCoverageLayer(File geotiff)...

how can i do this?

thanks in advance
      Alessandro