directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <akaras...@apache.org>
Subject Re: [Syntax] Does this code look ok for creating a Syntax entry?
Date Tue, 03 Apr 2007 20:23:16 GMT
Sure give it a try :).

Alex


On 4/3/07, Ole Ersoy <ole.ersoy@gmail.com> wrote:
>
> private static final String PEN = "35453";
> private static final String ESTRING_SYNTAX_LOCAL_OID = "1";
> private static final String ESTRING_SYNTAX_GLOBAL_OID = PEN +"." +
> ESTRING_LOCAL_OID;
> private static final String ESTRING_SYNTAX_DESCRIPTION = "Ecore String
> DataType";
> ...
> Attributes ldapAttributes = new AttributesImpl();
> Attribute objectClass = new AttributeImpl(
>        SystemSchemaConstants.OBJECT_CLASS_AT,
>        "top" );
> objectClass.add( MetaSchemaConstants.META_TOP_OC );
> objectClass.add( MetaSchemaConstants.META_SYNTAX_OC );
> ldapAttributes.put( objectClass );
> ldapAttributes.put( MetaSchemaConstants.M_OID_AT,
> ESTRING_SYNTAX_GLOBAL_OID );
> ldapAttributes.put( MetaSchemaConstants.M_DESCRIPTION_AT,
> ESTRING_SYNTAX_DESCRIPTION );
>
> String eStringSyntaxRDN = "MetaSchemaConstants.M_OID_AT + "=" +
> ESTRING_SYNTAX_GLOBAL_OID;
>
> //With the current context being "ou=syntaxes,ou=schema"
> ctx.createSubcontext(eStringSyntaxRDN, ldapAttributes);
>

Mime
View raw message