Package org.ldaptive.schema
Class SchemaFactory
- java.lang.Object
-
- org.ldaptive.schema.SchemaFactory
-
-
Field Summary
Fields Modifier and Type Field Description private static StringATTRIBUTE_TYPES_ATTR_NAMEAttribute types attribute name on the subschema entry.private static StringDIT_CONTENT_RULES_ATTR_NAMEDIT content rules attribute name on the subschema entry.private static StringDIT_STRUCTURE_RULES_ATTR_NAMEDIT structure rules attribute name on the subschema entry.private static StringLDAP_SYNTAXES_ATTR_NAMELDAP syntaxes attribute name on the subschema entry.private static StringMATCHING_RULE_USE_ATTR_NAMEMatching rule use attribute name on the subschema entry.private static StringMATCHING_RULES_ATTR_NAMEMatching rules attribute name on the subschema entry.private static StringNAME_FORMS_ATTR_NAMEName forms attribute name on the subschema entry.private static StringOBJECT_CLASS_ATTR_NAMEObject classes attribute name on the subschema entry.private static StringSUBSCHEMA_SUBENTRY_ATTR_NAMEAttribute on the root DSE indicating the location of the subschema entry.
-
Constructor Summary
Constructors Modifier Constructor Description privateSchemaFactory()Default constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SchemacreateSchema(InputStream is)Creates a new schema.static SchemacreateSchema(ConnectionFactory factory)Creates a new schema.static SchemacreateSchema(ConnectionFactory factory, String entryDn)Creates a new schema.static SchemacreateSchema(LdapEntry schemaEntry)Creates a new schema.
-
-
-
Field Detail
-
SUBSCHEMA_SUBENTRY_ATTR_NAME
private static final String SUBSCHEMA_SUBENTRY_ATTR_NAME
Attribute on the root DSE indicating the location of the subschema entry.- See Also:
- Constant Field Values
-
ATTRIBUTE_TYPES_ATTR_NAME
private static final String ATTRIBUTE_TYPES_ATTR_NAME
Attribute types attribute name on the subschema entry.- See Also:
- Constant Field Values
-
DIT_CONTENT_RULES_ATTR_NAME
private static final String DIT_CONTENT_RULES_ATTR_NAME
DIT content rules attribute name on the subschema entry.- See Also:
- Constant Field Values
-
DIT_STRUCTURE_RULES_ATTR_NAME
private static final String DIT_STRUCTURE_RULES_ATTR_NAME
DIT structure rules attribute name on the subschema entry.- See Also:
- Constant Field Values
-
LDAP_SYNTAXES_ATTR_NAME
private static final String LDAP_SYNTAXES_ATTR_NAME
LDAP syntaxes attribute name on the subschema entry.- See Also:
- Constant Field Values
-
MATCHING_RULES_ATTR_NAME
private static final String MATCHING_RULES_ATTR_NAME
Matching rules attribute name on the subschema entry.- See Also:
- Constant Field Values
-
MATCHING_RULE_USE_ATTR_NAME
private static final String MATCHING_RULE_USE_ATTR_NAME
Matching rule use attribute name on the subschema entry.- See Also:
- Constant Field Values
-
NAME_FORMS_ATTR_NAME
private static final String NAME_FORMS_ATTR_NAME
Name forms attribute name on the subschema entry.- See Also:
- Constant Field Values
-
OBJECT_CLASS_ATTR_NAME
private static final String OBJECT_CLASS_ATTR_NAME
Object classes attribute name on the subschema entry.- See Also:
- Constant Field Values
-
-
Method Detail
-
createSchema
public static Schema createSchema(InputStream is) throws IOException
Creates a new schema. The input stream should contain the LDIF for the subschema entry.- Parameters:
is- containing the schema ldif- Returns:
- schema created from the ldif
- Throws:
IOException- if an error occurs reading the input stream
-
createSchema
public static Schema createSchema(ConnectionFactory factory) throws LdapException
Creates a new schema. The subschema subentry is searched for on the root DSE, followed by searching for the subschema entry itself.- Parameters:
factory- to obtain an LDAP connection from- Returns:
- schema created from the connection factory
- Throws:
LdapException- if the search fails
-
createSchema
public static Schema createSchema(ConnectionFactory factory, String entryDn) throws LdapException
Creates a new schema. The entryDn is searched to obtain the schema.- Parameters:
factory- to obtain an LDAP connection fromentryDn- the subschema entry- Returns:
- schema created from the connection factory
- Throws:
LdapException- if the search fails
-
-