New dn resolver entry resolver.

@param l the ldap settings
@return the entry resolver
506587
public static EntryResolver newSearchEntryResolver(final LdapAuthenticationProperties l) {
        final PooledSearchEntryResolver entryResolver = new PooledSearchEntryResolver();
        entryResolver.setBaseDn(l.getBaseDn());
        entryResolver.setUserFilter(l.getUserFilter());
        entryResolver.setSubtreeSearch(l.isSubtreeSearch());
        entryResolver.setConnectionFactory(LdaptiveAuthenticatorBuilder.newPooledConnectionFactory(l));
        return entryResolver;
    }
1165994
public DnsNameResolver build() {
        if (eventLoop == null) {
            throw new IllegalStateException("eventLoop should be specified to build a DnsNameResolver.");
        }

        if (resolveCache != null && (minTtl != null || maxTtl != null || negativeTtl != null)) {
            throw new IllegalStateException("resolveCache and TTLs are mutually exclusive");
        }

        if (authoritativeDnsServerCache != null && (minTtl != null || maxTtl != null || negativeTtl != null)) {
            throw new IllegalStateException("authoritativeDnsServerCache and TTLs are mutually exclusive");
        }

        DnsCache resolveCache = this.resolveCache != null ? this.resolveCache : newCache();
        DnsCnameCache cnameCache = this.cnameCache != null ? this.cnameCache : newCnameCache();
        AuthoritativeDnsServerCache authoritativeDnsServerCache = this.authoritativeDnsServerCache != null ?
                this.authoritativeDnsServerCache : newAuthoritativeDnsServerCache();
        return new DnsNameResolver(
                eventLoop,
                channelFactory,
                resolveCache,
                cnameCache,
                authoritativeDnsServerCache,
                dnsQueryLifecycleObserverFactory,
                queryTimeoutMillis,
                resolvedAddressTypes,
                recursionDesired,
                maxQueriesPerResolve,
                traceEnabled,
                maxPayloadSize,
                optResourceEnabled,
                hostsFileEntriesResolver,
                dnsServerAddressStreamProvider,
                searchDomains,
                ndots,
                decodeIdn);
    }
1206827
public static synchronized LuceneIndexer getInstance(String lucDirPath)
    {
        // super(analyzer);
        if (indexer == null && lucDirPath != null)
        {
            indexer = new LuceneIndexer(lucDirPath);

        }
        return indexer;
    }
990488
public static SocketAddress resolve(RedisURI redisURI, DnsResolver dnsResolver) {

        if (redisURI.getSocket() != null) {
            return redisURI.getResolvedAddress();
        }

        try {
            InetAddress[] inetAddress = dnsResolver.resolve(redisURI.getHost());

            if (inetAddress.length == 0) {
                return InetSocketAddress.createUnresolved(redisURI.getHost(), redisURI.getPort());
            }

            return new InetSocketAddress(inetAddress[0], redisURI.getPort());
        } catch (UnknownHostException e) {
            return redisURI.getResolvedAddress();
        }
    }
