directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject [Syntax] Does this code look ok for creating a Syntax entry?
Date Tue, 03 Apr 2007 19:10:59 GMT
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