Tabnine Logo
SearchScope.getSearchScope
Code IndexAdd Tabnine to your IDE (free)

How to use
getSearchScope
method
in
org.apache.directory.api.ldap.model.message.SearchScope

Best Java code snippets using org.apache.directory.api.ldap.model.message.SearchScope.getSearchScope (Showing top 14 results out of 315)

origin: org.apache.directory.api/api-ldap-model

/**
 * 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;
  }
}
origin: org.apache.directory.api/api-all

/**
 * 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;
  }
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * 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;
  }
}
origin: org.apache.directory.api/api-all

searchRequest.setScope( SearchScope.getSearchScope( scope ) );
origin: org.apache.directory.api/api-ldap-codec-core

searchRequest.setScope( SearchScope.getSearchScope( scope ) );
origin: org.apache.directory.api/api-ldap-client-all

searchRequest.setScope( SearchScope.getSearchScope( scope ) );
origin: org.apache.directory.server/apacheds-core-api

/**
 * Creates a new instance of SearchOperationContext.
 * 
 * @param session The session to use
 * @param dn the dn of the search base
 * @param filter the filter AST to use for the search
 * @param searchControls the search controls
 */
public SearchOperationContext( CoreSession session, Dn dn, ExprNode filter, SearchControls searchControls )
{
  super( session, dn, searchControls.getReturningAttributes() );
  this.filter = filter;
  scope = SearchScope.getSearchScope( searchControls.getSearchScope() );
  timeLimit = searchControls.getTimeLimit();
  sizeLimit = searchControls.getCountLimit();
  typesOnly = searchControls.getReturningObjFlag();
  if ( session != null )
  {
    setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.SEARCH ) );
  }
}
origin: org.apache.directory.server/apacheds-core-jndi

public void addNamingListener( Name name, int scope, NamingListener namingListener ) throws NamingException
{
  ExprNode filter = new PresenceNode( objectClassAT );
  try
  {
    DirectoryListener listener = new EventListenerAdapter( ( ServerLdapContext ) this, namingListener );
    NotificationCriteria criteria = new NotificationCriteria( schemaManager );
    criteria.setFilter( filter );
    criteria.setScope( SearchScope.getSearchScope( scope ) );
    criteria.setAliasDerefMode( AliasDerefMode.getEnum( env ) );
    criteria.setBase( buildTarget( JndiUtils.fromName( name ) ) );
    service.getEventService().addListener( listener, criteria );
    listeners.put( namingListener, listener );
  }
  catch ( Exception e )
  {
    JndiUtils.wrap( e );
  }
}
origin: org.apache.directory.server/apacheds-core-jndi

public void addNamingListener( Name name, String filterStr, SearchControls searchControls,
  NamingListener namingListener ) throws NamingException
{
  ExprNode filter;
  try
  {
    filter = FilterParser.parse( schemaManager, filterStr );
  }
  catch ( Exception e )
  {
    NamingException e2 = new NamingException( I18n.err( I18n.ERR_501, filterStr ) );
    e2.setRootCause( e );
    throw e2;
  }
  try
  {
    DirectoryListener listener = new EventListenerAdapter( ( ServerLdapContext ) this, namingListener );
    NotificationCriteria criteria = new NotificationCriteria( schemaManager );
    criteria.setFilter( filter );
    criteria.setScope( SearchScope.getSearchScope( searchControls.getSearchScope() ) );
    criteria.setAliasDerefMode( AliasDerefMode.getEnum( getEnvironment() ) );
    criteria.setBase( buildTarget( JndiUtils.fromName( name ) ) );
    getDirectoryService().getEventService().addListener( listener, criteria );
    getListeners().put( namingListener, listener );
  }
  catch ( Exception e )
  {
    JndiUtils.wrap( e );
  }
}
origin: org.apache.directory.server/apacheds-protocol-ldap

