Interface SchemaObject

All Known Implementing Classes:
AbstractSchemaObject, AccessPointSyntaxChecker, AttributeType, AttributeTypeDescriptionSyntaxChecker, AttributeTypeUsageSyntaxChecker, AudioSyntaxChecker, BinarySyntaxChecker, BitStringComparator, BitStringSyntaxChecker, BooleanComparator, BooleanNormalizer, BooleanSyntaxChecker, BootParameterSyntaxChecker, ByteArrayComparator, CertificateComparator, CertificateListSyntaxChecker, CertificatePairSyntaxChecker, CertificateSyntaxChecker, ComparableComparator, ComparatorSyntaxChecker, CountrySyntaxChecker, CsnComparator, CsnSidComparator, CsnSidSyntaxChecker, CsnSyntaxChecker, DataQualitySyntaxSyntaxChecker, DeepTrimComparator, DeepTrimNormalizer, DeepTrimToLowerComparator, DeepTrimToLowerNormalizer, DeliveryMethodSyntaxChecker, DerefAliasSyntaxChecker, DirectoryStringSyntaxChecker, DitContentRule, DitContentRuleDescriptionSyntaxChecker, DitStructureRule, DitStructureRuleDescriptionSyntaxChecker, DlSubmitPermissionSyntaxChecker, DnComparator, DnNormalizer, DnSyntaxChecker, DsaQualitySyntaxSyntaxChecker, DseTypeSyntaxChecker, EnhancedGuideSyntaxChecker, FacsimileTelephoneNumberSyntaxChecker, FaxSyntaxChecker, GeneralizedTimeComparator, GeneralizedTimeNormalizer, GeneralizedTimeSyntaxChecker, GuideSyntaxChecker, Ia5StringSyntaxChecker, IntegerComparator, IntegerSyntaxChecker, JavaByteSyntaxChecker, JavaIntegerSyntaxChecker, JavaLongSyntaxChecker, JavaShortSyntaxChecker, JpegSyntaxChecker, LdapComparator, LdapComparatorDescription, LdapSyntax, LdapSyntaxDescriptionSyntaxChecker, LoadableSchemaObject, LongComparator, MailPreferenceSyntaxChecker, MasterAndShadowAccessPointSyntaxChecker, MatchingRule, MatchingRuleDescriptionSyntaxChecker, MatchingRuleUse, MatchingRuleUseDescriptionSyntaxChecker, MhsOrAddressSyntaxChecker, NameAndOptionalUIDSyntaxChecker, NameForm, NameFormDescriptionSyntaxChecker, NameOrNumericIdNormalizer, NisNetgroupTripleSyntaxChecker, NoOpNormalizer, Normalizer, NormalizerDescription, NormalizerSyntaxChecker, NormalizingComparator, NumberSyntaxChecker, NumericNormalizer, NumericOidSyntaxChecker, NumericStringComparator, NumericStringSyntaxChecker, ObjectClass, ObjectClassDescriptionSyntaxChecker, ObjectClassTypeComparator, ObjectClassTypeSyntaxChecker, ObjectIdentifierComparator, ObjectIdentifierFirstComponentComparator, ObjectIdentifierNormalizer, ObjectNameSyntaxChecker, OctetStringSyntaxChecker, OidLenSyntaxChecker, OidSyntaxChecker, OtherMailboxSyntaxChecker, ParsedDnComparator, PostalAddressSyntaxChecker, PresentationAddressSyntaxChecker, PrintableStringSyntaxChecker, ProtocolInformationSyntaxChecker, RegexNormalizer, RegexSyntaxChecker, SearchScopeSyntaxChecker, SerializableComparator, StringComparator, SubstringAssertionSyntaxChecker, SubtreeSpecificationSyntaxChecker, SupplierAndConsumerSyntaxChecker, SupplierInformationSyntaxChecker, SupplierOrConsumerSyntaxChecker, SupportedAlgorithmSyntaxChecker, SyntaxChecker, SyntaxCheckerDescription, SyntaxCheckerSyntaxChecker, TelephoneNumberComparator, TelephoneNumberNormalizer, TelephoneNumberSyntaxChecker, TeletexTerminalIdentifierSyntaxChecker, TelexNumberSyntaxChecker, UniqueMemberComparator, UniqueMemberNormalizer, UtcTimeSyntaxChecker, UuidComparator, UuidSyntaxChecker, WordComparator

