return new ValidateMethodBindingDstu2Plus(returnType, returnTypeFromRp, theMethod, theContext, theProvider, validate); } else if (transaction != null) { return new TransactionMethodBinding(theMethod, theContext, theProvider); } else if (operation != null) { return new OperationMethodBinding(returnType, returnTypeFromRp, theMethod, theContext, theProvider, operation);
@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myTransactionParamIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myTransactionParamIndex]); } else { Class<? extends IBaseResource> resourceType = getContext().getResourceDefinition("Bundle").getImplementingClass(); theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, resourceType)); } }
public TransactionMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(null, theMethod, theContext, theProvider); myTransactionParamIndex = -1; int index = 0; for (IParameter next : getParameters()) { if (next instanceof TransactionParameter) { if (myTransactionParamIndex != -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " has multiple parameters annotated with the @" + TransactionParam.class + " annotation, exactly one is required for @" + Transaction.class + " methods"); } myTransactionParamIndex = index; myTransactionParamStyle = ((TransactionParameter) next).getParamStyle(); } index++; } if (myTransactionParamIndex == -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " does not have a parameter annotated with the @" + TransactionParam.class + " annotation"); } }
Object response = invokeServerMethod(theServer, theRequest, theMethodParams); return response; Object response = invokeServerMethod(theServer, theRequest, theMethodParams); IBundleProvider retVal = toResourceList(response);
Object response = invokeServerMethod(theServer, theRequest, theMethodParams); return response; Object response = invokeServerMethod(theServer, theRequest, theMethodParams); IBundleProvider retVal = toResourceList(response);
@Override protected void populateActionRequestDetailsForInterceptor(RequestDetails theRequestDetails, ActionRequestDetails theDetails, Object[] theMethodParams) { super.populateActionRequestDetailsForInterceptor(theRequestDetails, theDetails, theMethodParams); /* * If the method has no parsed resource parameter, we parse here in order to have something for the interceptor. */ if (myTransactionParamIndex != -1) { theDetails.setResource((IBaseResource) theMethodParams[myTransactionParamIndex]); } else { Class<? extends IBaseResource> resourceType = getContext().getResourceDefinition("Bundle").getImplementingClass(); theDetails.setResource(ResourceParameter.parseResourceFromRequest(theRequestDetails, this, resourceType)); } }
public TransactionMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(null, theMethod, theContext, theProvider); myTransactionParamIndex = -1; int index = 0; for (IParameter next : getParameters()) { if (next instanceof TransactionParameter) { if (myTransactionParamIndex != -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " has multiple parameters annotated with the @" + TransactionParam.class + " annotation, exactly one is required for @" + Transaction.class + " methods"); } myTransactionParamIndex = index; myTransactionParamStyle = ((TransactionParameter) next).getParamStyle(); } index++; } if (myTransactionParamIndex == -1) { throw new ConfigurationException("Method '" + theMethod.getName() + "' in type " + theMethod.getDeclaringClass().getCanonicalName() + " does not have a parameter annotated with the @" + TransactionParam.class + " annotation"); } }
return new ValidateMethodBindingDstu2Plus(returnType, returnTypeFromRp, theMethod, theContext, theProvider, validate); } else if (transaction != null) { return new TransactionMethodBinding(theMethod, theContext, theProvider); } else if (operation != null) { return new OperationMethodBinding(returnType, returnTypeFromRp, theMethod, theContext, theProvider, operation);