use of org.ovirt.engine.ui.common.widget.uicommon.storage.ImportIscsiStorageView in project ovirt-engine by oVirt.
the class StoragePopupView method revealStorageView.
@SuppressWarnings("unchecked")
private void revealStorageView(StorageModel object) {
StorageType storageType = storageTypeListEditor.asEditor().getActualEditor().getValue();
StorageDomainType storageDomainType = domainFunctionListEditor.asEditor().getActualEditor().getValue();
if (storageType == null || storageDomainType == null) {
return;
}
switch(storageType) {
case NFS:
storageView = new NfsStorageView();
break;
case LOCALFS:
storageView = new LocalStorageView();
break;
case POSIXFS:
storageView = new PosixStorageView();
break;
case GLUSTERFS:
storageView = new GlusterStorageView();
break;
case FCP:
if (!object.getBehavior().isImport()) {
storageView = new FcpStorageView(true);
} else {
storageView = new ImportFcpStorageView();
}
break;
case ISCSI:
if (!object.getBehavior().isImport()) {
storageView = new IscsiStorageView(true);
} else {
storageView = new ImportIscsiStorageView();
}
break;
default:
break;
}
updateStorageItem(object);
IStorageModel model = object.getCurrentStorageItem();
// Re-apply element IDs on 'storageView' change
ViewIdHandler.idHandler.generateAndSetIds(this);
// Clear the current storage view
specificStorageTypePanel.clear();
// Add the new storage view and call focus on it if needed
if (storageView != null && model != null) {
storageView.edit(model);
specificStorageTypePanel.add(storageView);
if (!nameEditor.isVisible()) {
storageView.focus();
}
}
}
Aggregations