use of com.cubrid.cubridmanager.core.cubrid.dbspace.model.AddVolumeDbInfo in project cubrid-manager by CUBRID.
the class AddVolumeDialog method okPressed.
/**
* When press ok button,call it
*/
public void okPressed() {
if (!verify()) {
return;
}
String sPathText = pathText.getText().trim();
String sizeNeedMb = volumeSizetext.getText().trim();
purpose = purposeCombo.getText().trim();
String msg = Messages.bind(Messages.msgConfirmAdd, sizeNeedMb, purpose);
if (!CommonUITool.openConfirmBox(null, msg)) {
return;
}
addVolumeDbInfo = new AddVolumeDbInfo();
addVolumeDbInfo.setPath(sPathText);
addVolumeDbInfo.setNumberofpage(String.valueOf(calcVolumePageNum()));
addVolumeDbInfo.setSize_need_mb(sizeNeedMb + "(MB)");
addVolumeDbInfo.setPurpose(purpose);
addVolumeDbInfo.setVolname("");
addVolumeDbInfo.setDbname(selection.getDatabase().getName());
performTask(addVolumeDbInfo);
}
use of com.cubrid.cubridmanager.core.cubrid.dbspace.model.AddVolumeDbInfo in project cubrid-manager by CUBRID.
the class AddVolumeDbTaskTest method testExecute.
public void testExecute() {
String dbName = testDbName;
GetAddVolumeStatusInfo getAddVolumeStatusInfo = new GetAddVolumeStatusInfo();
final CommonQueryTask<GetAddVolumeStatusInfo> statusTask = new CommonQueryTask<GetAddVolumeStatusInfo>(serverInfo, CommonSendMsg.getCommonDatabaseSendMsg(), getAddVolumeStatusInfo);
statusTask.setDbName(dbName);
statusTask.execute();
getAddVolumeStatusInfo = statusTask.getResultModel();
assertNotNull(getAddVolumeStatusInfo);
String volpath = getAddVolumeStatusInfo.getVolpath();
assertNotNull(volpath);
AddVolumeDbInfo addVolumeDbInfo = new AddVolumeDbInfo();
addVolumeDbInfo.setDbname(dbName);
addVolumeDbInfo.setPurpose("generic");
addVolumeDbInfo.setPath(volpath);
addVolumeDbInfo.setSize_need_mb("40");
addVolumeDbInfo.setNumberofpage("10000");
AddVolumeDbTask addTask = new AddVolumeDbTask(serverInfo);
addTask.setDbname(dbName);
addTask.setVolname(addVolumeDbInfo.getVolname());
addTask.setPurpose(addVolumeDbInfo.getPurpose());
addTask.setPath(addVolumeDbInfo.getPath());
addTask.setNumberofpages(addVolumeDbInfo.getNumberofpage());
addTask.setSizeNeedMb(addVolumeDbInfo.getSize_need_mb());
//addTask.execute();
assertNull(addTask.getErrorMsg());
}
Aggregations