Search in sources :

Example 1 with CubridJobAutoFolderLoader

use of com.cubrid.cubridmanager.ui.spi.model.loader.jobauto.CubridJobAutoFolderLoader in project cubrid-manager by CUBRID.

the class CubridDatabaseLoader method addJobAutoFolder.

/**
	 * Add job auto folder
	 * 
	 * @param monitor the IProgressMonitor
	 * @param database the CubridDatabase
	 */
private void addJobAutoFolder(final IProgressMonitor monitor, CubridDatabase database) {
    String jobAutoFolderId = database.getId() + NODE_SEPARATOR + JOB_AUTO_FOLDER_ID;
    ICubridNode jobAutoFolder = database.getChild(jobAutoFolderId);
    if (jobAutoFolder == null) {
        jobAutoFolder = new DefaultSchemaNode(jobAutoFolderId, JOB_AUTO_FOLDER_NAME, "icons/navigator/auto_group.png");
        jobAutoFolder.setType(CubridNodeType.JOB_FOLDER);
        jobAutoFolder.setContainer(true);
        ICubridNodeLoader loader = new CubridJobAutoFolderLoader();
        loader.setLevel(getLevel());
        jobAutoFolder.setLoader(loader);
        database.addChild(jobAutoFolder);
        if (getLevel() == DEFINITE_LEVEL) {
            jobAutoFolder.getChildren(monitor);
        }
    } else {
        if (jobAutoFolder.getLoader() != null && jobAutoFolder.getLoader().isLoaded()) {
            jobAutoFolder.getLoader().setLoaded(false);
            jobAutoFolder.getChildren(monitor);
        }
    }
}
Also used : ICubridNodeLoader(com.cubrid.common.ui.spi.model.ICubridNodeLoader) ICubridNode(com.cubrid.common.ui.spi.model.ICubridNode) DefaultSchemaNode(com.cubrid.common.ui.spi.model.DefaultSchemaNode) CubridJobAutoFolderLoader(com.cubrid.cubridmanager.ui.spi.model.loader.jobauto.CubridJobAutoFolderLoader)

Aggregations

DefaultSchemaNode (com.cubrid.common.ui.spi.model.DefaultSchemaNode)1 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)1 ICubridNodeLoader (com.cubrid.common.ui.spi.model.ICubridNodeLoader)1 CubridJobAutoFolderLoader (com.cubrid.cubridmanager.ui.spi.model.loader.jobauto.CubridJobAutoFolderLoader)1