Geoserver dynamically set bounding box / referencedEnvelope of datastore/layer when creating
<p>I am using <code>geoserver</code>. I extended <code>ContentDataStore</code> plugin to add csv data types as layers. I am using <code>geoserver rest api</code>, <code>HTTPUtils.put</code> method actually. When I do this the datastore gets created without boundingbox defined, unlike when it is created manually on <code>geoserver web application</code>. Therefore I get an exception when I try to use <code>wms-getCapabilities</code> method, because there is no boundingbox defined.</p>

<pre><code>The getCapabilities query is below:
localhost:8090/geoserver/wms?Service=WMS&amp;Version=1.1.1&amp;Request=GetCapabilities

The inner exception is below:
Caused by: java.lang.NullPointerException
    at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLatLonBBox(GetCapabilitiesTransformer.java:1349)
    at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayer(GetCapabilitiesTransformer.java:901)
    at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayerTree(GetCapabilitiesTransformer.java:826)
    ... 90 more
</code></pre>

<p>Is there a way to define boundingbox for a datastore/layer in <code>xxxDataStore or xxxDataStoreFactory</code> classes. So far I couldn't find any way to define while creating the datastore.</p>

<p>Thanks in advance</p>