Search in sources :

Example 21 with ServerInfo

use of com.cubrid.cubridmanager.core.common.model.ServerInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportNewDBServerPro.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportParamNodeListAndPortId(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testIsSupportNewDBServerPro() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportParamNodeListAndPortId(serverInfo);
    assertFalse(support);
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.2.1150)");
    support = CompatibleUtil.isSupportParamNodeListAndPortId(serverInfo);
    assertTrue(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 22 with ServerInfo

use of com.cubrid.cubridmanager.core.common.model.ServerInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testGetIndexScanOIDBufferPagesValueType.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#getIndexScanOIDBufferPagesValueType(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testGetIndexScanOIDBufferPagesValueType() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    String value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
    assertEquals("int(v>=1&&v<=16)", value);
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.2.1150)");
    value = CompatibleUtil.getIndexScanOIDBufferPagesValueType(serverInfo);
    assertEquals("float(v>=0.05&&v<=16)", value);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 23 with ServerInfo

use of com.cubrid.cubridmanager.core.common.model.ServerInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportJDBCCancel.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportJDBCCancel(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testIsSupportJDBCCancel() {
    EnvInfo envInfo = new EnvInfo();
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertTrue(support);
    support = CompatibleUtil.isSupportJDBCCancel(null);
    assertTrue(support);
    envInfo.setOsInfo(FileUtil.OsInfoType.LINUX.toString());
    support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertTrue(support);
    envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
    support = CompatibleUtil.isSupportJDBCCancel(serverInfo);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 24 with ServerInfo

use of com.cubrid.cubridmanager.core.common.model.ServerInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportVerbose.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportVerbose(com.cubrid.cubridmanager.core.common.model.ServerInfo)}
	 * .
	 */
public void testIsSupportVerbose() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.2.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportVerbose(serverInfo);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Example 25 with ServerInfo

use of com.cubrid.cubridmanager.core.common.model.ServerInfo in project cubrid-manager by CUBRID.

the class FunctionsSupportedInfoProviderTest method testIsSupportNewHAParam.

/**
	 * Test method for
	 * {@link com.cubrid.common.core.util.CompatibleUtil#isSupportNewHABrokerParam(ServerInfo)}
	 * .
	 */
public void testIsSupportNewHAParam() {
    EnvInfo envInfo = new EnvInfo();
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.3.0.1150)");
    ServerInfo serverInfo = new ServerInfo();
    serverInfo.setConnected(true);
    serverInfo.setEnvInfo(envInfo);
    boolean support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
    assertFalse(support);
    envInfo.setServerVersion("CUBRID 2008 R2.0(8.4.0.1150)");
    envInfo.setOsInfo(FileUtil.OsInfoType.NT.toString());
    support = CompatibleUtil.isSupportNewHABrokerParam(serverInfo);
    assertFalse(support);
    support = CompatibleUtil.isSupportNewHABrokerParam(null);
    assertFalse(support);
}
Also used : ServerInfo(com.cubrid.cubridmanager.core.common.model.ServerInfo) EnvInfo(com.cubrid.cubridmanager.core.common.model.EnvInfo)

Aggregations

ServerInfo (com.cubrid.cubridmanager.core.common.model.ServerInfo)255 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)40 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)40 CubridServer (com.cubrid.common.ui.spi.model.CubridServer)39 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)37 DatabaseInfo (com.cubrid.cubridmanager.core.cubrid.database.model.DatabaseInfo)35 ArrayList (java.util.ArrayList)30 EnvInfo (com.cubrid.cubridmanager.core.common.model.EnvInfo)29 CubridDatabase (com.cubrid.common.ui.spi.model.CubridDatabase)28 TreeViewer (org.eclipse.jface.viewers.TreeViewer)27 CubridNodeChangedEvent (com.cubrid.common.ui.spi.event.CubridNodeChangedEvent)24 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)24 MonitoringTask (com.cubrid.cubridmanager.core.common.task.MonitoringTask)24 ServerUserInfo (com.cubrid.cubridmanager.core.common.model.ServerUserInfo)21 SelectionEvent (org.eclipse.swt.events.SelectionEvent)20 GridData (org.eclipse.swt.layout.GridData)17 GridLayout (org.eclipse.swt.layout.GridLayout)17 DbUserInfo (com.cubrid.cubridmanager.core.cubrid.user.model.DbUserInfo)16 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)16 ITask (com.cubrid.common.core.task.ITask)15