本文整理汇总了Java中liquibase.exception.SetupException类的典型用法代码示例。如果您正苦于以下问题:Java SetupException类的具体用法?Java SetupException怎么用?Java SetupException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SetupException类属于liquibase.exception包,在下文中一共展示了SetupException类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {
DatabaseType databaseType = Configuration.getInstance().getDatabaseType();
switch (databaseType) {
case POSTGRESQL:
searchQuery = POSTGRESQL_SEARCH_QUERY;
constraintNameColumn = POSTGRESQL_CONSTRAINT_NAME_COLUMN_NAME;
break;
case HANA:
searchQuery = HANA_SEARCH_QUERY;
constraintNameColumn = HANA_CONSTRAINT_NAME_COLUMN;
break;
default:
// Normally, one would throw an exception here, but we can't do that because the AuditLogManagerTest will fail.
logger.warn(
MessageFormat.format(Messages.UNKNOWN_DB_TYPE_WILL_NOT_DROP_CONFIGURATION_REGISTRY_UNIQUE_CONSTRAINT, databaseType));
}
}
示例2: init
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void init() throws SetupException {
if (path == null) {
throw new SetupException("<sqlfile> - No path specified");
}
LogFactory.getLogger().debug("SQLFile file:" + path);
boolean loaded = loadFromClasspath(path);
if (!loaded) {
loaded = loadFromFileSystem(path);
}
if (!loaded) {
throw new SetupException("<sqlfile path=" + path + "> - Could not find file");
}
LogFactory.getLogger().debug("SQLFile file contents is:" + getSql());
}
示例3: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {
DatabaseType databaseType = Configuration.getInstance().getDatabaseType();
switch (databaseType) {
case POSTGRESQL:
alterStatements = POSTGRESQL_ALTER_STATEMENTS;
break;
case HANA:
alterStatements = HANA_ALTER_STATEMENTS;
break;
default:
// Normally, one would throw an exception here, but we can't do that because the AuditLogManagerTest will fail.
logger.warn(MessageFormat.format(Messages.UNKNOWN_DB_TYPE_WILL_NOT_ALTER_OPERATION_TABLE_COLUMN_TYPES, databaseType));
}
}
示例4: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setUp() throws SetupException {
// pre-init property dir with config dir; will be overridden with old environment variable
// kenmei.property.dir
propertyDir = CommunoteRuntime.getInstance().getConfigurationManager()
.getStartupProperties().getConfigurationDirectory();
// pre-init property filename prefix; will be overridden with old environment variable
// kenmei.property.file.prefix
propertyFilePrefix = "";
}
示例5: loadFromFileSystem
import liquibase.exception.SetupException; //导入依赖的package包/类
/**
* Tries to load the file from the file system.
*
* @param file The name of the file to search for
* @return True if the file was found, false otherwise.
*/
private boolean loadFromFileSystem(String file) throws SetupException {
if (relativeToChangelogFile != null && relativeToChangelogFile) {
file = getChangeSet().getFilePath().replaceFirst("/[^/]*$", "") + "/" + file;
}
InputStream fis = null;
try {
fis = getResourceAccessor().getResourceAsStream(file);
if (fis == null) {
throw new SetupException("<sqlfile path=" + file + "> -Unable to read file");
}
setSql(StreamUtil.getStreamContents(fis, encoding));
return true;
} catch (FileNotFoundException fnfe) {
return false;
} catch (IOException e) {
throw new SetupException("<sqlfile path=" + file + "> -Unable to read file", e);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ioe) {//NOPMD
// safe to ignore
}
}
}
}
示例6: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {
// TODO Auto-generated method stub
}
示例7: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {
}
示例8: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {
// TODO Auto-generated method stub
}
示例9: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp () throws SetupException
{
}
示例10: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp() throws SetupException {}
示例11: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
@Override
public void setUp () throws SetupException
{
}
示例12: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setUp() throws SetupException {
appProperties = CommunoteRuntime.getInstance().getConfigurationManager()
.getApplicationConfigurationProperties();
}
示例13: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setUp() throws SetupException {
// Do nothing.
}
示例14: setUp
import liquibase.exception.SetupException; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setUp() throws SetupException {
// nothing
}