602969
public final DSLMapParser.entry_return entry() throws RecognitionException {
		DSLMapParser.entry_return retval = new DSLMapParser.entry_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token EQUALS7=null;
		Token EOL9=null;
		Token EOF10=null;
		ParserRuleReturnScope scope_section4 =null;
		ParserRuleReturnScope meta_section5 =null;
		ParserRuleReturnScope key_section6 =null;
		ParserRuleReturnScope value_section8 =null;

		Object EQUALS7_tree=null;
		Object EOL9_tree=null;
		Object EOF10_tree=null;
		RewriteRuleTokenStream stream_EQUALS=new RewriteRuleTokenStream(adaptor,"token EQUALS");
		RewriteRuleTokenStream stream_EOL=new RewriteRuleTokenStream(adaptor,"token EOL");
		RewriteRuleTokenStream stream_EOF=new RewriteRuleTokenStream(adaptor,"token EOF");
		RewriteRuleSubtreeStream stream_meta_section=new RewriteRuleSubtreeStream(adaptor,"rule meta_section");
		RewriteRuleSubtreeStream stream_key_section=new RewriteRuleSubtreeStream(adaptor,"rule key_section");
		RewriteRuleSubtreeStream stream_scope_section=new RewriteRuleSubtreeStream(adaptor,"rule scope_section");
		RewriteRuleSubtreeStream stream_value_section=new RewriteRuleSubtreeStream(adaptor,"rule value_section");

		try {
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:8: ( scope_section ( meta_section )? key_section EQUALS ( value_section )? ( EOL | EOF ) -> ^( VT_ENTRY scope_section ( meta_section )? key_section ( value_section )? ) )
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:10: scope_section ( meta_section )? key_section EQUALS ( value_section )? ( EOL | EOF )
			{
			pushFollow(FOLLOW_scope_section_in_entry336);
			scope_section4=scope_section();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_scope_section.add(scope_section4.getTree());
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:24: ( meta_section )?
			int alt3=2;
			int LA3_0 = input.LA(1);
			if ( (LA3_0==LEFT_SQUARE) ) {
				int LA3_1 = input.LA(2);
				if ( (LA3_1==LITERAL) ) {
					int LA3_3 = input.LA(3);
					if ( (LA3_3==RIGHT_SQUARE) ) {
						int LA3_5 = input.LA(4);
						if ( (synpred3_DSLMap()) ) {
							alt3=1;
						}
					}
				}
				else if ( (LA3_1==RIGHT_SQUARE) ) {
					int LA3_4 = input.LA(3);
					if ( (synpred3_DSLMap()) ) {
						alt3=1;
					}
				}
			}
			switch (alt3) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:24: meta_section
					{
					pushFollow(FOLLOW_meta_section_in_entry338);
					meta_section5=meta_section();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_meta_section.add(meta_section5.getTree());
					}
					break;

			}

			pushFollow(FOLLOW_key_section_in_entry341);
			key_section6=key_section();
			state._fsp--;
			if (state.failed) return retval;
			if ( state.backtracking==0 ) stream_key_section.add(key_section6.getTree());
			EQUALS7=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_entry343); if (state.failed) return retval; 
			if ( state.backtracking==0 ) stream_EQUALS.add(EQUALS7);

			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:57: ( value_section )?
			int alt4=2;
			int LA4_0 = input.LA(1);
			if ( ((LA4_0 >= COLON && LA4_0 <= DOT)||LA4_0==EQUALS||(LA4_0 >= LEFT_CURLY && LA4_0 <= LITERAL)||LA4_0==RIGHT_SQUARE) ) {
				alt4=1;
			}
			switch (alt4) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:57: value_section
					{
					pushFollow(FOLLOW_value_section_in_entry345);
					value_section8=value_section();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) stream_value_section.add(value_section8.getTree());
					}
					break;

			}

			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:72: ( EOL | EOF )
			int alt5=2;
			int LA5_0 = input.LA(1);
			if ( (LA5_0==EOL) ) {
				alt5=1;
			}
			else if ( (LA5_0==EOF) ) {
				alt5=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return retval;}
				NoViableAltException nvae =
					new NoViableAltException("", 5, 0, input);
				throw nvae;
			}

			switch (alt5) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:73: EOL
					{
					EOL9=(Token)match(input,EOL,FOLLOW_EOL_in_entry349); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_EOL.add(EOL9);

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:119:77: EOF
					{
					EOF10=(Token)match(input,EOF,FOLLOW_EOF_in_entry351); if (state.failed) return retval; 
					if ( state.backtracking==0 ) stream_EOF.add(EOF10);

					}
					break;

			}

			// AST REWRITE
			// elements: meta_section, scope_section, key_section, value_section
			// token labels: 
			// rule labels: retval
			// token list labels: 
			// rule list labels: 
			// wildcard labels: 
			if ( state.backtracking==0 ) {
			retval.tree = root_0;
			RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,"rule retval",retval!=null?retval.getTree():null);

			root_0 = (Object)adaptor.nil();
			// 120:5: -> ^( VT_ENTRY scope_section ( meta_section )? key_section ( value_section )? )
			{
				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:120:8: ^( VT_ENTRY scope_section ( meta_section )? key_section ( value_section )? )
				{
				Object root_1 = (Object)adaptor.nil();
				root_1 = (Object)adaptor.becomeRoot((Object)adaptor.create(VT_ENTRY, "VT_ENTRY"), root_1);
				adaptor.addChild(root_1, stream_scope_section.nextTree());
				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:120:33: ( meta_section )?
				if ( stream_meta_section.hasNext() ) {
					adaptor.addChild(root_1, stream_meta_section.nextTree());
				}
				stream_meta_section.reset();

				adaptor.addChild(root_1, stream_key_section.nextTree());
				// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:120:59: ( value_section )?
				if ( stream_value_section.hasNext() ) {
					adaptor.addChild(root_1, stream_value_section.nextTree());
				}
				stream_value_section.reset();

				adaptor.addChild(root_0, root_1);
				}

			}


			retval.tree = root_0;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}
		catch ( RecognitionException e ) {

			        reportError( e );
			    
		}
		catch ( RewriteEmptyStreamException e ) {

			    
		}

		finally {
			// do for sure before leaving
		}
		return retval;
	}
153436
public LdapNameBuilder add(String name) {
        Assert.notNull(name, "name must not be null");

        return add(LdapUtils.newLdapName(name));
    }
851747
public static Entry organizationalUnit(Dn dn) {
        Entry entry = new DefaultEntry(dn);
        try {
            entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.ORGANIZATIONAL_UNIT_OC);
            entry.add(SchemaConstants.OU_ATTRIBUTE, dn.getRdn().getName());
        } catch (LdapException e) {
            throw new LdapRuntimeException(e);
        }
        return entry;
    }
