public BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody(Method theMethod, FhirContext theContext, Object theProvider, Class<?> theMethodAnnotationType, Class<? extends IBaseResource> theResourceTypeFromAnnotation) { super(theMethod, theContext, theMethodAnnotationType, theProvider); Class<? extends IBaseResource> resourceType = theResourceTypeFromAnnotation; if (resourceType != IBaseResource.class) { RuntimeResourceDefinition def = theContext.getResourceDefinition(resourceType); myResourceName = def.getName(); } else { if (theProvider != null && theProvider instanceof IResourceProvider) { RuntimeResourceDefinition def = theContext.getResourceDefinition(((IResourceProvider) theProvider).getResourceType()); myResourceName = def.getName(); } else { throw new ConfigurationException( "Can not determine resource type for method '" + theMethod.getName() + "' on type " + theMethod.getDeclaringClass().getCanonicalName() + " - Did you forget to include the resourceType() value on the @" + Delete.class.getSimpleName() + " method annotation?"); } } myIdParameterIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); if (myIdParameterIndex == null) { throw new ConfigurationException("Method '" + theMethod.getName() + "' on type '" + theMethod.getDeclaringClass().getCanonicalName() + "' has no parameter annotated with the @" + IdParam.class.getSimpleName() + " annotation"); } }
@Override public boolean incomingServerRequestMatchesMethod(RequestDetails theRequest) { boolean retVal = super.incomingServerRequestMatchesMethod(theRequest); if (retVal) { PatchTypeParameter.getTypeForRequestOrThrowInvalidRequestException(theRequest); } return retVal; }
@Override public boolean incomingServerRequestMatchesMethod(RequestDetails theRequest) { boolean retVal = super.incomingServerRequestMatchesMethod(theRequest); if (retVal) { PatchTypeParameter.getTypeForRequestOrThrowInvalidRequestException(theRequest); } return retVal; }
public BaseOutcomeReturningMethodBindingWithResourceIdButNoResourceBody(Method theMethod, FhirContext theContext, Object theProvider, Class<?> theMethodAnnotationType, Class<? extends IBaseResource> theResourceTypeFromAnnotation) { super(theMethod, theContext, theMethodAnnotationType, theProvider); Class<? extends IBaseResource> resourceType = theResourceTypeFromAnnotation; if (resourceType != IBaseResource.class) { RuntimeResourceDefinition def = theContext.getResourceDefinition(resourceType); myResourceName = def.getName(); } else { if (theProvider != null && theProvider instanceof IResourceProvider) { RuntimeResourceDefinition def = theContext.getResourceDefinition(((IResourceProvider) theProvider).getResourceType()); myResourceName = def.getName(); } else { throw new ConfigurationException( "Can not determine resource type for method '" + theMethod.getName() + "' on type " + theMethod.getDeclaringClass().getCanonicalName() + " - Did you forget to include the resourceType() value on the @" + Delete.class.getSimpleName() + " method annotation?"); } } myIdParameterIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); if (myIdParameterIndex == null) { throw new ConfigurationException("Method '" + theMethod.getName() + "' on type '" + theMethod.getDeclaringClass().getCanonicalName() + "' has no parameter annotated with the @" + IdParam.class.getSimpleName() + " annotation"); } }