| | |
| | | */ |
| | | package org.opends.guitools.controlpanel.task; |
| | | |
| | | import static org.forgerock.opendj.ldap.ModificationType.*; |
| | | import static org.forgerock.util.Utils.*; |
| | | import static org.opends.messages.AdminToolMessages.*; |
| | | |
| | |
| | | import javax.swing.SwingUtilities; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.opendj.ldap.ModificationType; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.ObjectClass; |
| | | import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; |
| | | import org.opends.guitools.controlpanel.datamodel.SomeSchemaElement; |
| | | import org.opends.guitools.controlpanel.ui.ColorAndFontConstants; |
| | |
| | | import org.opends.guitools.controlpanel.util.Utilities; |
| | | import org.opends.server.config.ConfigConstants; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.Attributes; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.Entry; |
| | |
| | | import org.opends.server.types.LDIFExportConfig; |
| | | import org.opends.server.types.LDIFImportConfig; |
| | | import org.opends.server.types.Modification; |
| | | import org.forgerock.opendj.ldap.schema.ObjectClass; |
| | | import org.opends.server.types.OpenDsException; |
| | | import org.opends.server.util.LDIFReader; |
| | | import org.opends.server.util.LDIFWriter; |
| | |
| | | private List<SomeSchemaElement> get(Map<String, List<SomeSchemaElement>> hmElems, String fileName) |
| | | { |
| | | List<SomeSchemaElement> elems = hmElems.get(fileName); |
| | | if (elems != null) |
| | | { |
| | | return elems; |
| | | } |
| | | return Collections.emptyList(); |
| | | return elems != null ? elems : Collections.<SomeSchemaElement> emptyList(); |
| | | } |
| | | |
| | | private Map<String, List<SomeSchemaElement>> copy(Set<SomeSchemaElement> elemsToAdd) |
| | |
| | | { |
| | | for (SomeSchemaElement schemaElement : schemaElements) |
| | | { |
| | | final Modification mod = new Modification(ModificationType.ADD, |
| | | Attributes.create(schemaElement.getAttributeName().toLowerCase(), getValueOffline(schemaElement))); |
| | | schemaEntry.applyModification(mod); |
| | | Attribute attr = Attributes.create(schemaElement.getAttributeName(), getValueOffline(schemaElement)); |
| | | schemaEntry.applyModification(new Modification(ADD, attr)); |
| | | } |
| | | } |
| | | |