public ConformanceMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod.getReturnType(), theMethod, theContext, theProvider); // if (Modifier.isAbstract(theMethod.getReturnType().getModifiers())) { // throw new ConfigurationException("Conformance resource provider method '" + theMethod.getName() + "' must not be abstract"); // } MethodReturnTypeEnum methodReturnType = getMethodReturnType(); Class<?> genericReturnType = (Class<?>) theMethod.getGenericReturnType(); if (methodReturnType != MethodReturnTypeEnum.RESOURCE || !IBaseConformance.class.isAssignableFrom(genericReturnType)) { throw new ConfigurationException("Conformance resource provider method '" + theMethod.getName() + "' should return a Conformance resource class, returns: " + theMethod.getReturnType()); } }
@Override public IBundleProvider invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) throws BaseServerResponseException { IBaseResource conf = (IBaseResource) invokeServerMethod(theServer, theRequest, theMethodParams); return new SimpleBundleProvider(conf); }
return new SearchMethodBinding(returnType, returnTypeFromRp, theMethod, theContext, theProvider); } else if (conformance != null) { return new ConformanceMethodBinding(theMethod, theContext, theProvider); } else if (create != null) { return new CreateMethodBinding(theMethod, theContext, theProvider);
return new SearchMethodBinding(returnType, returnTypeFromRp, theMethod, theContext, theProvider); } else if (conformance != null) { return new ConformanceMethodBinding(theMethod, theContext, theProvider); } else if (create != null) { return new CreateMethodBinding(theMethod, theContext, theProvider);
@Override public IBundleProvider invokeServer(IRestfulServer<?> theServer, RequestDetails theRequest, Object[] theMethodParams) throws BaseServerResponseException { IBaseResource conf = (IBaseResource) invokeServerMethod(theServer, theRequest, theMethodParams); return new SimpleBundleProvider(conf); }
public ConformanceMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(theMethod.getReturnType(), theMethod, theContext, theProvider); // if (Modifier.isAbstract(theMethod.getReturnType().getModifiers())) { // throw new ConfigurationException("Conformance resource provider method '" + theMethod.getName() + "' must not be abstract"); // } MethodReturnTypeEnum methodReturnType = getMethodReturnType(); Class<?> genericReturnType = (Class<?>) theMethod.getGenericReturnType(); if (methodReturnType != MethodReturnTypeEnum.RESOURCE || !IBaseConformance.class.isAssignableFrom(genericReturnType)) { throw new ConfigurationException("Conformance resource provider method '" + theMethod.getName() + "' should return a Conformance resource class, returns: " + theMethod.getReturnType()); } }