563698
@Bean
  public ViewResolver viewResolver() {
    FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
    resolver.setCache(true);
    resolver.setSuffix(".ftl");
    resolver.setContentType("text/html;charset=UTF-8");
    return resolver;
  }
1082743
public BoltServerAddress resolve() throws UnknownHostException
    {
        String ipAddress = InetAddress.getByName( host ).getHostAddress();
        if ( ipAddress.equals( host ) )
        {
            return this;
        }
        else
        {
            return new BoltServerAddress( host, ipAddress, port );
        }
    }
140275
def lookup_dn(cn)
      service.search(base: tree, filter: Net::LDAP::Filter.equals('cn', cn), attributes: 'dn').first&.dn
    end
339177
@RequestMapping(value = "ldap-mapping/create", method = RequestMethod.POST)
    public LDAPMapping newMapping(@RequestBody AccountGroupMappingInput input) {
        securityService.checkGlobalFunction(AccountGroupManagement.class);
        return LDAPMapping.of(accountGroupMappingService.newMapping(LDAPExtensionFeature.LDAP_GROUP_MAPPING, input));
    }
385021
private InjectingEntityResolver createEntityResolver(EntityResolver resolver) {
		if (getEntities() != null) {
			return new InjectingEntityResolver(getEntities(), resolver, getType(), getLog());
		} else {
			return null;
		}
	}
575339
@Override
    public LookupManager getLookupManager(){
        if(lookupManager == null){
            synchronized(this){
                if(lookupManager == null){
                    LookupManagerImpl lookup = new LookupManagerImpl(getDirectoryServiceClientManager());
                    lookup.start();
                    lookupManager = lookup;
                }
            }
        }
        return lookupManager;
    }
988608
public final String logOnServer(LogRecord lr) {
		String strongName = getPermutationStrongName();
		/*RemoteLoggingServiceUtil.logOnServer(
				lr, strongName, deobfuscator, loggerNameOverride);*/

		logger.error(lr.getMessage());

		return null;
	}
425294
public function onResolveEntryIdHandler(ResolveEntryIdEventInterface $event)
    {
        $this->getLog()->info('Getting the value "entryId" to run the Workflow based on the router settings');

        $mvcEvent = $event->getWorkflowDispatchEvent()->getMvcEvent();
        $controller = $mvcEvent->getTarget();
        if (!$controller instanceof AbstractController) {
            $this->getLog()->notice(
                'Unable to get the value of "entryId" to start the workflow. No controller object in the property "target" MvcEvent.'
            );
            return null;
        }

        $routeMatch = $mvcEvent->getRouteMatch();
        if (!$routeMatch) {
            return null;
        }

        $action = $routeMatch->getParam('action', 'not-found');
        $actionMethod = AbstractController::getMethodFromAction($action);

        if (!method_exists($controller, $actionMethod)) {
            $this->getLog()->notice(
                'Unable to get the value of "entryId" to start the workflow. Do not set RouteMatch'
            );
            return null;
        }

        $controllerClassName = get_class($controller);
        $metadata = $this->getMetadataReader()->loadMetadataForAction($controllerClassName, $actionMethod);

        if (!$metadata instanceof MetadataInterface) {
            $errMsg = sprintf('Metadata not implement %s', MetadataInterface::class);
            throw new Exception\InvalidMetadataException($errMsg);
        }

        $entryIdParam = $metadata->getEntryIdRouterParam();
        $entryId = $routeMatch->getParam($entryIdParam, null);

        $this->getLog()->info(
            'Meaning "entryId" to run the Workflow based on the router settings',
            [
                'entryId' => $entryId
            ]
        );

        return $entryId;
    }
931249
public AddressResolver<InetSocketAddress> asAddressResolver() {
        AddressResolver<InetSocketAddress> result = addressResolver;
        if (result == null) {
            synchronized (this) {
                result = addressResolver;
                if (result == null) {
                    addressResolver = result = new InetSocketAddressResolver(executor(), this);
                }
            }
        }
        return result;
    }
460420
public PropertyResolver createPropertyResolver(ResolverWrapper resolverAnnotation) {
		PropertyResolver resolver = null;
		
		// use the impl class to get the property resolver
		Class<? extends PropertyResolver> propertyResolverClass = resolverAnnotation.impl();
		if(propertyResolverClass == null) {
			this.logger.debug("No alternate property resolver provided, using default");
			propertyResolverClass = DefaultPropertyResolver.class;
		} else {
			this.logger.debug("Requesting alternate property resolver: {}", propertyResolverClass.getName());
		}
		resolver = this.beanResolver.resolveBeanWithDefaultClass(propertyResolverClass, DefaultPropertyResolver.class);
		
		return resolver;
	}