directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-191) How to get attributes list according to objectClass
Date Tue, 06 May 2014 06:23:18 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990337#comment-13990337
] 

Stefan Seelmann commented on DIRAPI-191:
----------------------------------------

The second approach Emmanuel described can be achieved using the LDAP API, here is just a
quick hint.

{code}
        LdapConnection connection = ...;
        connection.loadSchema();
        SchemaManager schemaManager = connection.getSchemaManager();

        // Lookup up the attributes of the object class
        ObjectClass oc = schemaManager.getObjectClassRegistry().lookup( "inetOrgPerson" );
        System.out.println(oc.getMustAttributeTypeOids());
        System.out.println(oc.getMayAttributeTypeOids());

        // TODO: recursively loop over all superior object classes and lookup their attributes
too...
        List<ObjectClass> superiors = oc.getSuperiors();
{code}


> How to get attributes list according to objectClass
> ---------------------------------------------------
>
>                 Key: DIRAPI-191
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-191
>             Project: Directory Client API
>          Issue Type: Question
>    Affects Versions: 1.0.0-M21
>            Reporter: Robert Hou
>
> I want to get attributes list according to specified objectclass, how to achieve this
purpose using Apahce Directory API? Could anyone share sample code here?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message