當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。