Search in sources :

Example 1 with ApiRegistryProviderModule

use of com.webcohesion.enunciate.module.ApiRegistryProviderModule in project enunciate by stoicflame.

the class AggregatedApiRegistry method getServiceApis.

@Override
public List<ServiceApi> getServiceApis(ApiRegistrationContext context) {
    ArrayList<ServiceApi> serviceApis = new ArrayList<ServiceApi>();
    List<EnunciateModule> modules = enunciate.getModules();
    for (EnunciateModule module : modules) {
        if (module.isEnabled() && module instanceof ApiRegistryProviderModule) {
            serviceApis.addAll(((ApiRegistryProviderModule) module).getApiRegistry().getServiceApis(context));
        }
    }
    return serviceApis;
}
Also used : ApiRegistryProviderModule(com.webcohesion.enunciate.module.ApiRegistryProviderModule) EnunciateModule(com.webcohesion.enunciate.module.EnunciateModule) ServiceApi(com.webcohesion.enunciate.api.services.ServiceApi) ArrayList(java.util.ArrayList)

Example 2 with ApiRegistryProviderModule

use of com.webcohesion.enunciate.module.ApiRegistryProviderModule in project enunciate by stoicflame.

the class AggregatedApiRegistry method getResourceApis.

@Override
public List<ResourceApi> getResourceApis(ApiRegistrationContext context) {
    ArrayList<ResourceApi> resourceApis = new ArrayList<ResourceApi>();
    List<EnunciateModule> modules = enunciate.getModules();
    for (EnunciateModule module : modules) {
        if (module.isEnabled() && module instanceof ApiRegistryProviderModule) {
            resourceApis.addAll(((ApiRegistryProviderModule) module).getApiRegistry().getResourceApis(context));
        }
    }
    return resourceApis;
}
Also used : ApiRegistryProviderModule(com.webcohesion.enunciate.module.ApiRegistryProviderModule) ResourceApi(com.webcohesion.enunciate.api.resources.ResourceApi) EnunciateModule(com.webcohesion.enunciate.module.EnunciateModule) ArrayList(java.util.ArrayList)

Example 3 with ApiRegistryProviderModule

use of com.webcohesion.enunciate.module.ApiRegistryProviderModule in project enunciate by stoicflame.

the class AggregatedApiRegistry method getSyntaxes.

@Override
public Set<Syntax> getSyntaxes(ApiRegistrationContext context) {
    Set<Syntax> syntaxes = new TreeSet<Syntax>();
    List<EnunciateModule> modules = enunciate.getModules();
    for (EnunciateModule module : modules) {
        if (module.isEnabled() && module instanceof ApiRegistryProviderModule) {
            syntaxes.addAll(((ApiRegistryProviderModule) module).getApiRegistry().getSyntaxes(context));
        }
    }
    return syntaxes;
}
Also used : ApiRegistryProviderModule(com.webcohesion.enunciate.module.ApiRegistryProviderModule) EnunciateModule(com.webcohesion.enunciate.module.EnunciateModule) TreeSet(java.util.TreeSet) Syntax(com.webcohesion.enunciate.api.datatype.Syntax)

Aggregations

ApiRegistryProviderModule (com.webcohesion.enunciate.module.ApiRegistryProviderModule)3 EnunciateModule (com.webcohesion.enunciate.module.EnunciateModule)3 ArrayList (java.util.ArrayList)2 Syntax (com.webcohesion.enunciate.api.datatype.Syntax)1 ResourceApi (com.webcohesion.enunciate.api.resources.ResourceApi)1 ServiceApi (com.webcohesion.enunciate.api.services.ServiceApi)1 TreeSet (java.util.TreeSet)1