}
}
private void saveMapServiceDesc() {
try {
MapServiceDesc desc = new MapServiceDesc();
String password = this.jTextFieldPassword.getText();
if (password != null && !"".equals(password)) {
desc.setPassword(PasswordUtil.base64md5password(password));
} else {
desc.setPassword("");
}
desc.setAutoStart(this.jCheckBoxAutoStart.isSelected());
desc.setNeedToken(this.jCheckBoxNeedToken.isSelected());
desc.setMinInstances(Integer.valueOf(this.jTextFieldMinInstances
.getText()));
desc.setMaxInstances(Integer.valueOf(this.jTextFieldMaxInstances
.getText()));
desc.setTimeout(Integer.valueOf(this.jTextFieldTimeout.getText()));
desc.setMaxResults(Integer.valueOf(this.jTextFieldMaxResults
.getText()));
desc.setDpi(Integer.valueOf(this.jTextFieldDPI.getText()));
desc.setOutputDir(this.jTextFieldOutputDir.getText());
desc.setUseTile(this.jCheckBoxUseTile.isSelected());
if (this.jCheckBoxUseTile.isSelected()) {
TileInfo tileInfo = new TileInfo();
tileInfo.setTilesDir(this.jTextFieldTileDir.getText());
tileInfo.setCreateOnDemand(this.jCheckBoxCreateOnDemand
.isSelected());
tileInfo.setReadCompact(this.jCheckBoxReadCompact
.isSelected());
tileInfo.setFormat(this.jComboBoxFormat.getSelectedItem()
.toString());
tileInfo.setOriginX(Double.valueOf(this.jTextFieldOriginX
.getText()));
tileInfo.setOriginY(Double.valueOf(this.jTextFieldOriginY
.getText()));
tileInfo.setWidth(Integer.valueOf(this.jTextFieldWidth
.getText()));
tileInfo.setHeight(Integer.valueOf(this.jTextFieldHeight
.getText()));
for (int i = 0, count = jListLevelsModel.getSize(); i < count; i++) {
LodItem item = (LodItem) jListLevelsModel.getElementAt(i);
TileLodInfo tileLodInfo = item.getTileLodInfo();
tileLodInfo.setLevel(i);
tileInfo.addTileLodInfo(tileLodInfo);
}
desc.setTileInfo(tileInfo);
}
MapServiceDescFile mapServiceDescFile = new MapServiceDescFile(app
.getMapServiceDescFilePath());
if (mapServiceDescFile.save(desc)) {