|
Directory SDK for Java 4.19 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetscape.ldap.LDAPSchemaElement
Abstract class representing an element (such as an object class
definition, an attribute type definition, or a matching rule
definition) in the schema. The specific types of elements are
represented by the LDAPObjectClassSchema,
LDAPAttributeSchema, and LDAPMatchingRuleSchema
subclasses.
RFC 2252, Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions covers the types of information that need to be specified in the definition of an object class, attribute type, or matching rule. All of these schema elements can specify the following information:
In addition, there are optional standard qualifiers for attribute
types (see LDAPAttributeSchema), and implementation-specific
qualifiers may be added. Non-standard qualifiers must have names
starting with X-, e.g. "X-OWNER 'John Jacobson'". Optional and
non-standard qualifiers can be accessed with getQualifier and
setQualifier, and enumerated with
getQualifierNames.
The LDAPSchemaElement class implements methods that
you can use with different types of schema elements (object class
definitions, attribute type definitions, and matching rule definitions).
You can do the following:
LDAPObjectClassSchema,
LDAPAttributeSchema,
LDAPMatchingRuleSchema,
Serialized Form| Field Summary | |
static int |
binary
|
static int |
ces
|
static int |
cis
|
static int |
dn
|
static int |
integer
|
static String |
OBSOLETE
|
static String |
SUPERIOR
|
static String |
SYNTAX
|
static int |
telephone
|
static int |
unknown
|
| Method Summary | |
void |
add(LDAPConnection ld)
Adds the current object class, attribute type, or matching rule definition to the schema at the root DSE. |
void |
add(LDAPConnection ld,
String dn)
Adds the current object class, attribute type, or matching rule definition to the schema. |
String[] |
getAliases()
Gets the aliases of the attribute, if any |
String |
getDescription()
Gets the description of the object class, attribute type, or matching rule. |
String |
getID()
Gets the object ID (OID) of the object class, attribute type, or matching rule in dotted-string format (for example, "1.2.3.4"). |
String |
getName()
Gets the name of the object class, attribute type, or matching rule. |
String |
getOID()
Deprecated. Use LDAPSchemaElement.getID() |
String[] |
getQualifier(String name)
Gets the value of a qualifier which is not predefined. |
Enumeration |
getQualifierNames()
Gets an enumeration of all qualifiers which are not predefined. |
String |
getValue()
Formats a String in the format defined in X.501 (see RFC 2252, Lightweight Directory Access Protocol (v3): Attribute Syntax Definitions for a description of this format). |
boolean |
isObsolete()
Reports if the element is marked as obsolete. |
void |
modify(LDAPConnection ld,
LDAPSchemaElement newValue)
Replaces a single value of the object class, attribute type, or matching rule definition in the schema at the root DSE. |
void |
modify(LDAPConnection ld,
LDAPSchemaElement newValue,
String dn)
Replaces a single value of the object class, attribute type, or matching rule definition in the schema. |
void |
remove(LDAPConnection ld)
Removes the current object class, attribute type, or matching rule definition from the schema at the root DSE. |
void |
remove(LDAPConnection ld,
String dn)
Removes the current object class, attribute type, or matching rule definition from the schema. |
void |
setQualifier(String name,
String value)
Keeps track of qualifiers which are not predefined. |
void |
setQualifier(String name,
String[] values)
Keeps track of qualifiers which are not predefined. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int unknown
public static final int cis
public static final int binary
public static final int telephone
public static final int ces
public static final int dn
public static final int integer
public static final String OBSOLETE
public static final String SUPERIOR
public static final String SYNTAX
| Method Detail |
public String getName()
public String getID()
public String getOID()
LDAPSchemaElement.getID()
public String getDescription()
public void add(LDAPConnection ld,
String dn)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP serverdn - the entry at which to add the schema definition
LDAPException - if the specified definition cannot be
added to the schema
public void add(LDAPConnection ld)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP server
LDAPException - if the specified definition cannot be
added to the schema.
public void modify(LDAPConnection ld,
LDAPSchemaElement newValue,
String dn)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP servernewValue - the new valuedn - the entry at which to modify the schema definition
LDAPException - if the specified definition cannot be
modified.
public void modify(LDAPConnection ld,
LDAPSchemaElement newValue)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP servernewValue - the new value
LDAPException - if the specified definition cannot be
modified.
public void remove(LDAPConnection ld,
String dn)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP serverdn - the entry at which to remove the schema definition
LDAPException - if the specified definition cannot be
removed from the schema.
public void remove(LDAPConnection ld)
throws LDAPException
ld - the LDAPConnection object representing
a connection to an LDAP server
LDAPException - if the specified definition cannot be
removed from the schemapublic boolean isObsolete()
true if the element is defined as obsolete.public String getValue()
public void setQualifier(String name,
String value)
name - name of qualifiervalue - value of qualifier. "" for no value, null
to remove the qualifier
public void setQualifier(String name,
String[] values)
name - name of qualifiervalues - array of valuespublic String[] getQualifier(String name)
name - name of qualifier
null if not
present, a zero-length array if present but with no value.public Enumeration getQualifierNames()
public String[] getAliases()
null if
it does not have any aliases
|
Directory SDK for Java 4.19 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||