Interface SchemaObject

    • Method Detail

      • getOid

        String getOid()
        Gets usually what is the numeric object identifier assigned to this SchemaObject. All schema objects except for MatchingRuleUses have an OID assigned specifically to then. A MatchingRuleUse's OID really is the OID of it's MatchingRule and not specific to the MatchingRuleUse. This effects how MatchingRuleUse objects are maintained by the system.
        Returns:
        an OID for this SchemaObject or its MatchingRule if this SchemaObject is a MatchingRuleUse object
      • setOid

        void setOid​(String oid)
        A special method used when renaming an SchemaObject: we may have to change it's OID
        Parameters:
        oid - The new OID
      • getNames

        List<StringgetNames()
        Gets short names for this SchemaObject if any exists for it, otherwise, returns an empty list.
        Returns:
        the names for this SchemaObject
      • getName

        String getName()
        Gets the first name in the set of short names for this SchemaObject if any exists for it.
        Returns:
        the first of the names for this SchemaObject or the oid if one does not exist
      • addName

        void addName​(String... names)
        Add a new name to the list of names for this SchemaObject. The name is lower cased and trimmed.
        Parameters:
        names - The names to add
      • setNames

        void setNames​(List<String> names)
        Sets the list of names for this SchemaObject. The names are lower cased and trimmed.
        Parameters:
        names - The list of names. Can be empty
      • getDescription

        String getDescription()
        Gets a short description about this SchemaObject.
        Returns:
        a short description about this SchemaObject
      • setDescription

        void setDescription​(String description)
        Sets the SchemaObject's description
        Parameters:
        description - The SchemaObject's description
      • getSpecification

        String getSpecification()
        Gets the SchemaObject specification.
        Returns:
        the SchemaObject specification
      • setSpecification

        void setSpecification​(String specification)
        Sets the SchemaObject's specification
        Parameters:
        specification - The SchemaObject's specification
      • isEnabled

        boolean isEnabled()
        Tells if this SchemaObject is enabled.
        Returns:
        true if the SchemaObject is enabled, or if it depends on an enabled schema
      • isDisabled

        boolean isDisabled()
        Tells if this SchemaObject is disabled.
        Returns:
        true if the SchemaObject is disabled
      • setEnabled

        void setEnabled​(boolean enabled)
        Sets the SchemaObject state, either enabled or disabled.
        Parameters:
        enabled - The current SchemaObject state
      • isObsolete

        boolean isObsolete()
        Gets whether or not this SchemaObject has been inactivated. All SchemaObjects except Syntaxes allow for this parameter within their definition. For Syntaxes this property should always return false in which case it is never included in the description.
        Returns:
        true if inactive, false if active
      • setObsolete

        void setObsolete​(boolean obsolete)
        Sets the Obsolete flag.
        Parameters:
        obsolete - The Obsolete flag state
      • hasExtension

        boolean hasExtension​(String extension)
        Check if a given extension is part of the SchemaObject. Extensions are case insensitive.
        Parameters:
        extension - The extension we are looking for.
        Returns:
        true if the extension is present.
      • getExtension

        List<StringgetExtension​(String extension)
        Get back the values associated with a given extension.
        Parameters:
        extension - The extension we are looking for.
        Returns:
        The list of values associated with the extension
      • addExtension

        void addExtension​(String key,
                          String... values)
        Add an extension with its values
        Parameters:
        key - The extension key
        values - The associated values
      • addExtension

        void addExtension​(String key,
                          List<String> values)
        Add an extension with its values
        Parameters:
        key - The extension key
        values - The associated values
      • setExtensions

        void setExtensions​(Map<String,​List<String>> extensions)
        Add an extensions with their values. (Actually do a copy)
        Parameters:
        extensions - The extensions map
      • getObjectType

        SchemaObjectType getObjectType()
        The SchemaObject type :
        • AttributeType
        • DitCOntentRule
        • DitStructureRule
        • LdapComparator (specific to ADS)
        • LdapSyntaxe
        • MatchingRule
        • MatchingRuleUse
        • NameForm
        • Normalizer (specific to ADS)
        • ObjectClass
        • SyntaxChecker (specific to ADS)
        Returns:
        the SchemaObject type
      • getSchemaName

        String getSchemaName()
        Gets the name of the schema this SchemaObject is associated with.
        Returns:
        the name of the schema associated with this schemaObject
      • setSchemaName

        void setSchemaName​(String schemaName)
        Sets the name of the schema this SchemaObject is associated with.
        Parameters:
        schemaName - the new schema name
      • copy

        SchemaObject copy()
        Copy the current SchemaObject on place
        Returns:
        The copied SchemaObject
      • copy

        SchemaObject copy​(SchemaObject original)
        Copies the given schema object into this schema object.
        Parameters:
        original - the original SchemaObject
        Returns:
        this
      • clear

        void clear()
        Clear the current SchemaObject : remove all the references to other objects, and all the Maps.
      • lock

        void lock()
        Transform the SchemaObject to an immutable object TODO locked.