All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.webcohesion.enunciate.modules.jaxws.JaxwsApiRegistry Maven / Gradle / Ivy

There is a newer version: 2.18.1
Show newest version
package com.webcohesion.enunciate.modules.jaxws;

import com.webcohesion.enunciate.api.ApiRegistrationContext;
import com.webcohesion.enunciate.api.ApiRegistry;
import com.webcohesion.enunciate.api.InterfaceDescriptionFile;
import com.webcohesion.enunciate.api.datatype.Syntax;
import com.webcohesion.enunciate.api.resources.ResourceApi;
import com.webcohesion.enunciate.api.services.ServiceApi;
import com.webcohesion.enunciate.modules.jaxb.api.impl.SyntaxImpl;
import com.webcohesion.enunciate.modules.jaxws.api.impl.JaxwsServiceApi;

import java.util.Collections;
import java.util.List;
import java.util.Set;

/**
 * @author Ryan Heaton
 */
public class JaxwsApiRegistry implements ApiRegistry {

  private final EnunciateJaxwsContext context;

  public JaxwsApiRegistry(EnunciateJaxwsContext context) {
    this.context = context;
  }

  @Override
  public List getServiceApis(ApiRegistrationContext context) {
    return this.context.getEndpointInterfaces().isEmpty() ? Collections.emptyList() : Collections.singletonList(new JaxwsServiceApi(this.context, context));
  }

  @Override
  public List getResourceApis(ApiRegistrationContext context) {
    return Collections.emptyList();
  }

  @Override
  public Set getSyntaxes(ApiRegistrationContext context) {
    return this.context.getEndpointInterfaces().isEmpty() ? Collections.emptySet() : Collections.singleton(new SyntaxImpl(this.context.getJaxbContext(), context));
  }

  @Override
  public InterfaceDescriptionFile getSwaggerUI(ApiRegistrationContext context) {
    return null;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy