+
+ private Map<String, String> getDns() {
+ return userAdminWrapper.getKnownBaseDns(true);
+ }
+
+ private String getDn(String cn) {
+ Map<String, String> dns = getDns();
+ String bdn = baseDnCmb.getText();
+ if (EclipseUiUtils.notEmpty(bdn)) {
+ Dictionary<String, ?> props = UserAdminConf.uriAsProperties(dns
+ .get(bdn));
+ String dn = LdifName.cn.name() + "=" + cn + ","
+ + UserAdminConf.groupBase.getValue(props) + "," + bdn;
+ return dn;
+ }
+ return null;
+ }
+
+ private void initialiseDnCmb(Combo combo) {
+ Map<String, String> dns = userAdminWrapper.getKnownBaseDns(true);
+ if (dns.isEmpty())
+ throw new ArgeoException(
+ "No writable base dn found. Cannot create group");
+ combo.setItems(dns.keySet().toArray(new String[0]));
+ if (dns.size() == 1)
+ combo.select(0);
+ }
+ }
+
+ private Combo createGridLC(Composite parent, String label) {
+ Label lbl = new Label(parent, SWT.LEAD);
+ lbl.setText(label);
+ lbl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false));
+ Combo combo = new Combo(parent, SWT.LEAD | SWT.BORDER | SWT.READ_ONLY);
+ combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ return combo;