当前位置: 首页>>代码示例>>Java>>正文


Java SearchScope.OBJECT属性代码示例

本文整理汇总了Java中org.apache.directory.api.ldap.model.message.SearchScope.OBJECT属性的典型用法代码示例。如果您正苦于以下问题:Java SearchScope.OBJECT属性的具体用法?Java SearchScope.OBJECT怎么用?Java SearchScope.OBJECT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.directory.api.ldap.model.message.SearchScope的用法示例。


在下文中一共展示了SearchScope.OBJECT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: LdapUrl

/**
 * Construct an empty LdapUrl
 */
public LdapUrl()
{
    scheme = LDAP_SCHEME;
    host = null;
    port = -1;
    dn = null;
    attributes = new ArrayList<>();
    scope = SearchScope.OBJECT;
    filter = null;
    extensionList = new ArrayList<>( 2 );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:14,代码来源:LdapUrl.java

示例2: setScope

/**
 * Sets the scope. Must be one of {@link SearchScope#OBJECT},
 * {@link SearchScope#ONELEVEL} or {@link SearchScope#SUBTREE},
 * otherwise {@link SearchScope#OBJECT} is assumed as default.
 *
 * @param scope the new scope
 */
public void setScope( int scope )
{
    try
    {
        this.scope = SearchScope.getSearchScope( scope );
    }
    catch ( IllegalArgumentException iae )
    {
        this.scope = SearchScope.OBJECT;
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:18,代码来源:LdapUrl.java

示例3: parseScope

/**
 * Parse the scope part.
 *
 * @param chars The char array to be checked
 * @param pos the starting position
 * @return -1 if the char array does not contains a scope
 */
private int parseScope( char[] chars, int pos )
{

    if ( Chars.isCharASCII( chars, pos, 'b' ) || Chars.isCharASCII( chars, pos, 'B' ) )
    {
        pos++;

        if ( Chars.isCharASCII( chars, pos, 'a' ) || Chars.isCharASCII( chars, pos, 'A' ) )
        {
            pos++;

            if ( Chars.isCharASCII( chars, pos, 's' ) || Chars.isCharASCII( chars, pos, 'S' ) )
            {
                pos++;

                if ( Chars.isCharASCII( chars, pos, 'e' ) || Chars.isCharASCII( chars, pos, 'E' ) )
                {
                    pos++;
                    scope = SearchScope.OBJECT;
                    return pos;
                }
            }
        }
    }
    else if ( Chars.isCharASCII( chars, pos, 'o' ) || Chars.isCharASCII( chars, pos, 'O' ) )
    {
        pos++;

        if ( Chars.isCharASCII( chars, pos, 'n' ) || Chars.isCharASCII( chars, pos, 'N' ) )
        {
            pos++;

            if ( Chars.isCharASCII( chars, pos, 'e' ) || Chars.isCharASCII( chars, pos, 'E' ) )
            {
                pos++;

                scope = SearchScope.ONELEVEL;
                return pos;
            }
        }
    }
    else if ( Chars.isCharASCII( chars, pos, 's' ) || Chars.isCharASCII( chars, pos, 'S' ) )
    {
        pos++;

        if ( Chars.isCharASCII( chars, pos, 'u' ) || Chars.isCharASCII( chars, pos, 'U' ) )
        {
            pos++;

            if ( Chars.isCharASCII( chars, pos, 'b' ) || Chars.isCharASCII( chars, pos, 'B' ) )
            {
                pos++;

                scope = SearchScope.SUBTREE;
                return pos;
            }
        }
    }
    else if ( Chars.isCharASCII( chars, pos, '?' ) )
    {
        // An empty scope. This is valid
        return pos;
    }
    else if ( pos == chars.length )
    {
        // An empty scope at the end of the URL. This is valid
        return pos;
    }

    // The scope is not one of "one", "sub" or "base". It's an error
    return -1;
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:79,代码来源:LdapUrl.java

示例4: StoredProcedureSearchContextOption

/**
 * Instantiates a new stored procedure search context option.
 *
 * @param baseObject the base object
 */
public StoredProcedureSearchContextOption( Dn baseObject )
{
    // the default search scope is "base"
    this( baseObject, SearchScope.OBJECT );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:10,代码来源:StoredProcedureSearchContextOption.java


注:本文中的org.apache.directory.api.ldap.model.message.SearchScope.OBJECT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。