| | |
| | | package org.opends.guitools.controlpanel.ui; |
| | | |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | import static org.opends.server.types.CommonSchemaElements.*; |
| | | import static org.opends.server.util.CollectionUtils.*; |
| | | |
| | | import java.awt.Component; |
| | | import java.awt.Container; |
| | |
| | | import javax.swing.event.DocumentEvent; |
| | | import javax.swing.event.DocumentListener; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.opendj.ldap.schema.AttributeUsage; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.Syntax; |
| | | import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; |
| | | import org.opends.guitools.controlpanel.event. |
| | | ConfigurationElementCreatedListener; |
| | | import org.opends.guitools.controlpanel.event.ConfigurationElementCreatedListener; |
| | | import org.opends.guitools.controlpanel.event.ScrollPaneBorderListener; |
| | | import org.opends.guitools.controlpanel.task.DeleteSchemaElementsTask; |
| | | import org.opends.guitools.controlpanel.task.ModifyAttributeTask; |
| | | import org.opends.guitools.controlpanel.task.Task; |
| | | import org.opends.guitools.controlpanel.ui.components.BasicExpander; |
| | | import org.opends.guitools.controlpanel.ui.components.TitlePanel; |
| | | import org.opends.guitools.controlpanel.ui.renderer. |
| | | SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.ui.renderer.SchemaElementComboBoxCellRenderer; |
| | | import org.opends.guitools.controlpanel.util.LowerCaseComparator; |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.Syntax; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.AttributeUsage; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.Schema; |
| | | import org.opends.server.util.ServerConstants; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | | import static org.opends.server.types.CommonSchemaElements.*; |
| | | |
| | | /** |
| | | * The panel that displays a custom attribute definition. |
| | | */ |
| | |
| | | availableMatchingRules.add(matchingRuleNameMap.get(key)); |
| | | } |
| | | JComboBox[] combos = {approximate, equality, ordering, substring}; |
| | | for (int i = 0; i < combos.length; i++) |
| | | for (JComboBox<LocalizableMessage> combo : combos) |
| | | { |
| | | final DefaultComboBoxModel model = (DefaultComboBoxModel)combos[i].getModel(); |
| | | final DefaultComboBoxModel<LocalizableMessage> model = (DefaultComboBoxModel) combo.getModel(); |
| | | final List<Object> el = new ArrayList<Object>(availableMatchingRules); |
| | | if (model.getSize() == 0) |
| | | { |
| | |
| | | String f = file.getText().trim(); |
| | | if (f.length() > 0) |
| | | { |
| | | ArrayList<String> list = new ArrayList<>(); |
| | | list.add(f); |
| | | map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, list); |
| | | map.put(ServerConstants.SCHEMA_PROPERTY_FILENAME, newArrayList(f)); |
| | | } |
| | | String or = origin.getText().trim(); |
| | | if (or.length() > 0) |
| | | { |
| | | ArrayList<String> list = new ArrayList<>(); |
| | | list.add(or); |
| | | map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, list); |
| | | map.put(ServerConstants.SCHEMA_PROPERTY_ORIGIN, newArrayList(or)); |
| | | } |
| | | return map; |
| | | } |