public void setRequiredOwnerCluster(ICFSecurityClusterObj value) { if (buff == null) { getSecGroupFormBuff(); } requiredOwnerCluster = null; requiredContainerGroup = null; if (value != null) { getPKey().setRequiredClusterId(value.getRequiredId()); getSecGroupFormBuff().setRequiredClusterId(value.getRequiredId()); } requiredOwnerCluster = value; }
public void populateFields() { ICFSecurityClusterObj popObj; ICFSecurityClusterObj focus = getSwingFocusAsCluster(); if (focus != null) { popObj = (ICFSecurityClusterObj) (focus.getEdit()); if (popObj == null) { popObj = focus; } } else { popObj = null; } if (getPanelMode() == CFJPanel.PanelMode.Unknown) { popObj = null; } if (popObj == null) { getSwingEditorId().setInt64Value(null); } else { getSwingEditorId().setInt64Value(popObj.getRequiredId()); } if (popObj == null) { getSwingEditorFullDomainName().setStringValue(null); } else { getSwingEditorFullDomainName().setStringValue(popObj.getRequiredFullDomainName()); } if (popObj == null) { getSwingEditorDescription().setStringValue(null); } else { getSwingEditorDescription().setStringValue(popObj.getRequiredDescription()); } }
public void loadData(boolean forceReload) { ICFSecuritySchemaObj schemaObj = (ICFSecuritySchemaObj) javafxSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfSysCluster == null) || forceReload) { observableListOfSysCluster = null; listOfSysCluster = schemaObj .getSysClusterTableObj() .readSysClusterByClusterIdx(containingCluster.getRequiredId(), javafxIsInitializing); if (listOfSysCluster != null) { observableListOfSysCluster = FXCollections.observableArrayList(listOfSysCluster); observableListOfSysCluster.sort(compareSysClusterByQualName); } else { observableListOfSysCluster = FXCollections.observableArrayList(); } dataTable.setItems(observableListOfSysCluster); // Hack from stackoverflow to fix JavaFX TableView refresh issue ((TableColumn) dataTable.getColumns().get(0)).setVisible(false); ((TableColumn) dataTable.getColumns().get(0)).setVisible(true); } }
public ICFSecurityTenantObj getSystemTenant() { boolean transactionStarted = schema.beginTransaction(); ICFSecurityTenantObj tenantObj; try { schema.getAuditActionTableObj().bootstrapAuditActions(); ICFSecurityClusterObj clusterObj = schema.getClusterTableObj().getSystemCluster(); tenantObj = readTenantByUNameIdx(clusterObj.getRequiredId(), "system"); if (tenantObj == null) { tenantObj = newInstance(); ICFSecurityTenantEditObj tenantEdit = tenantObj.beginEdit(); tenantEdit.setRequiredContainerCluster(clusterObj); tenantEdit.setRequiredTenantName("system"); tenantObj = tenantEdit.create(); tenantEdit.endEdit(); } if (transactionStarted) { schema.commit(); } } catch (RuntimeException e) { if (transactionStarted) { try { schema.rollback(); } catch (Exception e2) { } } throw e; } return (tenantObj); }
public void loadData(boolean forceReload) { ICFBamSchemaObj schemaObj = swingSchema.getSchema(); if ((containingCluster == null) || forceReload) { CFSecurityAuthorization auth = schemaObj.getAuthorization(); long containingClusterId = auth.getSecClusterId(); containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId); } if ((listOfSysCluster == null) || forceReload) { arrayOfSysCluster = null; listOfSysCluster = schemaObj .getSysClusterTableObj() .readSysClusterByClusterIdx(containingCluster.getRequiredId(), swingIsInitializing); if (listOfSysCluster != null) { Object objArray[] = listOfSysCluster.toArray(); if (objArray != null) { int len = objArray.length; arrayOfSysCluster = new ICFSecuritySysClusterObj[len]; for (int i = 0; i < len; i++) { arrayOfSysCluster[i] = (ICFSecuritySysClusterObj) objArray[i]; } Arrays.sort(arrayOfSysCluster, compareSysClusterByQualName); } } } }