org.apache.directory.shared.ldap.schema
Class LoadableSchemaObject

java.lang.Object
  extended by org.apache.directory.shared.ldap.schema.AbstractSchemaObject
      extended by org.apache.directory.shared.ldap.schema.LoadableSchemaObject
All Implemented Interfaces:
java.io.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.

Version:
$Rev: 437007 $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
protected LoadableSchemaObject(SchemaObjectType objectType)
          Constructor to use when the OID is not known until after instantiation.
protected LoadableSchemaObject(SchemaObjectType objectType, java.lang.String oid)
          Constructor to use when the OID is known in advance.
 
Method Summary
 LoadableSchemaObject copy()
          Copy the current SchemaObject on place
 boolean equals(java.lang.Object o)
           
 java.lang.String getBytecode()
           
 java.lang.String getFqcn()
           
 boolean isValid()
          Test that the FQCN is equal to the instance's name.
 void registerOid(SchemaObject schemaObject, Registries registries)
          Register the given SchemaObject into the given registries' globalOidRegistry
 void setBytecode(java.lang.String bytecode)
          Stores some bytecode representing the compiled Java class for this SchemaObject instance.
 void setFqcn(java.lang.String fqcn)
          Set the Fully Qualified Class Name for this SchemaObject instance class stored in the bytecode attribute
 
Methods inherited from class org.apache.directory.shared.ldap.schema.AbstractSchemaObject
addExtension, addName, addToRegistries, clear, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, removeFromRegistries, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setRegistries, setSchemaName, setSpecification
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadableSchemaObject

protected LoadableSchemaObject(SchemaObjectType objectType,
                               java.lang.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 Detail

getBytecode

public java.lang.String getBytecode()
Returns:
The associated bytecode of this SchemaObject instance

setBytecode

public void setBytecode(java.lang.String bytecode)
Stores some bytecode representing the compiled Java class for this SchemaObject instance.

Parameters:
bytecode - The bytecode to store

getFqcn

public java.lang.String getFqcn()
Returns:
The chemaObject instance Fully Qualified Class Name

setFqcn

public void setFqcn(java.lang.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

registerOid

public void registerOid(SchemaObject schemaObject,
                        Registries registries)
                 throws LdapException
Register the given SchemaObject into the given registries' globalOidRegistry

Specified by:
registerOid in interface SchemaObject
Overrides:
registerOid in class AbstractSchemaObject
Parameters:
schemaObject - the SchemaObject we want to register
registries - The registries in which we want it to be stored
Throws:
LdapException - If the OID is invalid

copy

public LoadableSchemaObject copy()
Copy the current SchemaObject on place

Specified by:
copy in interface SchemaObject
Specified by:
copy in class AbstractSchemaObject
Returns:
The copied SchemaObject

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface SchemaObject
Overrides:
equals in class AbstractSchemaObject
See Also:
Object#equals()

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


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.