@Override public void addRestSupportFor(String alias, Class<?> cls, String baseURI) { contextMetaBuilder.setRootURI(baseURI).addService(alias, cls); }
public ContextMetaBuilder getContextBuilder() { if (contextBuilder == null) { contextBuilder = ContextMetaBuilder.contextMetaBuilder(); } return contextBuilder; }
public static ServiceMetaBuilder serviceMetaBuilder() { return new ServiceMetaBuilder(); }
public ServiceMethodMeta build() { if (methodAccess != null) { setHasCallBack(detectCallback()); deduceReturnTypes(); return new ServiceMethodMeta(isHasReturn(), getMethodAccess(), getName(), getRequestEndpoints(), getReturnTypeEnum(), getParamTypes(), hasCallback(), getGenericReturnType(), getReturnType(), getReturnTypeComponent(), getReturnTypeComponentKey(), getReturnTypeComponentValue(), getDescription(), getSummary(), getReturnDescription(), getResponseCode(), getContentType()); } else { return new ServiceMethodMeta(getName(), this.getRequestEndpoints(), this.getReturnTypeEnum(), this.getParamTypes()); } }
public ContextMetaBuilder addService(String alias, Class<?> serviceClass) { final ClassMeta<?> classMeta = ClassMeta.classMeta(serviceClass); String name = alias != null ? alias : getServiceName(classMeta); final List<String> requestPaths = getRequestPathsByAnnotated(classMeta, name); if (alias != null) { requestPaths.add(asPath(alias)); } final String description = getDescriptionFromRequestMapping(classMeta); final ServiceMetaBuilder serviceMetaBuilder = ServiceMetaBuilder.serviceMetaBuilder() .setRequestPaths(requestPaths).setName(name).setDescription(description) .setResponseHeaders(getResponseHeaders(classMeta)); serviceMetaBuilder.addMethods(this.getRootURI(), Lists.list(classMeta.methods())); addService(serviceMetaBuilder.build()); return this; }
public ContextMeta build() { return new ContextMeta(getTitle(), getRootURI(), getServices(), getDescription(), getContactName(), getContactURL(), getContactEmail(), getLicenseName(), getLicenseURL(), getVersion(), getHostAddress()); }
@Before public void setUp() throws Exception { contextMetaBuilder = ContextMetaBuilder.contextMetaBuilder(); contextMetaBuilder.setRootURI(contextMetaBuilder.getRootURI() + "Engine"); contextMetaBuilder.addService( SampleService.class); provider = new StandardMetaDataProvider(contextMetaBuilder.build(), RequestMethod.GET); }
public ParameterMeta build() { return new ParameterMeta(getClassType(), getType(), getParam(), getGenericParamType(), getComponentClass(), getComponentClassKey(), getComponentClassValue()); }
/** * Get context meta builder. * * @return context meta builder */ public ContextMetaBuilder getContextMetaBuilder() { if (contextMetaBuilder == null) { contextMetaBuilder = ContextMetaBuilder.contextMetaBuilder(); contextMetaBuilder .setHostAddress(this.getPublicHost() + ":" + this.getPublicPort()) .setRootURI(this.getRootURI()); } return contextMetaBuilder; }
public ServiceMeta build() { return new ServiceMeta(getName(), getRequestPaths(), getMethods(), getDescription()); }
public ContextMetaBuilder addService(final Class<?> serviceClass) { return addService(null, serviceClass); }
public static ServiceMethodMetaBuilder serviceMethodMetaBuilder() { return new ServiceMethodMetaBuilder(); }
public static ContextMetaBuilder contextMetaBuilder() { return new ContextMetaBuilder(); }
public static ParameterMetaBuilder parameterMetaBuilder() { return new ParameterMetaBuilder(); }
public static RequestMetaBuilder requestMetaBuilder() { return new RequestMetaBuilder(); }
public RequestMetaBuilder addParameters(ParameterMeta... parameters) { Collections.addAll(this.getParameters(), parameters); return this; }
public RequestMetaBuilder addResponseHeaders(String name, String value) { getResponseHeaders().add(name, value); return this; }
@RequestMapping(value = "/otherAnnotation", method = RequestMethod.POST) public void otherAnnotation(@Other(name = "bbb") String body) { } }
@Override public void addRestSupportFor(Class cls, String baseURI) { contextMetaBuilder.setRootURI(baseURI).addService(cls); }
@Before public void setUp() throws Exception { contextMetaBuilder = ContextMetaBuilder.contextMetaBuilder(); }