|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.schema.AbstractSchemaObject
public abstract class AbstractSchemaObject
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 :
| Field Summary | |
|---|---|
protected String |
description
A short description of this SchemaObject |
protected Map<String,List<String>> |
extensions
A map containing the list of supported extensions |
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 List<String> |
names
The optional names for this SchemaObject |
protected SchemaObjectType |
objectType
The SchemaObjectType |
protected String |
oid
The SchemaObject numeric OID |
protected String |
schemaName
The name of the schema this object is associated with |
protected String |
specification
The SchemaObject specification |
| Constructor Summary | |
|---|---|
protected |
AbstractSchemaObject(SchemaObjectType objectType)
Constructor used when a generic reusable SchemaObject is assigned an OID after being instantiated. |
protected |
AbstractSchemaObject(SchemaObjectType objectType,
String oid)
A constructor for a SchemaObject instance. |
| Method Summary | |
|---|---|
void |
addExtension(String key,
List<String> values)
Add an extension with its values |
void |
addExtension(String key,
String... values)
Add an extension with its values |
void |
addName(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(String oid1,
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(Object o1)
|
String |
getDescription()
Gets a short description about this SchemaObject. |
Map<String,List<String>> |
getExtensions()
|
String |
getName()
Gets the first name in the set of short names for this SchemaObject if any exists for it. |
List<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) |
String |
getOid()
Gets usually what is the numeric object identifier assigned to this SchemaObject. |
String |
getSchemaName()
Gets the name of the schema this SchemaObject is associated with. |
String |
getSpecification()
Gets the SchemaObject specification. |
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(String description)
Sets the SchemaObject's description |
void |
setEnabled(boolean enabled)
Sets the SchemaObject state, either enabled or disabled. |
void |
setExtensions(Map<String,List<String>> extensions)
Add an extensions with their values. |
void |
setNames(List<String> names)
Sets the list of names for this SchemaObject. |
void |
setNames(String... names)
Sets the list of names for this SchemaObject. |
void |
setObsolete(boolean obsolete)
Sets the Obsolete flag. |
void |
setOid(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(String schemaName)
Sets the name of the schema this SchemaObject is associated with. |
void |
setSpecification(String specification)
Sets the SchemaObject's specification |
void |
unlock()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String oid
protected List<String> names
protected boolean isEnabled
protected boolean isReadOnly
protected boolean isObsolete
protected String description
protected String specification
protected String schemaName
protected SchemaObjectType objectType
protected Map<String,List<String>> extensions
protected volatile boolean locked
| Constructor Detail |
|---|
protected AbstractSchemaObject(SchemaObjectType objectType, String oid)
objectType - The SchemaObjectType to createoid - the SchemaObject numeric OIDprotected AbstractSchemaObject(SchemaObjectType objectType)
objectType - The SchemaObjectType to create| Method Detail |
|---|
public String getOid()
getOid in interface SchemaObjectpublic void setOid(String oid)
setOid in interface SchemaObjectoid - The new OIDpublic List<String> getNames()
getNames in interface SchemaObjectpublic String getName()
getName in interface SchemaObjectpublic void addName(String... namesToAdd)
addName in interface SchemaObjectnamesToAdd - The names to addpublic void setNames(List<String> names)
setNames in interface SchemaObjectnames - The list of names. Can be emptypublic void setNames(String... names)
names - The list of names.public String getDescription()
getDescription in interface SchemaObjectpublic void setDescription(String description)
setDescription in interface SchemaObjectdescription - The SchemaObject's descriptionpublic String getSpecification()
getSpecification in interface SchemaObjectpublic void setSpecification(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 Map<String,List<String>> getExtensions()
getExtensions in interface SchemaObjectpublic void addExtension(String key, String... values)
addExtension in interface SchemaObjectkey - The extension keyvalues - The associated valuespublic void addExtension(String key, List<String> values)
addExtension in interface SchemaObjectkey - The extension keyvalues - The associated valuespublic void setExtensions(Map<String,List<String>> extensions)
setExtensions in interface SchemaObjectextensions - The extensions mappublic SchemaObjectType getObjectType()
getObjectType in interface SchemaObjectpublic String getSchemaName()
getSchemaName in interface SchemaObjectpublic void setSchemaName(String schemaName)
setSchemaName in interface SchemaObjectschemaName - the new schema namepublic final int hashCode()
hashCode in interface SchemaObjecthashCode in class Objectpublic boolean equals(Object o1)
SchemaObject
equals in interface SchemaObjectequals in class Objectpublic abstract SchemaObject copy()
copy in interface SchemaObjectprotected boolean compareOid(String oid1, String oid2)
oid1 - the first OIDoid2 - the second OID
true if both OIDs are null or equalpublic SchemaObject copy(SchemaObject original)
copy in interface SchemaObjectoriginal - the original SchemaObject
public void clear()
clear in interface SchemaObjectpublic void unlock()
public final void lock()
lock in interface SchemaObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||