本文整理汇总了Java中org.apache.commons.configuration.ConfigurationException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationException.printStackTrace方法的具体用法?Java ConfigurationException.printStackTrace怎么用?Java ConfigurationException.printStackTrace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.configuration.ConfigurationException
的用法示例。
在下文中一共展示了ConfigurationException.printStackTrace方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInstance
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
/**
* gets instance
* @return {@link AppConfiguration} instance
*/
public static CommonConfiguration getInstance(){
if (_commonConfig == null) {
try{
_commonConfig = new CommonConfiguration();
_commonConfig.reloadConfiguration();
return _commonConfig;
} catch(ConfigurationException e){
LOG.severe("KH: "+e.getMessage());
e.printStackTrace();
return null;
}
} else {
return _commonConfig;
}
}
示例2: addURLToPreviousURLs
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
public void addURLToPreviousURLs(String url) {
boolean isNew = true;
config.setListDelimiter(',');
List<Object> list = config.getList(PREVIOUS_INPUT_DATA_URLS);
List<String> urls = new ArrayList<String>();
for (Object o : list) {
urls.add((String) o);
}
for (String u : urls) {
if (u.equalsIgnoreCase(url)) {
isNew = false;
break;
}
}
if (isNew) {
list.add(url);
config.clearProperty(PREVIOUS_INPUT_DATA_URLS);
config.addProperty(PREVIOUS_INPUT_DATA_URLS, list);
try {
config.save();
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
}
示例3: saveContent
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
@Override
public boolean saveContent() {
try {
project.save();
setDirty(false);
if (getTabPanel() != null) {
getTabPanel().getLabel().setText(name);
}
return true;
} catch (final ConfigurationException e) {
LOG.warning("KH: could not save graph to file: "
+ project.getProjectFile().getAbsolutePath());
e.printStackTrace();
}
return false;
}
示例4: getInstance
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
/**
* gets instance
*
* @return {@link AppConfiguration} instance
*/
public static RemoteRepositoryConfiguration getInstance() {
if (_commonConfig == null) {
try {
_commonConfig = new RemoteRepositoryConfiguration();
_commonConfig.reloadConfiguration();
return _commonConfig;
} catch (final ConfigurationException e) {
LOG.severe("KH: " + e.getMessage());
e.printStackTrace();
return null;
}
} else {
return _commonConfig;
}
}
示例5: setProperty
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
public void setProperty(String key, Object val) {
propertiesConfiguration.setProperty(key, val);
try {
propertiesConfiguration.save();
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
示例6: init
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
public static void init(String configFilePath) {
try {
defultConfigFilePath = configFilePath;
config = new PropertiesConfiguration(defultConfigFilePath);
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
示例7: putProperty
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
public static void putProperty(String key, String value) {
validatePropertySource();
properties.setProperty(key, value);
try {
properties.save();
} catch (ConfigurationException e) {
e.printStackTrace();
}
}
示例8: saveProject
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
/**
* saves project
*/
public void saveProject() {
if (project != null) {
try {
project.save();
} catch (final ConfigurationException e) {
LOG.warning("KH: could not save project");
e.printStackTrace();
}
}
}
示例9: newProject
import org.apache.commons.configuration.ConfigurationException; //导入方法依赖的package包/类
/**
* creates new project
*/
public void newProject() {
final NewProjectDialog npd = new NewProjectDialog();
npd.setVisible(true);
if (npd.getStatus() == NewProjectDialog.APPROVE_OPTION) {
try {
final File projectDir = new File(npd.getProjectDirectory()
+ System.getProperty("file.separator")
+ npd.getProjectName());
project = new KernelHiveProject(projectDir,
npd.getProjectName());
project.initProject();
frame.setTitle(npd.getProjectName() + " - "
+ BUNDLE.getString("MainFrame.this.title"));
final FileTreeModel model = new FileTreeModel(
project.getProjectDirectory());
final FileTree tree = new FileTree(frame, model);
tree.setCellRenderer(new FileCellRenderer(tree
.getCellRenderer()));
frame.setProjectTree(tree);
frame.getProjectScrollPane().setViewportView(
frame.getProjectTree());
final IKernelRepository repository = new KernelRepository(
AppConfiguration.getInstance().getKernelRepositoryURL());
final ListModel repoModel = new RepositoryViewerModel(
repository.getEntries());
frame.setRepositoryList(new RepositoryViewer(repoModel));
frame.getRepositoryScrollPane().setViewportView(
frame.getRepositoryList());
frame.getBtnStart().setEnabled(true);
openWorkflowEditor();
} catch (final ConfigurationException e) {
LOG.warning("KH: cannot create new project");
MessageDialog
.showErrorDialog(
frame,
BUNDLE.getString("MainFrameController.newProject.cannotCreate.title"),
BUNDLE.getString("MainFrameController.newProject.cannotCreate.text"));
e.printStackTrace();
}
}
}