Class LoadableSchemaObject

java.lang.Object
org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
All Implemented Interfaces:
Serializable, SchemaObject
Direct Known Subclasses:
LdapComparator, LdapComparatorDescription, Normalizer, NormalizerDescription, SyntaxChecker, SyntaxCheckerDescription

public abstract class LoadableSchemaObject extends AbstractSchemaObject
An abstract class used to manage the ADS specific SchemaObject, which can contain some compiled Java class to implement the specific logic.
Author:
Apache Directory Project
See Also:
  • Constructor Details

    • LoadableSchemaObject

      protected LoadableSchemaObject(SchemaObjectType objectType, String oid)
      Constructor to use when the OID is known in advance.
      Parameters:
      objectType - The SchemaObject type
      oid - The SchemaObject OID
    • LoadableSchemaObject

      protected LoadableSchemaObject(SchemaObjectType objectType)
      Constructor to use when the OID is not known until after instantiation.
      Parameters:
      objectType - The SchemaObject type
  • Method Details

    • getBytecode

      public String getBytecode()
      Get the SchemaObject bytecode
      Returns:
      The associated bytecode of this SchemaObject instance
    • setBytecode

      public void setBytecode(String bytecode)
      Stores some bytecode representing the compiled Java class for this SchemaObject instance.
      Parameters:
      bytecode - The bytecode to store
    • getFqcn

      public String getFqcn()
      Get the schemaObject fully qualified class name
      Returns:
      The schemaObject instance Fully Qualified Class Name
    • setFqcn

      public void setFqcn(String fqcn)
      Set the Fully Qualified Class Name for this SchemaObject instance class stored in the bytecode attribute
      Parameters:
      fqcn - The Fully Qualified Class Name
    • copy

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

      public int hashCode()
      Specified by:
      hashCode in interface SchemaObject
      Overrides:
      hashCode in class AbstractSchemaObject
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface SchemaObject
      Overrides:
      equals in class AbstractSchemaObject
    • isValid

      public boolean isValid()
      Test that the FQCN is equal to the instance's name. If the FQCN is empty, fill it with the instance's name
      Returns:
      true if the FQCN is correctly set