| | |
| | | } |
| | | |
| | | Collection<OpenDsException> exceptions = desc.getExceptions(); |
| | | if (exceptions.size() == 0) |
| | | if (exceptions.isEmpty()) |
| | | { |
| | | boolean errorPaneVisible = false; |
| | | if (desc.getStatus() == ServerDescriptor.ServerStatus.STARTED) |
| | |
| | | } |
| | | } |
| | | |
| | | if (rootUsers.size() > 0) |
| | | { |
| | | setText(administrativeUsers, |
| | | Utilities.getStringFromCollection(sortedRootUsers, "<br>")); |
| | | } |
| | | else |
| | | { |
| | | setText(administrativeUsers, |
| | | INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString()); |
| | | } |
| | | String htmlText = !rootUsers.isEmpty() |
| | | ? Utilities.getStringFromCollection(sortedRootUsers, "<br>") |
| | | : INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString(); |
| | | setText(administrativeUsers, htmlText); |
| | | |
| | | String install = desc.getInstallPath(); |
| | | if (install != null) |
| | | { |
| | | setText(installPath, install); |
| | | } |
| | | else |
| | | { |
| | | setText(installPath, INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString()); |
| | | } |
| | | setText(install, installPath); |
| | | |
| | | String instance = desc.getInstancePath(); |
| | | |
| | | if (instance != null) |
| | | { |
| | | setText(instancePath, instance); |
| | | } |
| | | else |
| | | { |
| | | setText(instancePath, INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString()); |
| | | } |
| | | setText(instance, instancePath); |
| | | |
| | | instancePath.setVisible(!desc.sameInstallAndInstance()); |
| | | lInstancePath.setVisible(!desc.sameInstallAndInstance()); |
| | |
| | | } |
| | | } |
| | | |
| | | boolean oneReplicated = false; |
| | | for (BaseDNDescriptor baseDN : baseDNs) |
| | | { |
| | | if (baseDN.getType() == BaseDNDescriptor.Type.REPLICATED) |
| | | { |
| | | oneReplicated = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | boolean hasBaseDNs = baseDNs.size() > 0; |
| | | boolean oneReplicated = oneReplicated(baseDNs); |
| | | boolean hasBaseDNs = !baseDNs.isEmpty(); |
| | | |
| | | replicationBaseDNsTable.setVisible(oneReplicated && hasBaseDNs); |
| | | replicationBaseDNsTable.getTableHeader().setVisible( |
| | |
| | | desc.getConnectionHandlers(); |
| | | connectionHandlerTableModel.setData(connectionHandlers); |
| | | |
| | | boolean hasConnectionHandlers = connectionHandlers.size() > 0; |
| | | boolean hasConnectionHandlers = !connectionHandlers.isEmpty(); |
| | | connectionHandlersTable.setVisible(hasConnectionHandlers); |
| | | connectionHandlersTable.getTableHeader().setVisible(hasConnectionHandlers); |
| | | connectionHandlerTableEmpty.setVisible(!hasConnectionHandlers); |
| | |
| | | Utilities.updateViewPositions(pos); |
| | | } |
| | | |
| | | private boolean oneReplicated(Set<BaseDNDescriptor> baseDNs) |
| | | { |
| | | for (BaseDNDescriptor baseDN : baseDNs) |
| | | { |
| | | if (baseDN.getType() == BaseDNDescriptor.Type.REPLICATED) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | private void setText(String text, JEditorPane editorPane) |
| | | { |
| | | if (text != null) |
| | | { |
| | | setText(editorPane, text); |
| | | } |
| | | else |
| | | { |
| | | setText(editorPane, INFO_NOT_AVAILABLE_SHORT_LABEL.get().toString()); |
| | | } |
| | | } |
| | | |
| | | private void setText(JEditorPane pane, String htmlText) |
| | | { |
| | | pane.setText(Utilities.applyFont(htmlText, |