Class AbstractSchemaLoader

    • Field Detail

      • schemaMap

        protected final Map<String,​Schema> schemaMap
        A map of all available schema names to schema objects. This map is populated when this class is created with all the schemas present in the LDIF based schema repository.
    • Constructor Detail

      • AbstractSchemaLoader

        public AbstractSchemaLoader()
    • Method Detail

      • getSchema

        public Schema getSchema​(String schemaName)
        Gets a schema object based on it's name.
        Specified by:
        getSchema in interface SchemaLoader
        Parameters:
        schemaName - the name of the schema to load
        Returns:
        the Schema object associated with the name
      • addSchema

        public void addSchema​(Schema schema)
        Add a new schema to the schema's list
        Specified by:
        addSchema in interface SchemaLoader
        Parameters:
        schema - The schema to add
      • removeSchema

        public void removeSchema​(Schema schema)
        Remove a schema from the schema's list
        Specified by:
        removeSchema in interface SchemaLoader
        Parameters:
        schema - The schema to remove
      • loadAttributeTypes

        public List<Entry> loadAttributeTypes​(String... schemaNames)
                                       throws LdapException,
                                              IOException
        Build a list of AttributeTypes read from the underlying storage for a list of specific schema, using their name
        Specified by:
        loadAttributeTypes in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which AttributeTypes are loaded
        Returns:
        The list of loaded AttributeTypes
        Throws:
        LdapException - if there are failures accessing AttributeType information
        IOException - If we can't read the schemaObject
      • loadComparators

        public List<Entry> loadComparators​(String... schemaNames)
                                    throws LdapException,
                                           IOException
        Build a list of Comparators read from the underlying storage for a list of specific schema, using their name
        Specified by:
        loadComparators in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which Comparators are loaded
        Returns:
        The list of loaded Comparators
        Throws:
        LdapException - if there are failures accessing Comparator information
        IOException - If we can't read the schemaObject
      • loadDitContentRules

        public List<Entry> loadDitContentRules​(String... schemaNames)
                                        throws LdapException,
                                               IOException
        Build a list of DitContentRules read from the underlying storage for a list of specified schema names
        Specified by:
        loadDitContentRules in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which DitContentRules are loaded
        Returns:
        The list of loaded DitContentRules
        Throws:
        LdapException - if there are failures accessing DitContentRule information
        IOException - If we can't read the schemaObject
      • loadDitStructureRules

        public List<Entry> loadDitStructureRules​(String... schemaNames)
                                          throws LdapException,
                                                 IOException
        Build a list of DitStructureRules read from the underlying storage for a list of specified schema names
        Specified by:
        loadDitStructureRules in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which DitStructureRules are loaded
        Returns:
        The list of loaded DitStructureRules
        Throws:
        LdapException - if there are failures accessing DitStructureRule information
        IOException - If we can't read the schemaObject
      • loadMatchingRules

        public List<Entry> loadMatchingRules​(String... schemaNames)
                                      throws LdapException,
                                             IOException
        Build a list of MatchingRules read from the underlying storage for a list of specific schema, using their name
        Specified by:
        loadMatchingRules in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which MatchingRules are loaded
        Returns:
        The list of loaded MatchingRules
        Throws:
        LdapException - if there are failures accessing MatchingRule information
        IOException - If we can't read the schemaObject
      • loadMatchingRuleUses

        public List<Entry> loadMatchingRuleUses​(String... schemaNames)
                                         throws LdapException,
                                                IOException
        Build a list of MatchingRuleUses read from the underlying storage for a list of specified schema names
        Specified by:
        loadMatchingRuleUses in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which MatchingRuleUses are loaded
        Returns:
        The list of loaded MatchingRuleUses
        Throws:
        LdapException - if there are failures accessing MatchingRuleUses information
        IOException - If we can't read the schemaObject
      • loadNameForms

        public List<Entry> loadNameForms​(String... schemaNames)
                                  throws LdapException,
                                         IOException
        Build a list of NameForms read from the underlying storage for a list of specified schema names
        Specified by:
        loadNameForms in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which NameForms are loaded
        Returns:
        The list of loaded NameForms
        Throws:
        LdapException - if there are failures accessing NameForms information
        IOException - If we can't read the schemaObject
      • loadNormalizers

        public List<Entry> loadNormalizers​(String... schemaNames)
                                    throws LdapException,
                                           IOException
        Build a list of Normalizers read from the underlying storage for a list of specified schema names
        Specified by:
        loadNormalizers in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which Normalizers are loaded
        Returns:
        The list of loaded Normalizers
        Throws:
        LdapException - if there are failures accessing Normalizer information
        IOException - If we can't read the schemaObject
      • loadObjectClasses

        public List<Entry> loadObjectClasses​(String... schemaNames)
                                      throws LdapException,
                                             IOException
        Build a list of ObjectClasses read from the underlying storage for a list of specified schema names
        Specified by:
        loadObjectClasses in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which ObjectClasses are loaded
        Returns:
        The list of loaded ObjectClasses
        Throws:
        LdapException - if there are failures accessing ObjectClasses information
        IOException - If we can't read the schemaObject
      • loadSyntaxes

        public List<Entry> loadSyntaxes​(String... schemaNames)
                                 throws LdapException,
                                        IOException
        Build a list of Syntaxes read from the underlying storage for a list of specified schema names
        Specified by:
        loadSyntaxes in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which Syntaxes are loaded
        Returns:
        The list of loaded Syntaxes
        Throws:
        LdapException - if there are failures accessing Syntax information
        IOException - If we can't read the schemaObject
      • loadSyntaxCheckers

        public List<Entry> loadSyntaxCheckers​(String... schemaNames)
                                       throws LdapException,
                                              IOException
        Build a list of SyntaxCheckers read from the underlying storage for a list of specified schema names
        Specified by:
        loadSyntaxCheckers in interface SchemaLoader
        Parameters:
        schemaNames - the schema names from which SyntaxCheckers are loaded
        Returns:
        A list of loaded SyntaxCheckers
        Throws:
        LdapException - if there are failures accessing SyntaxChecker information
        IOException - If we had some issues loading the schemas
      • isRelaxed

        public boolean isRelaxed()
        Specified by:
        isRelaxed in interface SchemaLoader
        Returns:
        Tells if the SchemaLoader is in RELAXED mode
      • isStrict

        public boolean isStrict()
        Specified by:
        isStrict in interface SchemaLoader
        Returns:
        Tells if the SchemaLoader is in STRICT mode
      • setRelaxed

        public void setRelaxed​(boolean relaxed)
        Set the SchemzLoader in STRICT or RELAXED mode.
        Specified by:
        setRelaxed in interface SchemaLoader
        Parameters:
        relaxed - if true, the SchemaLoader will be in relaxed mode, otherwise it will be in strict mode (the default)