]>
git.argeo.org Git - gpl/argeo-slc.git/blob - db/DbUnitDeploymentData.java
1 package org
.argeo
.slc
.unit
.db
;
3 import java
.io
.InputStream
;
5 import org
.argeo
.slc
.SlcException
;
6 import org
.argeo
.slc
.deploy
.DeploymentData
;
7 import org
.dbunit
.dataset
.IDataSet
;
8 import org
.dbunit
.dataset
.xml
.FlatXmlDataSet
;
9 import org
.springframework
.core
.io
.Resource
;
11 public class DbUnitDeploymentData
implements DeploymentData
{
12 private Resource dataSetLocation
;
14 public IDataSet
createDataSet() {
16 InputStream in
= dataSetLocation
.getInputStream();
17 IDataSet dataSet
= new FlatXmlDataSet(in
);
20 } catch (Exception e
) {
21 throw new SlcException("Cannot create data set", e
);
26 public void setDataSetLocation(Resource dataSetLocation
) {
27 this.dataSetLocation
= dataSetLocation
;