use of javax.inject.Named in project camel by apache.
the class PropertyEndpointTest method configuration.
@Produces
@ApplicationScoped
@Named("properties")
private static PropertiesComponent configuration() {
Properties properties = new Properties();
properties.put("from", "inbound");
properties.put("to", "mock:outbound");
PropertiesComponent component = new PropertiesComponent();
component.setInitialProperties(properties);
return component;
}
use of javax.inject.Named in project oxAuth by GluuFederation.
the class AppInitializer method getLdapEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_ENTRY_MANAGER_NAME)
public LdapEntryManager getLdapEntryManager() {
LdapEntryManager ldapEntryManager = new LdapEntryManager(new OperationsFacade(this.connectionProvider, this.bindConnectionProvider));
log.info("Created {}: {}", new Object[] { LDAP_ENTRY_MANAGER_NAME, ldapEntryManager.getLdapOperationService() });
return ldapEntryManager;
}
use of javax.inject.Named in project oxAuth by GluuFederation.
the class AppInitializer method createLdapAuthEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_AUTH_ENTRY_MANAGER_NAME)
public List<LdapEntryManager> createLdapAuthEntryManager() {
List<LdapEntryManager> ldapAuthEntryManagers = new ArrayList<LdapEntryManager>();
if (this.ldapAuthConfigs.size() == 0) {
return ldapAuthEntryManagers;
}
for (int i = 0; i < this.ldapAuthConfigs.size(); i++) {
LdapEntryManager ldapAuthEntryManager = new LdapEntryManager(new OperationsFacade(this.authConnectionProviders.get(i), this.authBindConnectionProviders.get(i)));
log.debug("Created {}#{}: {}", new Object[] { LDAP_AUTH_ENTRY_MANAGER_NAME, i, ldapAuthEntryManager });
ldapAuthEntryManagers.add(ldapAuthEntryManager);
}
return ldapAuthEntryManagers;
}
use of javax.inject.Named in project oxTrust by GluuFederation.
the class AppInitializer method createCentralLdapEntryManager.
@Produces
@ApplicationScoped
@Named(LDAP_CENTRAL_ENTRY_MANAGER_NAME)
@CentralLdap
public LdapEntryManager createCentralLdapEntryManager() {
if (!((configurationFactory.getLdapCentralConfiguration() != null) && configurationFactory.getAppConfiguration().isUpdateApplianceStatus())) {
return new LdapEntryManager();
}
FileConfiguration ldapCentralConfig = configurationFactory.getLdapCentralConfiguration();
Properties centralConnectionProperties = (Properties) ldapCentralConfig.getProperties();
EncryptionService securityService = encryptionServiceInstance.get();
Properties decryptedCentralConnectionProperties = securityService.decryptProperties(centralConnectionProperties);
LdapEntryManager centralLdapEntryManager = this.ldapEntryManagerFactory.createEntryManager(decryptedCentralConnectionProperties);
log.info("Created {}: {}", new Object[] { LDAP_CENTRAL_ENTRY_MANAGER_NAME, centralLdapEntryManager.getOperationService() });
return centralLdapEntryManager;
}
use of javax.inject.Named in project oxTrust by GluuFederation.
the class AppInitializer method initUmaMetadataConfiguration.
@Produces
@ApplicationScoped
@Named("umaMetadataConfiguration")
public UmaMetadata initUmaMetadataConfiguration() throws OxIntializationException {
String umaConfigurationEndpoint = getUmaConfigurationEndpoint();
if (StringHelper.isEmpty(umaConfigurationEndpoint)) {
return null;
}
UmaMetadataService metaDataConfigurationService = UmaClientFactory.instance().createMetadataService(umaConfigurationEndpoint);
UmaMetadata metadataConfiguration = metaDataConfigurationService.getMetadata();
if (metadataConfiguration == null) {
throw new OxIntializationException("UMA meta data configuration is invalid!");
}
return metadataConfiguration;
}
Aggregations