use of org.xipki.ca.dbtool.jaxb.ca.CAConfigurationType.Profiles in project xipki by xipki.
the class CaConfigurationDbExporter method exportProfile.
// method exportPublisher
private void exportProfile(CAConfigurationType caconf) throws DataAccessException, IOException {
System.out.println("exporting table PROFILE");
Profiles profiles = new Profiles();
final String sql = "SELECT ID,NAME,ART,TYPE,CONF FROM PROFILE";
Statement stmt = null;
ResultSet rs = null;
try {
stmt = createStatement();
rs = stmt.executeQuery(sql);
while (rs.next()) {
String name = rs.getString("NAME");
ProfileType profile = new ProfileType();
profile.setId(rs.getInt("ID"));
profile.setName(name);
profile.setArt(rs.getInt("ART"));
profile.setType(rs.getString("TYPE"));
profile.setConf(buildFileOrValue(rs.getString("CONF"), "ca-conf/certprofile-" + name));
profiles.getProfile().add(profile);
}
} catch (SQLException ex) {
throw translate(sql, ex);
} finally {
releaseResources(stmt, rs);
}
caconf.setProfiles(profiles);
System.out.println(" exported table PROFILE");
}
Aggregations