use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.IControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class OpenShiftSubsystemTest method testOpenshift3Standard.
private void testOpenshift3Standard(IServer s1) throws CoreException {
IControllableServerBehavior beh = (IControllableServerBehavior) s1.loadAdapter(IControllableServerBehavior.class, new NullProgressMonitor());
String[] systems = new String[] { IControllableServerBehavior.SYSTEM_LAUNCH, IControllableServerBehavior.SYSTEM_MODULES, IControllableServerBehavior.SYSTEM_PUBLISH, IControllableServerBehavior.SYSTEM_SHUTDOWN, IFilesystemController.SYSTEM_ID, IDeploymentOptionsController.SYSTEM_ID, IModuleDeployPathController.SYSTEM_ID };
String[] expected = new String[] { "org.jboss.tools.openshift.core.server.behavior.OpenShiftLaunchController", "org.jboss.tools.as.core.server.controllable.subsystems.internal.NoOpModuleController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftShutdownController", "org.jboss.ide.eclipse.as.wtp.core.server.behavior.LocalFilesystemController", "org.jboss.tools.openshift.core.server.behavior.OpenShiftDeploymentOptionsController", "org.jboss.tools.as.core.server.controllable.subsystems.internal.ModuleDeployPathController" };
for (int i = 0; i < systems.length; i++) {
ISubsystemController c = beh.getController(systems[i]);
assertEquals(expected[i], c.getClass().getName());
}
}
use of org.jboss.ide.eclipse.as.wtp.core.server.behavior.IControllableServerBehavior in project jbosstools-openshift by jbosstools.
the class ServiceManagerEnvironmentLoader method getOrLoadServiceManagerEnvironment.
public ServiceManagerEnvironment getOrLoadServiceManagerEnvironment(IServer server, boolean save, int maxTries, boolean suppressErrors) {
IControllableServerBehavior behavior = JBossServerBehaviorUtils.getControllableBehavior(server);
Object o = behavior.getSharedData(SHARED_INFO_KEY);
ServiceManagerEnvironment ret = null;
if (!(o instanceof ServiceManagerEnvironment)) {
ret = loadServiceManagerEnvironment(server, maxTries, suppressErrors);
} else {
ret = (ServiceManagerEnvironment) o;
}
if (save) {
behavior.putSharedData(SHARED_INFO_KEY, ret);
}
return ret;
}
Aggregations