| | |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | |
| | | import org.opends.server.api.ConfigHandler; |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.schema.AttributeTypeSyntax; |
| | | import org.opends.server.schema.DITContentRuleSyntax; |
| | |
| | | // The schema that has been parsed from the server configuration. |
| | | private Schema schema; |
| | | |
| | | // The configuration handler for the Directory Server. |
| | | private ConfigHandler configHandler; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public SchemaConfigManager() |
| | | { |
| | | configHandler = DirectoryServer.getConfigHandler(); |
| | | |
| | | schema = new Schema(); |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : attrList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : ocList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : nfList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : dcrList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : dsrList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : mruList) |
| | | { |
| | | mods.add(new Modification(ModificationType.ADD, a.duplicate())); |
| | | mods.add(new Modification(ModificationType.ADD, a)); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : attrList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the attribute type. |
| | | AttributeType attrType; |
| | |
| | | { |
| | | for (Attribute a : ocList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the objectclass. |
| | | ObjectClass oc; |
| | |
| | | { |
| | | for (Attribute a : nfList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the name form. |
| | | NameForm nf; |
| | |
| | | { |
| | | for (Attribute a : dcrList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the DIT content rule. |
| | | DITContentRule dcr; |
| | |
| | | { |
| | | for (Attribute a : dsrList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the DIT content rule. |
| | | DITStructureRule dsr; |
| | |
| | | { |
| | | for (Attribute a : mruList) |
| | | { |
| | | for (AttributeValue v : a.getValues()) |
| | | for (AttributeValue v : a) |
| | | { |
| | | // Parse the matching rule use definition. |
| | | MatchingRuleUse mru; |