@Autowired public AccessCertificateCtrl( Environment environment, DemoService demoService, IssuerService issuerService, CreateAccessCertificateRequestValidator createAccessCertificateRequestValidator, AccessCertificateService accessCertificateService) { this.environment = requireNonNull(environment); this.demoService = requireNonNull(demoService); this.issuerService = requireNonNull(issuerService); this.createAccessCertificateRequestValidator = requireNonNull(createAccessCertificateRequestValidator); this.accessCertificateService = requireNonNull(accessCertificateService); }
@Autowired public DefaultCalendarService(final EventDao eventDao, final CalendarUserDao userDao, final PasswordEncoder passwordEncoder) { if (eventDao == null) { throw new IllegalArgumentException("eventDao cannot be null"); } if (userDao == null) { throw new IllegalArgumentException("userDao cannot be null"); } if (passwordEncoder == null) { throw new IllegalArgumentException("passwordEncoder cannot be null"); } this.eventDao = eventDao; this.userDao = userDao; this.passwordEncoder = passwordEncoder; }
@Autowired @Bean @ConditionalOnMissingBean(name = "v3ServiceValidateController") public V3ServiceValidateController v3ServiceValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor, @Qualifier("defaultAuthenticationSystemSupport") final AuthenticationSystemSupport authenticationSystemSupport) { final V3ServiceValidateController c = new V3ServiceValidateController(); c.setValidationSpecification(this.cas20WithoutProxyProtocolValidationSpecification); c.setSuccessView(cas3ServiceSuccessView()); c.setFailureView(cas3ServiceFailureView); c.setProxyHandler(proxy20Handler); c.setAuthenticationSystemSupport(authenticationSystemSupport); c.setServicesManager(servicesManager); c.setCentralAuthenticationService(centralAuthenticationService); c.setArgumentExtractor(argumentExtractor); c.setMultifactorTriggerSelectionStrategy(multifactorTriggerSelectionStrategy); c.setAuthenticationContextValidator(authenticationContextValidator); c.setJsonView(cas3ServiceJsonView()); c.setAuthnContextAttribute(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute()); return c; }
@Autowired public DefaultCalendarService(final EventDao eventDao, final CalendarUserDao userDao, final CalendarUserRepository userRepository, final PasswordEncoder passwordEncoder) { if (eventDao == null) { throw new IllegalArgumentException("eventDao cannot be null"); } if (userDao == null) { throw new IllegalArgumentException("userDao cannot be null"); } if (userRepository == null) { throw new IllegalArgumentException("userRepository cannot be null"); } if (passwordEncoder == null) { throw new IllegalArgumentException("passwordEncoder cannot be null"); } this.eventDao = eventDao; this.userDao = userDao; this.passwordEncoder = passwordEncoder; }
@Autowired public JpaCalendarUserDao(final CalendarUserRepository repository, final RoleRepository roleRepository) { if (repository == null) { throw new IllegalArgumentException("repository cannot be null"); } if (roleRepository == null) { throw new IllegalArgumentException("roleRepository cannot be null"); } this.userRepository = repository; this.roleRepository = roleRepository; }
/** * Sets the kerberos conf. * * @param kerberosConf the new kerberos conf */ @Autowired public void setKerberosConf(@Value("${cas.spnego.kerb.conf:}") final String kerberosConf) { if (StringUtils.isNotBlank(kerberosConf)) { logger.debug("kerberosConf is set to :{}", kerberosConf); System.setProperty(SYS_PROP_KERBEROS_CONF, kerberosConf); } }
@Autowired @Bean @ConditionalOnMissingBean(name = "legacyValidateController") public LegacyValidateController legacyValidateController(@Qualifier("argumentExtractor") final ArgumentExtractor argumentExtractor, @Qualifier("defaultAuthenticationSystemSupport") final AuthenticationSystemSupport authenticationSystemSupport) { final LegacyValidateController c = new LegacyValidateController(); c.setValidationSpecification(this.cas10ProtocolValidationSpecification); c.setSuccessView(cas1ServiceSuccessView()); c.setFailureView(cas1ServiceFailureView()); c.setProxyHandler(proxy10Handler); c.setAuthenticationSystemSupport(authenticationSystemSupport); c.setServicesManager(servicesManager); c.setCentralAuthenticationService(centralAuthenticationService); c.setArgumentExtractor(argumentExtractor); c.setMultifactorTriggerSelectionStrategy(multifactorTriggerSelectionStrategy); c.setAuthenticationContextValidator(authenticationContextValidator); c.setJsonView(cas3ServiceJsonView()); c.setAuthnContextAttribute(casProperties.getAuthn().getMfa().getAuthenticationContextAttribute()); return c; }
@Autowired public ViewTransformation( HiveConf replicaHiveConf, HqlTranslator hqlTranslator, Supplier<CloseableMetaStoreClient> replicaMetaStoreClientSupplier) { this.replicaHiveConf = replicaHiveConf; this.hqlTranslator = hqlTranslator; this.replicaMetaStoreClientSupplier = replicaMetaStoreClientSupplier; }
@Autowired public JdbcCalendarUserDao(JdbcOperations jdbcOperations) { if (jdbcOperations == null) { throw new IllegalArgumentException("jdbcOperations cannot be null"); } this.jdbcOperations = jdbcOperations; }
@Autowired public ProfCalendarController(WeekCalendarService weekCalendarService, ProfessorService professorService, ProfChoperAuthFacade authFacade, BookingSlotService bookingSlotService) { this.weekCalendarService = weekCalendarService; this.professorService = professorService; this.bookingSlotService = bookingSlotService; this.authFacade = authFacade; }
@Autowired public OrganizationController( @Qualifier(MySqlSource1Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource1, @Qualifier(MySqlSource2Config.RepositoryBeanName) OrganizationRepository organizationRepositoryFromSource2) { this.organizationRepositoryFromSource1 = organizationRepositoryFromSource1; this.organizationRepositoryFromSource2 = organizationRepositoryFromSource2; }
/** * @param jcifsNetbiosWins the jcifsNetbiosWins to set */ @Autowired public void setJcifsNetbiosWins(@Value("${cas.spnego.jcifs.netbios.wins:}") final String jcifsNetbiosWins) { if (StringUtils.isNotBlank(jcifsNetbiosWins)) { logger.debug("jcifsNetbiosWins is set to {}", jcifsNetbiosWins); Config.setProperty(JCIFS_PROP_NETBIOS_WINS, jcifsNetbiosWins); } }
@Bean @Autowired public TarantoolClient tarantoolClient( SocketChannelProvider socketChannelProvider ) { final TarantoolClientConfig config = new TarantoolClientConfig(); config.username = "test"; config.password = "test"; config.initTimeoutMillis = 5000; config.writeTimeoutMillis = 5000; return new TarantoolClientImpl(socketChannelProvider, config); }
@Autowired public ScheduledFileReader(PathValidator pathValidator, EntriesXmlParser xmlParser, DocumentService service) { this.pathValidator = pathValidator; this.xmlParser = xmlParser; this.service = service; }
@Autowired public void setEthereumListener(CompositeEthereumListener listener) { if (!flushAfterSyncDone) return; listener.addListener(new EthereumListenerAdapter() { @Override public void onSyncDone(SyncState state) { if (state == SyncState.COMPLETE) { logger.info("DbFlushManager: long sync done, flushing each block now"); syncDone = true; } } }); }
@Autowired(required = false) public void setConfigurers(List<WampConfigurer> configurers) { if (!CollectionUtils.isEmpty(configurers)) { this.configurers.addAll(configurers); configureFeatures(this.features); for (WampConfigurer wc : this.configurers) { wc.configureFeatures(this.features); } } }
@Autowired public DefaultCalendarService(final EventDao eventDao, final CalendarUserDao userDao, final CalendarUserRepository userRepository // final PasswordEncoder passwordEncoder ) { if (eventDao == null) { throw new IllegalArgumentException("eventDao cannot be null"); } if (userDao == null) { throw new IllegalArgumentException("userDao cannot be null"); } if (userRepository == null) { throw new IllegalArgumentException("userRepository cannot be null"); } // if (passwordEncoder == null) { // throw new IllegalArgumentException("passwordEncoder cannot be null"); // } this.eventDao = eventDao; this.userDao = userDao; // this.passwordEncoder = passwordEncoder; }
@Autowired(required = false) @Override public void setPasswordEncoder(@Qualifier("stormpathPasswordEncoder") final PasswordEncoder passwordEncoder) { if (passwordEncoder != null) { super.setPasswordEncoder(passwordEncoder); } }
@Autowired WechatHttpServiceInternal(RestTemplate restTemplate, @Value("${wechat.ua}") String BROWSER_DEFAULT_USER_AGENT) { this.restTemplate = restTemplate; this.postHeader = new HttpHeaders(); postHeader.set(HttpHeaders.USER_AGENT, BROWSER_DEFAULT_USER_AGENT); postHeader.set(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString()); postHeader.setAccept(Arrays.asList(MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.ALL)); postHeader.set(HttpHeaders.ACCEPT_LANGUAGE, BROWSER_DEFAULT_ACCEPT_LANGUAGE); postHeader.set(HttpHeaders.ACCEPT_ENCODING, BROWSER_DEFAULT_ACCEPT_ENCODING); this.getHeader = new HttpHeaders(); getHeader.set(HttpHeaders.USER_AGENT, BROWSER_DEFAULT_USER_AGENT); getHeader.set(HttpHeaders.ACCEPT_LANGUAGE, BROWSER_DEFAULT_ACCEPT_LANGUAGE); getHeader.set(HttpHeaders.ACCEPT_ENCODING, BROWSER_DEFAULT_ACCEPT_ENCODING); }
@Autowired public SpringSecurityUserContext(CalendarService calendarService,UserDetailsService userDetailsService) { if (calendarService == null) { throw new IllegalArgumentException("calendarService cannot be null"); } if (userDetailsService == null) { throw new IllegalArgumentException("userDetailsService cannot be null"); } this.calendarService = calendarService; this.userDetailsService = userDetailsService; }
@Autowired public CalendarUserAuthenticationProvider(final CalendarService calendarService, final PasswordEncoder passwordEncoder) { if (calendarService == null) { throw new IllegalArgumentException("calendarService cannot be null"); } if (passwordEncoder == null) { throw new IllegalArgumentException("passwordEncoder cannot be null"); } this.calendarService = calendarService; this.passwordEncoder = passwordEncoder; }
@Autowired public ItemResource( final RegistryService registryService, final LinkService linkService, final PermissionsService permissionsService, final AuthorizationService authorizationService, final Authorizer authorizer) { super(authorizer, authorizationService); this.registryService = registryService; this.linkService = linkService; this.permissionsService = permissionsService; }
@Autowired public CalendarUserDetailsService(CalendarUserDao calendarUserDao) { if (calendarUserDao == null) { throw new IllegalArgumentException("calendarUserDao cannot be null"); } this.calendarUserDao = calendarUserDao; }
@Autowired public JpaEventDao(EventRepository repository) { if (repository == null) { throw new IllegalArgumentException("repository cannot be null"); } this.repository = repository; }
/** * Constructor. * * @param moviePersistenceService The movie persistence service to use * @param movieSearchService The movie search service to use * @param authorizationService The authorization service to use * @param movieResourceAssembler Assemble movie resources out of movies * @param movieSearchResultResourceAssembler Assemble movie search resources out of movies */ @Autowired public MovieRestController( final MoviePersistenceService moviePersistenceService, final MovieSearchService movieSearchService, final AuthorizationService authorizationService, final MovieResourceAssembler movieResourceAssembler, final MovieSearchResultResourceAssembler movieSearchResultResourceAssembler ) { this.moviePersistenceService = moviePersistenceService; this.movieSearchService = movieSearchService; this.authorizationService = authorizationService; this.movieResourceAssembler = movieResourceAssembler; this.movieSearchResultResourceAssembler = movieSearchResultResourceAssembler; }
@Autowired public UserContextStub(CalendarUserDao userService) { if (userService == null) { throw new IllegalArgumentException("userService cannot be null"); } this.userService = userService; }
@Autowired public JdbcEventDao(JdbcOperations jdbcOperations) { if (jdbcOperations == null) { throw new IllegalArgumentException("jdbcOperations cannot be null"); } this.jdbcOperations = jdbcOperations; }
@Autowired public EsRestClient(JkesSearchProperties jkesProperties) { SniffOnFailureListener sniffOnFailureListener = new SniffOnFailureListener(); Header[] defaultHeaders = {new BasicHeader("Content-Type", "application/json")}; String[] urls = jkesProperties.getEs().getServers().split("\\s*,"); HttpHost[] hosts = new HttpHost[urls.length]; for (int i = 0; i < urls.length; i++) { hosts[i] = HttpHost.create(urls[i]); } RestClient restClient = RestClient.builder(hosts) .setRequestConfigCallback(requestConfigBuilder -> { return requestConfigBuilder.setConnectTimeout(5000) // default 1s .setSocketTimeout(60000); // defaults to 30 seconds }).setHttpClientConfigCallback(httpClientBuilder -> { return httpClientBuilder.setDefaultIOReactorConfig( IOReactorConfig.custom().setIoThreadCount(2).build()); // because only used for admin, so not necessary to hold many worker threads }) .setMaxRetryTimeoutMillis(60000) // defaults to 30 seconds .setDefaultHeaders(defaultHeaders) .setFailureListener(sniffOnFailureListener) .build(); Sniffer sniffer = Sniffer.builder(restClient).build(); sniffOnFailureListener.setSniffer(sniffer); this.sniffer = sniffer; this.restClient = restClient; }
@Autowired(required = false) public void setHikariDataSource(HikariDataSource hikariDataSource) { this.hikariDataSource = hikariDataSource; }
@Autowired public EndFileController(ScreensManager screensManager, PDFCreator pdfCreator, JSONCreator jsonCreator) { this.screensManager = screensManager; this.pdfCreator = pdfCreator; this.jsonCreator = jsonCreator; }
@Bean @Autowired public RedisTemplate redisTemplate(ShardedJedisPool shardedJedisPool){ return new RedisTemplate(shardedJedisPool); }
@Autowired(required = false) public void setForms(List<ReportForm> forms) { this.forms = forms != null ? forms : emptyList(); }
@Autowired public SettingService(SettingRepository settingRepository, SettingMapper settingMapper, SentryProperties sentryProperties) { this.settingRepository = settingRepository; this.settingMapper = settingMapper; this.sentryProperties = sentryProperties; }
@Autowired public void setMessageSource(MessageSource messageSource) { I18nUtil.messageSource = messageSource; }
@Autowired public AuthApiController(AuthService authService) { this.authService = authService; }
@Autowired(required = false) public void setUserDetails(UserDetails userDetails) { this.userDetails = userDetails; }