public abstract class AbstractSchemaObject extends java.lang.Object implements SchemaObject, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
description
A short description of this SchemaObject
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
extensions
A map containing the list of supported extensions
|
private int |
h
The hashcode for this schemaObject
|
protected boolean |
isEnabled
Whether or not this SchemaObject is enabled
|
protected boolean |
isObsolete
Whether or not this SchemaObject is obsolete
|
protected boolean |
isReadOnly
Whether or not this SchemaObject can be modified
|
protected boolean |
locked
A locked to avoid modifications when set to true
|
protected java.util.List<java.lang.String> |
names
The optional names for this SchemaObject
|
protected SchemaObjectType |
objectType
The SchemaObjectType
|
protected java.lang.String |
oid
The SchemaObject numeric OID
|
protected java.lang.String |
schemaName
The name of the schema this object is associated with
|
private static long |
serialVersionUID
The serial version UID
|
protected java.lang.String |
specification
The SchemaObject specification
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSchemaObject(SchemaObjectType objectType)
Constructor used when a generic reusable SchemaObject is assigned an
OID after being instantiated.
|
protected |
AbstractSchemaObject(SchemaObjectType objectType,
java.lang.String oid)
A constructor for a SchemaObject instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(java.lang.String key,
java.util.List<java.lang.String> values)
Add an extension with its values
|
void |
addExtension(java.lang.String key,
java.lang.String... values)
Add an extension with its values
|
void |
addName(java.lang.String... namesToAdd)
Add a new name to the list of names for this SchemaObject.
|
void |
clear()
Clear the current SchemaObject : remove all the references to other objects,
and all the Maps.
|
protected boolean |
compareOid(java.lang.String oid1,
java.lang.String oid2)
Compare two oids, and return true if they are both null or equal.
|
abstract SchemaObject |
copy()
Copy the current SchemaObject on place
|
SchemaObject |
copy(SchemaObject original)
Copies the given schema object into this schema object.
|
boolean |
equals(java.lang.Object o1) |
java.lang.String |
getDescription()
Gets a short description about this SchemaObject.
|
java.util.List<java.lang.String> |
getExtension(java.lang.String extension)
Get back the values associated with a given extension.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getExtensions() |
java.lang.String |
getName()
Gets the first name in the set of short names for this SchemaObject if
any exists for it.
|
java.util.List<java.lang.String> |
getNames()
Gets short names for this SchemaObject if any exists for it, otherwise,
returns an empty list.
|
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)
|
java.lang.String |
getOid()
Gets usually what is the numeric object identifier assigned to this
SchemaObject.
|
java.lang.String |
getSchemaName()
Gets the name of the schema this SchemaObject is associated with.
|
java.lang.String |
getSpecification()
Gets the SchemaObject specification.
|
boolean |
hasExtension(java.lang.String extension)
Check if a given extension is part of the SchemaObject.
|
int |
hashCode()
This method is final to forbid the inherited classes to implement
it.
|
boolean |
isDisabled()
Tells if this SchemaObject is disabled.
|
boolean |
isEnabled()
Tells if this SchemaObject is enabled.
|
boolean |
isObsolete()
Gets whether or not this SchemaObject has been inactivated.
|
boolean |
isReadOnly()
Tells if this SchemaObject is ReadOnly.
|
void |
lock()
Transform the SchemaObject to an immutable object
TODO locked.
|
void |
setDescription(java.lang.String description)
Sets the SchemaObject's description
|
void |
setEnabled(boolean enabled)
Sets the SchemaObject state, either enabled or disabled.
|
void |
setExtensions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> extensions)
Add an extensions with their values.
|
void |
setNames(java.util.List<java.lang.String> names)
Sets the list of names for this SchemaObject.
|
void |
setNames(java.lang.String... names)
Sets the list of names for this SchemaObject.
|
void |
setObsolete(boolean obsolete)
Sets the Obsolete flag.
|
void |
setOid(java.lang.String oid)
A special method used when renaming an SchemaObject: we may have to
change it's OID
|
void |
setReadOnly(boolean readOnly)
Sets the SchemaObject readOnly flag
|
void |
setSchemaName(java.lang.String schemaName)
Sets the name of the schema this SchemaObject is associated with.
|
void |
setSpecification(java.lang.String specification)
Sets the SchemaObject's specification
|
void |
unlock() |
private static final long serialVersionUID
protected java.lang.String oid
protected java.util.List<java.lang.String> names
protected boolean isEnabled
protected boolean isReadOnly
protected boolean isObsolete
protected java.lang.String description
protected java.lang.String specification
protected java.lang.String schemaName
protected SchemaObjectType objectType
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> extensions
protected volatile boolean locked
private int h
protected AbstractSchemaObject(SchemaObjectType objectType, java.lang.String oid)
objectType - The SchemaObjectType to createoid - the SchemaObject numeric OIDprotected AbstractSchemaObject(SchemaObjectType objectType)
objectType - The SchemaObjectType to createpublic java.lang.String getOid()
getOid in interface SchemaObjectpublic void setOid(java.lang.String oid)
setOid in interface SchemaObjectoid - The new OIDpublic java.util.List<java.lang.String> getNames()
getNames in interface SchemaObjectpublic java.lang.String getName()
getName in interface SchemaObjectpublic void addName(java.lang.String... namesToAdd)
addName in interface SchemaObjectnamesToAdd - The names to addpublic void setNames(java.util.List<java.lang.String> names)
setNames in interface SchemaObjectnames - The list of names. Can be emptypublic void setNames(java.lang.String... names)
names - The list of names.public java.lang.String getDescription()
getDescription in interface SchemaObjectpublic void setDescription(java.lang.String description)
setDescription in interface SchemaObjectdescription - The SchemaObject's descriptionpublic java.lang.String getSpecification()
getSpecification in interface SchemaObjectpublic void setSpecification(java.lang.String specification)
setSpecification in interface SchemaObjectspecification - The SchemaObject's specificationpublic boolean isEnabled()
isEnabled in interface SchemaObjectpublic boolean isDisabled()
isDisabled in interface SchemaObjectpublic void setEnabled(boolean enabled)
setEnabled in interface SchemaObjectenabled - The current SchemaObject statepublic boolean isReadOnly()
isReadOnly in interface SchemaObjectpublic void setReadOnly(boolean readOnly)
setReadOnly in interface SchemaObjectreadOnly - The current SchemaObject ReadOnly statuspublic boolean isObsolete()
isObsolete in interface SchemaObjectpublic void setObsolete(boolean obsolete)
setObsolete in interface SchemaObjectobsolete - The Obsolete flag statepublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExtensions()
getExtensions in interface SchemaObjectpublic boolean hasExtension(java.lang.String extension)
hasExtension in interface SchemaObjectextension - The extension we are looking for.true if the extension is present.public java.util.List<java.lang.String> getExtension(java.lang.String extension)
getExtension in interface SchemaObjectextension - The extension we are looking for.public void addExtension(java.lang.String key,
java.lang.String... values)
addExtension in interface SchemaObjectkey - The extension keyvalues - The associated valuespublic void addExtension(java.lang.String key,
java.util.List<java.lang.String> values)
addExtension in interface SchemaObjectkey - The extension keyvalues - The associated valuespublic void setExtensions(java.util.Map<java.lang.String,java.util.List<java.lang.String>> extensions)
setExtensions in interface SchemaObjectextensions - The extensions mappublic SchemaObjectType getObjectType()
getObjectType in interface SchemaObjectpublic java.lang.String getSchemaName()
getSchemaName in interface SchemaObjectpublic void setSchemaName(java.lang.String schemaName)
setSchemaName in interface SchemaObjectschemaName - the new schema namepublic final int hashCode()
hashCode in interface SchemaObjecthashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o1)
SchemaObjectequals in interface SchemaObjectequals in class java.lang.Objectpublic abstract SchemaObject copy()
copy in interface SchemaObjectprotected boolean compareOid(java.lang.String oid1,
java.lang.String oid2)
oid1 - the first OIDoid2 - the second OIDtrue if both OIDs are null or equalpublic SchemaObject copy(SchemaObject original)
copy in interface SchemaObjectoriginal - the original SchemaObjectpublic void clear()
clear in interface SchemaObjectpublic void unlock()
public final void lock()
lock in interface SchemaObject