public Set<String> getAllowedMethods() { Set<String> methods = new HashSet<>(); for (OperationResourceInfo o : methodDispatcher.getOperationResourceInfos()) { String method = o.getHttpMethod(); if (method != null) { methods.add(method); } } return methods; }
public Set<String> getAllowedMethods() { Set<String> methods = new HashSet<String>(); for (OperationResourceInfo o : methodDispatcher.getOperationResourceInfos()) { String method = o.getHttpMethod(); if (method != null) { methods.add(method); } } return methods; }
MethodDispatcher(MethodDispatcher md, ClassResourceInfo cri) { for (OperationResourceInfo ori : md.getOperationResourceInfos()) { OperationResourceInfo clone = new OperationResourceInfo(ori, cri); oriToMethod.put(clone, clone.getMethodToInvoke()); methodToOri.put(clone.getMethodToInvoke(), clone); } }
private static boolean checkMethodDispatcher(ClassResourceInfo cr) { if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) { LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC", BUNDLE, cr.getServiceClass().getName()).toString()); return false; } return true; }
MethodDispatcher(MethodDispatcher md, ClassResourceInfo cri) { for (OperationResourceInfo ori : md.getOperationResourceInfos()) { OperationResourceInfo clone = new OperationResourceInfo(ori, cri); oriToMethod.put(clone, clone.getMethodToInvoke()); methodToOri.put(clone.getMethodToInvoke(), clone); } }
private static boolean checkMethodDispatcher(ClassResourceInfo cr) { if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) { LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC", BUNDLE, cr.getServiceClass().getName()).toString()); return false; } return true; }
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); cris.forEach(cri -> { cri.getMethodDispatcher().getOperationResourceInfos().forEach(ori -> { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); cris.forEach(cri -> { cri.getMethodDispatcher().getOperationResourceInfos().forEach(ori -> { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
InterfaceInfo inf = new InterfaceInfo(si, qname); si.setInterface(inf); for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { Method m = ori.getMethodToInvoke(); QName oname = new QName(qname.getNamespaceURI(), m.getName());
boolean jaxbOnly, MessageBodyWriter<?> jaxbWriter) { for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) { Method method = ori.getMethodToInvoke(); Class<?> realReturnType = method.getReturnType();
private void doApplyDynamicFeatures(ClassResourceInfo cri) { Set<OperationResourceInfo> oris = cri.getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { for (DynamicFeature feature : dynamicFeatures) { Configurable methodConfigurable = new MethodConfigurable(ori); feature.configure(new ResourceInfoImpl(ori), methodConfigurable); } } Collection<ClassResourceInfo> subs = cri.getSubResources(); for (ClassResourceInfo sub : subs) { if (sub != cri) { doApplyDynamicFeatures(sub); } } }
InterfaceInfo inf = new InterfaceInfo(si, qname); si.setInterface(inf); for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { Method m = ori.getMethodToInvoke(); QName oname = new QName(qname.getNamespaceURI(), m.getName());
Map<Pair<String, String>, OperationResourceInfo> methods = new HashMap<>(); for (ClassResourceInfo cri : cris) { for (OperationResourceInfo ori : cri.getMethodDispatcher().getOperationResourceInfos()) { String normalizedPath = getNormalizedPath( cri.getURITemplate().getValue(), ori.getURITemplate().getValue());
public void initBeanParamInfo(ServerProviderFactory factory) { if (factory != null) { Set<OperationResourceInfo> oris = getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { List<Parameter> params = ori.getParameters(); for (Parameter param : params) { if (param.getType() == ParameterType.BEAN) { Class<?> cls = ori.getMethodToInvoke().getParameterTypes()[param.getIndex()]; BeanParamInfo bpi = new BeanParamInfo(cls, getBus()); factory.addBeanParamInfo(bpi); } } } List<Method> methods = super.getParameterMethods(); for (Method m : methods) { if (m.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(m.getParameterTypes()[0], getBus()); factory.addBeanParamInfo(bpi); } } List<Field> fields = super.getParameterFields(); for (Field f : fields) { if (f.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(f.getType(), getBus()); factory.addBeanParamInfo(bpi); } } } }
private void doApplyDynamicFeatures(ClassResourceInfo cri) { Set<OperationResourceInfo> oris = cri.getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { String nameBinding = DEFAULT_FILTER_NAME_BINDING
public void initBeanParamInfo(ProviderFactory factory) { Set<OperationResourceInfo> oris = getMethodDispatcher().getOperationResourceInfos(); for (OperationResourceInfo ori : oris) { List<Parameter> params = ori.getParameters(); for (Parameter param : params) { if (param.getType() == ParameterType.BEAN) { Class<?> cls = ori.getMethodToInvoke().getParameterTypes()[param.getIndex()]; BeanParamInfo bpi = new BeanParamInfo(cls, getBus()); factory.addBeanParamInfo(bpi); } } } List<Method> methods = super.getParameterMethods(); for (Method m : methods) { if (m.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(m.getParameterTypes()[0], getBus()); factory.addBeanParamInfo(bpi); } } List<Field> fields = super.getParameterFields(); for (Field f : fields) { if (f.getAnnotation(BeanParam.class) != null) { BeanParamInfo bpi = new BeanParamInfo(f.getType(), getBus()); factory.addBeanParamInfo(bpi); } } } }
for (OperationResourceInfo ori : resource.getMethodDispatcher().getOperationResourceInfos()) { Method method = ori.getAnnotatedMethod() == null ? ori.getMethodToInvoke() : ori.getAnnotatedMethod(); Class<?> realReturnType = method.getReturnType();