• <small id='qzHYX'></small><noframes id='qzHYX'>

    <legend id='qzHYX'><style id='qzHYX'><dir id='qzHYX'><q id='qzHYX'></q></dir></style></legend>

        <bdo id='qzHYX'></bdo><ul id='qzHYX'></ul>

      1. <i id='qzHYX'><tr id='qzHYX'><dt id='qzHYX'><q id='qzHYX'><span id='qzHYX'><b id='qzHYX'><form id='qzHYX'><ins id='qzHYX'></ins><ul id='qzHYX'></ul><sub id='qzHYX'></sub></form><legend id='qzHYX'></legend><bdo id='qzHYX'><pre id='qzHYX'><center id='qzHYX'></center></pre></bdo></b><th id='qzHYX'></th></span></q></dt></tr></i><div id='qzHYX'><tfoot id='qzHYX'></tfoot><dl id='qzHYX'><fieldset id='qzHYX'></fieldset></dl></div>
      2. <tfoot id='qzHYX'></tfoot>

        如何使用 jndi 显示 ldap 目录的所有对象类描述

        How to show all objectclasses description of ldap directory using jndi(如何使用 jndi 显示 ldap 目录的所有对象类描述)

          <small id='zjSUx'></small><noframes id='zjSUx'>

          <i id='zjSUx'><tr id='zjSUx'><dt id='zjSUx'><q id='zjSUx'><span id='zjSUx'><b id='zjSUx'><form id='zjSUx'><ins id='zjSUx'></ins><ul id='zjSUx'></ul><sub id='zjSUx'></sub></form><legend id='zjSUx'></legend><bdo id='zjSUx'><pre id='zjSUx'><center id='zjSUx'></center></pre></bdo></b><th id='zjSUx'></th></span></q></dt></tr></i><div id='zjSUx'><tfoot id='zjSUx'></tfoot><dl id='zjSUx'><fieldset id='zjSUx'></fieldset></dl></div>
        1. <legend id='zjSUx'><style id='zjSUx'><dir id='zjSUx'><q id='zjSUx'></q></dir></style></legend>
                <tbody id='zjSUx'></tbody>

                <tfoot id='zjSUx'></tfoot>
                  <bdo id='zjSUx'></bdo><ul id='zjSUx'></ul>
                  本文介绍了如何使用 jndi 显示 ldap 目录的所有对象类描述的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想显示 LDAP 目录架构中存在的所有对象类,以帮助用户输入可用的对象类以添加新条目.

                  I want to show all objectclasses present in schema of LDAP Directory to help user to input available objectclasses for adding new entry.

                  DirContext schema = ctx.getSchema("");
                  Attributes answer = schema.getAttributes("ClassDefinition/person");
                  

                  但这仅显示有关人员的信息.

                  but that shows information about person only.

                  推荐答案

                  你要查询subschema subentry 即cn=schema(以下代码已针对 Apache Directory Server 进行了测试)

                  You have to query the subschema subentry i.e cn=schema (the below code has been tested against the Apache Directory Server)

                  DirContext ctx = new InitialLdapContext( env, null );
                  
                  SearchControls searchControls = new SearchControls();
                  searchControls.setSearchScope( SearchControls.OBJECT_SCOPE );
                  searchControls.setReturningAttributes( new String[]
                      { "objectClasses" } );
                  NamingEnumeration<SearchResult> results = ctx.search( "cn=schema", "(ObjectClass=*)", searchControls );
                  
                  SearchResult result = results.next();
                  Attributes entry = result.getAttributes();
                  
                  Attribute objectClasses = entry.get( "objectClasses" );
                  System.out.println( objectClasses );
                  

                  这篇关于如何使用 jndi 显示 ldap 目录的所有对象类描述的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Slf4j LoggerFactory.getLogger and sonarqube(Slf4j LoggerFactory.getLogger 和 sonarqube)
                  Security - Array is stored directly(安全性 - 数组直接存储)
                  SonarQube quot;Class Not Foundquot; during Main AST Scan(SonarQube“找不到类在主 AST 扫描期间)
                  Integrate Spock#39;s test with Sonar(将 Spock 的测试与声纳集成)
                  How do I make Hudson/Jenkins fail if Sonar thresholds are breached?(如果违反声纳阈值,我如何让 Hudson/Jenkins 失败?)
                  automatically add curly brackets to all if/else/for/while etc. in a java code-base(自动将大括号添加到 java 代码库中的所有 if/else/for/while 等)

                  <small id='F4HMZ'></small><noframes id='F4HMZ'>

                    <tfoot id='F4HMZ'></tfoot>

                            <tbody id='F4HMZ'></tbody>

                          <legend id='F4HMZ'><style id='F4HMZ'><dir id='F4HMZ'><q id='F4HMZ'></q></dir></style></legend>
                          <i id='F4HMZ'><tr id='F4HMZ'><dt id='F4HMZ'><q id='F4HMZ'><span id='F4HMZ'><b id='F4HMZ'><form id='F4HMZ'><ins id='F4HMZ'></ins><ul id='F4HMZ'></ul><sub id='F4HMZ'></sub></form><legend id='F4HMZ'></legend><bdo id='F4HMZ'><pre id='F4HMZ'><center id='F4HMZ'></center></pre></bdo></b><th id='F4HMZ'></th></span></q></dt></tr></i><div id='F4HMZ'><tfoot id='F4HMZ'></tfoot><dl id='F4HMZ'><fieldset id='F4HMZ'></fieldset></dl></div>
                          • <bdo id='F4HMZ'></bdo><ul id='F4HMZ'></ul>