本文整理匯總了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;
}
示例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;
}
示例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");
}
}
示例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.");
}
}
示例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);
}
}
示例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.");
}
}
示例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);
}
}
示例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);
}
}
示例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;
}