public static void loadExampleData( Store<Entry, Long> store, SchemaManager schemaManager ) throws Exception
{
Dn suffixDn = new Dn( schemaManager, "o=Good Times Co." );
// Entry #1
Entry entry = new DefaultEntry( schemaManager, suffixDn );
entry.add( "objectClass", "organization" );
entry.add( "o", "Good Times Co." );
entry.add( "postalCode", "1" );
entry.add( "postOfficeBox", "1" );
injectEntryInStore( store, entry );
// Entry #2
Dn dn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "organizationalUnit" );
entry.add( "ou", "Sales" );
entry.add( "postalCode", "1" );
entry.add( "postOfficeBox", "1" );
injectEntryInStore( store, entry );
// Entry #3
dn = new Dn( schemaManager, "ou=Board of Directors,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "organizationalUnit" );
entry.add( "ou", "Board of Directors" );
entry.add( "postalCode", "1" );
entry.add( "postOfficeBox", "1" );
injectEntryInStore( store, entry );
// Entry #4
dn = new Dn( schemaManager, "ou=Engineering,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "organizationalUnit" );
entry.add( "ou", "Engineering" );
entry.add( "postalCode", "2" );
entry.add( "postOfficeBox", "2" );
injectEntryInStore( store, entry );
// Entry #5
dn = new Dn( schemaManager, "cn=JOhnny WAlkeR,ou=Sales,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "person", "organizationalPerson" );
entry.add( "ou", "Sales" );
entry.add( "cn", "JOhnny WAlkeR" );
entry.add( "sn", "WAlkeR" );
entry.add( "postalCode", "3" );
entry.add( "postOfficeBox", "3" );
injectEntryInStore( store, entry );
// Entry #6
dn = new Dn( schemaManager, "cn=JIM BEAN,ou=Sales,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "person", "organizationalPerson" );
entry.add( "ou", "Sales" );
entry.add( "cn", "JIM BEAN" );
entry.add( "surName", "BEAN" );
entry.add( "postalCode", "4" );
entry.add( "postOfficeBox", "4" );
injectEntryInStore( store, entry );
// Entry #7
dn = new Dn( schemaManager, "ou=Apache,ou=Board of Directors,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "organizationalUnit" );
entry.add( "ou", "Apache" );
entry.add( "postalCode", "5" );
entry.add( "postOfficeBox", "5" );
injectEntryInStore( store, entry );
// Entry #8
dn = new Dn( schemaManager, "cn=Jack Daniels,ou=Engineering,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "person", "organizationalPerson" );
entry.add( "ou", "Engineering" );
entry.add( "cn", "Jack Daniels" );
entry.add( "SN", "Daniels" );
entry.add( "postalCode", "6" );
entry.add( "postOfficeBox", "6" );
injectEntryInStore( store, entry );
// aliases -------------
// Entry #9
dn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "alias", "extensibleObject" );
entry.add( "ou", "Apache" );
entry.add( "commonName", "Jim Bean" );
entry.add( "aliasedObjectName", "cn=Jim Bean,ou=Sales,o=Good Times Co." );
injectEntryInStore( store, entry );
// Entry #10
dn = new Dn( schemaManager, "commonName=Jim Bean,ou=Board of Directors,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "alias", "extensibleObject" );
entry.add( "commonName", "Jim Bean" );
entry.add( "aliasedObjectName", "cn=Jim Bean,ou=Sales,o=Good Times Co." );
injectEntryInStore( store, entry );
// Entry #11
dn = new Dn( schemaManager, "2.5.4.3=Johnny Walker,ou=Engineering,o=Good Times Co." );
entry = new DefaultEntry( schemaManager, dn );
entry.add( "objectClass", "top", "alias", "extensibleObject" );
entry.add( "ou", "Engineering" );
entry.add( "2.5.4.3", "Johnny Walker" );
entry.add( "aliasedObjectName", "cn=Johnny Walker,ou=Sales,o=Good Times Co." );
injectEntryInStore( store, entry );
}