Search in sources :

Example 1 with PortalServerBehavior

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;
}
Also used : PortalServerBehavior(com.liferay.ide.server.core.portal.PortalServerBehavior) GogoBundleDeployer(com.liferay.ide.server.core.gogo.GogoBundleDeployer)

Aggregations

GogoBundleDeployer (com.liferay.ide.server.core.gogo.GogoBundleDeployer)1 PortalServerBehavior (com.liferay.ide.server.core.portal.PortalServerBehavior)1