public interface SchemaObject
Most schema objects have some common attributes. This class contains the minimum set of properties exposed by a SchemaObject.
We have 11 types of SchemaObjects :
  • AttributeType
  • DitContentRule
  • DitStructureRule
  • LdapComparator (specific to ADS)
  • LdapSyntaxe
  • MatchingRule
  • MatchingRuleUse
  • NameForm
  • Normalizer (specific to ADS)
  • ObjectClass
  • SyntaxChecker (specific to ADS)


This class provides accessors and setters for the following attributes, which are common to all those SchemaObjects :
  • oid : The numeric OID
  • description : The SchemaObject description
  • obsolete : Tells if the schema object is obsolete
  • extensions : The extensions, a key/Values map
  • schemaObjectType : The SchemaObject type (see upper)
  • schema : The schema the SchemaObject is associated with (it's an extension). Can be null
  • isEnabled : The SchemaObject status (it's related to the schema status)
  • isReadOnly : Tells if the SchemaObject can be modified or not


Some of those attributes are not used by some Schema elements, even if they should have been used. Here is the list :
  • name : LdapSyntax, Comparator, Normalizer, SyntaxChecker
  • numericOid : DitStructureRule
  • obsolete : LdapSyntax, Comparator, Normalizer, SyntaxChecker
Author:
Apache Directory Project
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addExtension(String key, String... values)
    Add an extension with its values
    void
    addExtension(String key, List<String> values)
    Add an extension with its values
    void
    addName(String... names)
    Add a new name to the list of names for this SchemaObject.
    void
    Clear the current SchemaObject : remove all the references to other objects, and all the Maps.
    Copy the current SchemaObject on place
    copy(SchemaObject original)
    Copies the given schema object into this schema object.
    boolean
    Gets a short description about this SchemaObject.
    getExtension(String extension)
    Get back the values associated with a given extension.
    Get the schemaObjct extensions
    Gets the first name in the set of short names for this SchemaObject if any exists for it.
    Gets short names for this SchemaObject if any exists for it, otherwise, returns an empty list.
    The SchemaObject type : AttributeType DitCOntentRule DitStructureRule LdapComparator (specific to ADS) LdapSyntaxe MatchingRule MatchingRuleUse NameForm Normalizer (specific to ADS) ObjectClass SyntaxChecker (specific to ADS)
    Gets usually what is the numeric object identifier assigned to this SchemaObject.
    Gets the name of the schema this SchemaObject is associated with.
    Gets the SchemaObject specification.
    boolean
    hasExtension(String extension)
    Check if a given extension is part of the SchemaObject.
    int
    boolean
    Tells if this SchemaObject is disabled.
    boolean
    Tells if this SchemaObject is enabled.
    boolean
    Gets whether or not this SchemaObject has been inactivated.
    void
    Transform the SchemaObject to an immutable object TODO locked.
    void
    setDescription(String description)
    Sets the SchemaObject's description
    void
    setEnabled(boolean enabled)
    Sets the SchemaObject state, either enabled or disabled.
    void
    Add an extensions with their values.
    void
    Sets the list of names for this SchemaObject.
    void
    setObsolete(boolean obsolete)
    Sets the Obsolete flag.
    void
    A special method used when renaming an SchemaObject: we may have to change it's OID
    void
    setSchemaName(String schemaName)
    Sets the name of the schema this SchemaObject is associated with.
    void
    setSpecification(String specification)
    Sets the SchemaObject's specification
  • Method Details

    • 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<String> getNames()
      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
    • getExtensions

      Map<String, List<String>> getExtensions()
      Get the schemaObjct extensions
      Returns:
      The SchemaObject extensions, as a Map of [extension, values]
    • 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<String> getExtension(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
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      boolean equals(Object o1)
      Overrides:
      equals in class Object
    • 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.