本文整理汇总了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 );
}
示例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;
}
}
示例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;
}
示例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 );
}