use of com.cubrid.common.ui.spi.model.loader.CubridTriggerFolderLoader in project cubrid-manager by CUBRID.
the class CubridDatabaseLoader method addTriggerFolder.
/**
* Add trigger folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addTriggerFolder(final IProgressMonitor monitor, CubridDatabase database) {
String tiggerFolderId = database.getId() + NODE_SEPARATOR + CubridTriggerFolderLoader.TRIGGER_FOLDER_ID;
ICubridNode tiggerFolder = database.getChild(tiggerFolderId);
//IsDBAUserTask
if (tiggerFolder == null) {
tiggerFolder = new DefaultSchemaNode(tiggerFolderId, TRIGGER_FOLDER_NAME, "icons/navigator/trigger_group.png");
tiggerFolder.setType(NodeType.TRIGGER_FOLDER);
tiggerFolder.setContainer(true);
ICubridNodeLoader loader = new CubridTriggerFolderLoader();
loader.setLevel(getLevel());
tiggerFolder.setLoader(loader);
database.addChild(tiggerFolder);
if (getLevel() == DEFINITE_LEVEL) {
tiggerFolder.getChildren(monitor);
}
} else {
if (tiggerFolder.getLoader() != null && tiggerFolder.getLoader().isLoaded()) {
tiggerFolder.getLoader().setLoaded(false);
tiggerFolder.getChildren(monitor);
}
}
}
use of com.cubrid.common.ui.spi.model.loader.CubridTriggerFolderLoader in project cubrid-manager by CUBRID.
the class CQBDbConnectionLoader method addTriggerFolder.
/**
* Add trigger folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addTriggerFolder(final IProgressMonitor monitor, CubridDatabase database) {
if (!database.getDatabaseInfo().getAuthLoginedDbUserInfo().isDbaAuthority()) {
return;
}
String tiggerFolderId = database.getId() + NODE_SEPARATOR + TRIGGER_FOLDER_ID;
ICubridNode tiggerFolder = database.getChild(tiggerFolderId);
if (tiggerFolder == null) {
tiggerFolder = new DefaultSchemaNode(tiggerFolderId, TRIGGER_FOLDER_NAME, "icons/navigator/trigger_group.png");
tiggerFolder.setType(NodeType.TRIGGER_FOLDER);
tiggerFolder.setContainer(true);
ICubridNodeLoader loader = new CubridTriggerFolderLoader();
loader.setLevel(getLevel());
tiggerFolder.setLoader(loader);
database.addChild(tiggerFolder);
if (getLevel() == DEFINITE_LEVEL) {
tiggerFolder.getChildren(monitor);
}
} else {
if (tiggerFolder.getLoader() != null && tiggerFolder.getLoader().isLoaded()) {
tiggerFolder.getLoader().setLoaded(false);
tiggerFolder.getChildren(monitor);
}
}
}
Aggregations