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

pub.codex.apix.context.RequestMappingContext Maven / Gradle / Ivy

There is a newer version: 5.0.2
Show newest version
package pub.codex.apix.context;

import com.google.common.base.Optional;
import org.springframework.core.MethodParameter;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition;
import pub.codex.apix.build.ApiDescriptionBuilder;

import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Set;

public class RequestMappingContext {


    private RequestHandler handler;

    private final ApiDescriptionBuilder apiDescriptionBuilder;


    public RequestMappingContext(RequestHandler handler) {
        this.handler = handler;
        this.apiDescriptionBuilder = new ApiDescriptionBuilder();
    }


    public String getName() {
        return handler.getName();
    }

    public PatternsRequestCondition getPatternsCondition() {
        return handler.getPatternsCondition();
    }

    public ApiDescriptionBuilder getApiDescriptionBuilder() {
        return apiDescriptionBuilder;
    }

    public Set getMethodsCondition() {
        return handler.supportedMethods();
    }

    public  Optional findAnnotation(Class annotation) {
        return handler.findAnnotation(annotation);
    }

    public List  getParameterAnnotation(Class annotation) {
        return handler.getParameterAnnotation(annotation);
    }
    public List  getParameter() {
        return handler.getParameter();
    }

    public ApiDescriptionBuilder apiDescriptionBuilder() {
        return apiDescriptionBuilder;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy