当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationException类代码示例

本文整理汇总了Java中org.xdi.exception.ConfigurationException的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationException类的具体用法?Java ConfigurationException怎么用?Java ConfigurationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurationException类属于org.xdi.exception包,在下文中一共展示了ConfigurationException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createFileConfiguration

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
private FileConfiguration createFileConfiguration(String fileName, boolean isMandatory) {
	try {
		FileConfiguration fileConfiguration = new FileConfiguration(fileName);
		if (fileConfiguration.isLoaded()) {
			log.info("########## fileName = " + fileConfiguration.getFileName());
			log.info("########## oxtrust_ConfigurationEntryDN = " + fileConfiguration.getString("oxtrust_ConfigurationEntryDN"));
			return fileConfiguration;
		}
	} catch (Exception ex) {
		if (isMandatory) {
			log.error("Failed to load configuration from {0}", ex, fileName);
			throw new ConfigurationException("Failed to load configuration from " + fileName, ex);
		}
	}

	return null;
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:18,代码来源:OxTrustConfiguration.java

示例2: createFileConfiguration

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
private FileConfiguration createFileConfiguration(String fileName, boolean isMandatory) {
	try {
		FileConfiguration fileConfiguration = new FileConfiguration(fileName);
		if (fileConfiguration.isLoaded()) {
			log.debug("########## fileName = " + fileConfiguration.getFileName());
			log.debug("########## oxtrust_ConfigurationEntryDN = "
					+ fileConfiguration.getString("oxtrust_ConfigurationEntryDN"));
			return fileConfiguration;
		}
	} catch (Exception ex) {
		if (isMandatory) {
			log.error("Failed to load configuration from {}", fileName, ex);
			throw new ConfigurationException("Failed to load configuration from " + fileName, ex);
		}
	}

	return null;
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:19,代码来源:ConfigurationFactory.java

示例3: getStringEncrypter

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
@Produces @ApplicationScoped
public StringEncrypter getStringEncrypter() {
	String encodeSalt = configurationFactory.getCryptoConfigurationSalt();
   	
   	if (StringHelper.isEmpty(encodeSalt)) {
   		throw new ConfigurationException("Encode salt isn't defined");
   	}
   	
   	try {
   		StringEncrypter stringEncrypter = StringEncrypter.instance(encodeSalt);
   		
   		return stringEncrypter;
	} catch (EncryptionException ex) {
   		throw new ConfigurationException("Failed to create StringEncrypter instance");
	}
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:17,代码来源:AppInitializer.java

示例4: create

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
public void create() {
       if (!createFromLdap(true)) {
           log.error("Failed to load configuration from LDAP. Please fix it!!!.");
           throw new ConfigurationException("Failed to load configuration from LDAP.");
       } else {
       	log.info("Configuration loaded successfully.");
       }
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:9,代码来源:OxTrustConfiguration.java

示例5: loadCryptoConfigurationSalt

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
public void loadCryptoConfigurationSalt() {
     try {
         FileConfiguration cryptoConfiguration = createFileConfiguration(saltFilePath, true);

this.cryptoConfigurationSalt = cryptoConfiguration.getString("encodeSalt");
     } catch (Exception ex) {
log.error("Failed to load configuration from {0}", ex, this.saltFilePath);
throw new ConfigurationException("Failed to load configuration from " + this.saltFilePath, ex);
     }
 }
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:11,代码来源:OxTrustConfiguration.java

示例6: create

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
public void create() {
	if (!createFromLdap(true)) {
		log.error("Failed to load configuration from LDAP. Please fix it!!!.");
		throw new ConfigurationException("Failed to load configuration from LDAP.");
	} else {
		log.info("Configuration loaded successfully.");
	}
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:9,代码来源:ConfigurationFactory.java

示例7: loadCryptoConfigurationSalt

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
public void loadCryptoConfigurationSalt() {
	try {
		FileConfiguration cryptoConfiguration = createFileConfiguration(saltFilePath, true);

		this.cryptoConfigurationSalt = cryptoConfiguration.getString("encodeSalt");
	} catch (Exception ex) {
		log.error("Failed to load configuration from {}", this.saltFilePath, ex);
		throw new ConfigurationException("Failed to load configuration from " + this.saltFilePath, ex);
	}
}
 
开发者ID:GluuFederation,项目名称:oxTrust,代码行数:11,代码来源:ConfigurationFactory.java

示例8: loadCryptoConfigurationSalt

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
public void loadCryptoConfigurationSalt() {
	try {
		FileConfiguration cryptoConfiguration = createFileConfiguration(saltFilePath, true);

		this.cryptoConfigurationSalt = cryptoConfiguration.getString("encodeSalt");
	} catch (Exception ex) {
		log.error("Failed to load configuration from {}", saltFilePath, ex);
		throw new ConfigurationException("Failed to load configuration from " + saltFilePath, ex);
	}
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:11,代码来源:ConfigurationFactory.java

示例9: createFileConfiguration

import org.xdi.exception.ConfigurationException; //导入依赖的package包/类
private FileConfiguration createFileConfiguration(String fileName, boolean isMandatory) {
	try {
		FileConfiguration fileConfiguration = new FileConfiguration(fileName);

		return fileConfiguration;
	} catch (Exception ex) {
		if (isMandatory) {
			log.error("Failed to load configuration from {}", fileName, ex);
			throw new ConfigurationException("Failed to load configuration from " + fileName, ex);
		}
	}

	return null;
}
 
开发者ID:GluuFederation,项目名称:oxAuth,代码行数:15,代码来源:ConfigurationFactory.java


注:本文中的org.xdi.exception.ConfigurationException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。