Search in sources :

Example 1 with WebServicesContainer

use of org.glassfish.webservices.WebServicesContainer in project Payara by payara.

the class ListWebServicesCommand method execute.

@Override
public void execute(AdminCommandContext context) {
    ActionReport report = context.getActionReport();
    report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
    WebServicesContainer container = containerProvider.get();
    if (container == null) {
        return;
    }
    WebServicesDeploymentMBean bean = container.getDeploymentBean();
    if (appName != null && moduleName != null && endpointName != null) {
        Map<String, Map<String, Map<String, DeployedEndpointData>>> endpoints = bean.getEndpoint(appName, moduleName, endpointName);
        fillEndpoints(report, endpoints);
    } else if (appName != null && moduleName != null) {
        Map<String, Map<String, Map<String, DeployedEndpointData>>> endpoints = bean.getEndpoints(appName, moduleName);
        fillEndpoints(report, endpoints);
    } else if (appName != null) {
        Map<String, Map<String, Map<String, DeployedEndpointData>>> endpoints = bean.getEndpoints(appName);
        fillEndpoints(report, endpoints);
    } else {
        Map<String, Map<String, Map<String, DeployedEndpointData>>> endpoints = bean.getEndpoints();
        fillEndpoints(report, endpoints);
    }
}
Also used : DeployedEndpointData(org.glassfish.webservices.deployment.DeployedEndpointData) WebServicesContainer(org.glassfish.webservices.WebServicesContainer) ActionReport(org.glassfish.api.ActionReport) WebServicesDeploymentMBean(org.glassfish.webservices.deployment.WebServicesDeploymentMBean) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 ActionReport (org.glassfish.api.ActionReport)1 WebServicesContainer (org.glassfish.webservices.WebServicesContainer)1 DeployedEndpointData (org.glassfish.webservices.deployment.DeployedEndpointData)1 WebServicesDeploymentMBean (org.glassfish.webservices.deployment.WebServicesDeploymentMBean)1