本文整理汇总了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;
}