use of com.liferay.ide.server.core.portal.PortalServerBehavior in project liferay-ide by liferay.
the class ServiceCommand method execute.
public ServiceContainer execute() throws Exception {
GogoBundleDeployer bundleDeployer = null;
ServiceContainer result;
if (_server == null) {
return _getServiceFromTargetPlatform();
}
PortalServerBehavior serverBehavior = (PortalServerBehavior) _server.loadAdapter(PortalServerBehavior.class, null);
bundleDeployer = serverBehavior.createBundleDeployer();
if (bundleDeployer == null) {
return _getServiceFromTargetPlatform();
}
if (_serviceName == null) {
String[] services = _getServices(bundleDeployer);
result = new ServiceContainer(Arrays.asList(services));
} else {
String[] serviceBundle = _getServiceBundle(_serviceName, bundleDeployer);
result = new ServiceContainer(serviceBundle[0], serviceBundle[1], serviceBundle[2]);
}
return result;
}
Aggregations