|
Home > Archive > Apache Directory Project > December 2006 > I'm impressed
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Tino Schwarze 2006-12-28, 7:11 pm |
| Hi there,
thumbs up! I'm very impressed. Apache DS is very well designed - I was
able to establish simple a open-EIS Template -> LDAP Schema mapping today.
After several hours of coding and digging (implementing an AttributeType
and ObjectClass, figuring out what MatchingRules are good for etc.), it
instantly worked! B-)
Thanks a lot! You made my day.
Tino.
--
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de
| |
| Ersin Er 2006-12-28, 7:11 pm |
| Hi Tino,
Thanks for nice comments. Any further ideas on improving our
implementation or code contributions are welcome.
Cheers,
On 12/28/06, Tino Schwarze <tisc-CdamFmlgbXPX2ID+q72mRQ@public.gmane.org> wrote:
> Hi there,
>
> thumbs up! I'm very impressed. Apache DS is very well designed - I was
> able to establish simple a open-EIS Template -> LDAP Schema mapping today.
> After several hours of coding and digging (implementing an AttributeType
> and ObjectClass, figuring out what MatchingRules are good for etc.), it
> instantly worked! B-)
>
> Thanks a lot! You made my day.
>
> Tino.
>
> --
> www.quantenfeuerwerk.de
> www.spiritualdesign-chemnitz.de
> www.lebensraum11.de
>
--
Ersin
| |
| Tino Schwarze 2006-12-29, 7:11 am |
| Hi Johan,
I'm CCing to the list since it might be interesting for other people as well.
On Fri, Dec 29, 2006 at 08:26:11AM +0100, Johan Asterholm wrote:
> Im about to do the same but towards another system. Any chance that you
> could share whats needed in
> order to do this?
I implemented the following:
- EISPartition
(implements org.apache.directory.server.core.partition.Partition)
- EISPartitionConfiguration (implements
org.apache.directory.server.core.partition.PartitionConfiguration,
adds some open-EIS specific options)
- EISObjectClass (implements
org.apache.directory.shared.ldap.schema.ObjectClass)
- EISAttributeType (implements
org.apache.directory.shared.ldap.schema.AttributeType)
- EISSchemaMgr
* provides Template -> ObjectClass mapping (creates EISObjectClasses,
figures out mandatory and optional attributes)
* provides Component -> AttributeType mapping (creates
EISAttributeType)
* provides Template GUID -> OID mapping
* provides Component -> OID mapping (some open-EIS components are
special and will be shared amongst templates)
* caches the above
You may also want to have a look at
org.apache.directory.server.core.schema.bootstrap.SystemSyntaxProducer
and
org.apache.directory.server.core.schema.bootstrap.SystemMatchingRuleProducer
for default syntaxes and matching rules available (@developers: There
are a lot of strings in there which should be collected somewhere
central as constants with readable names - not everybody knows by heart
that 1.3.6.1.4.1.1466.115.121.1.15 is a Directory String -
BOOTSTRAP_SYNTAX_DIRECTORY_STRING would be more readable and could be
reused somewhere else; I've got the same strings in my classes now).
Then I added my partition to the server:
MutableServerStartupConfiguration _serverconfig = new MutableServerStartupConfiguration ();
// ... initialize system partition, add bootstrap schema (I do it by
// hand)
// then setup our EIS partition
EISPartitionConfiguration _eispc = new EISPartitionConfiguration();
_eispc.setName("eis");
_eispc.setSuffix("o=community4you.de");
_objectClassAttr = new BasicAttribute("objectClass", "top");
_objectClassAttr.add("organization");
_objectClassAttr.add("extensibleObject");
_entryAttr = new BasicAttributes ("o", "community4you.de");
_entryAttr.put (_objectClassAttr);
_eispc.setContextEntry(_entryAttr);
// use our special partition
_eispc.setContextPartition(new EISPartition());
// and configure it
_eispc.setRootCategory(new ContentHandle<Category> (CoreCategories.CORE_ADMIN_USERS,
LanguageMgr.getInstance().getDefaultLanguageGUID(), Category.TEMPLATE_GUID));
Set<PartitionConfiguration> _contextPartitions = new LinkedHashSet<PartitionConfiguration>();
_contextPartitions.add (_eispc);
_serverconfig. setContextPartitionConfigurations(_conte
xtPartitions);
// then launch server via JNDI
Hashtable<String, Object> _environment = new Hashtable<String, Object>();
_environment.put ("java.naming.security.authentication", "simple");
_environment.put ("java.naming.security.principal", "uid=admin,ou=system");
_environment.put ("java.naming.security.credentials", "secret");
_environment.put ("java.naming.provider.url", "ou=system");
_environment.put ("java.naming.factory.initial", "org.apache.directory.server.jndi.ServerContextFactory");
_environment.put ("org.apache.directory.server.core.configuration.Configuration", _serverconfig);
// this actually starts up the server
InitialDirContext _idc = new InitialDirContext (_environment);
HTH,
Tino.
--
www.quantenfeuerwerk.de
www.spiritualdesign-chemnitz.de
www.lebensraum11.de
|
|
|
|
|