int scopeIntVal = SearchScope.getSearchScope( scope );
searchCriteria.setScope( SearchScope.getSearchScope( scopeIntVal ) );
origin: org.apache.directory.server/apacheds-service-builder

config.setRefreshNPersist( replBean.isReplRefreshNPersist() );
int scope = SearchScope.getSearchScope( replBean.getReplSearchScope() );
config.setSearchScope( SearchScope.getSearchScope( scope ) );
origin: org.apache.directory.api/api-all

/**
 * Creates a {@link SearchParams} from JNDI search controls.
 *
 * @param searchControls the search controls
 * @param aliasDerefMode the alias deref mode
 * @return the search params
 */
public static SearchParams toSearchParams( SearchControls searchControls, AliasDerefMode aliasDerefMode )
{
  SearchParams searchParams = new SearchParams();
  searchParams.setAliasDerefMode( aliasDerefMode );
  searchParams.setTimeLimit( searchControls.getTimeLimit() );
  searchParams.setSizeLimit( searchControls.getCountLimit() );
  searchParams.setScope( SearchScope.getSearchScope( searchControls.getSearchScope() ) );
  searchParams.setTypesOnly( searchControls.getReturningObjFlag() );
  if ( searchControls.getReturningAttributes() != null )
  {
    for ( String returningAttribute : searchControls.getReturningAttributes() )
    {
      searchParams.addReturningAttributes( returningAttribute );
    }
  }
  return searchParams;
}
origin: org.apache.directory.api/api-ldap-model

/**
 * Creates a {@link SearchParams} from JNDI search controls.
 *
 * @param searchControls the search controls
 * @param aliasDerefMode the alias deref mode
 * @return the search params
 */
public static SearchParams toSearchParams( SearchControls searchControls, AliasDerefMode aliasDerefMode )
{
  SearchParams searchParams = new SearchParams();
  searchParams.setAliasDerefMode( aliasDerefMode );
  searchParams.setTimeLimit( searchControls.getTimeLimit() );
  searchParams.setSizeLimit( searchControls.getCountLimit() );
  searchParams.setScope( SearchScope.getSearchScope( searchControls.getSearchScope() ) );
  searchParams.setTypesOnly( searchControls.getReturningObjFlag() );
  if ( searchControls.getReturningAttributes() != null )
  {
    for ( String returningAttribute : searchControls.getReturningAttributes() )
    {
      searchParams.addReturningAttributes( returningAttribute );
    }
  }
  return searchParams;
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Creates a {@link SearchParams} from JNDI search controls.
 *
 * @param searchControls the search controls
 * @param aliasDerefMode the alias deref mode
 * @return the search params
 */
public static SearchParams toSearchParams( SearchControls searchControls, AliasDerefMode aliasDerefMode )
{
  SearchParams searchParams = new SearchParams();
  searchParams.setAliasDerefMode( aliasDerefMode );
  searchParams.setTimeLimit( searchControls.getTimeLimit() );
  searchParams.setSizeLimit( searchControls.getCountLimit() );
  searchParams.setScope( SearchScope.getSearchScope( searchControls.getSearchScope() ) );
  searchParams.setTypesOnly( searchControls.getReturningObjFlag() );
  if ( searchControls.getReturningAttributes() != null )
  {
    for ( String returningAttribute : searchControls.getReturningAttributes() )
    {
      searchParams.addReturningAttributes( returningAttribute );
    }
  }
  return searchParams;
}
org.apache.directory.api.ldap.model.messageSearchScopegetSearchScope

Javadoc

Gets the SearchScope enumerated type for the corresponding scope numeric value.

Popular methods of SearchScope

  • getScope
    Gets the SearchScope associated with a scope String
  • hashCode
  • getLdapUrlValue
    Gets the LDAP URL value for the scope: according to RFC 2255 this is either base, one, or sub.
  • equals
  • valueOf

Popular in Java

  • Finding current android device location
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now