private static Class<? extends IBaseResource> toReturnType(Method theMethod, Object theProvider) { History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (type != IBaseResource.class && type != IResource.class) { return type; } return null; }
private static Class<? extends IBaseResource> toReturnType(Method theMethod, Object theProvider) { if (theProvider instanceof IResourceProvider) { return ((IResourceProvider) theProvider).getResourceType(); } History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (type != IBaseResource.class && type != IResource.class) { return type; } return null; }
public HistoryMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(toReturnType(theMethod, theProvider), theMethod, theContext, theProvider); myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (Modifier.isInterface(type.getModifiers())) { myResourceOperationType = RestOperationTypeEnum.HISTORY_SYSTEM; } else { if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } if (type != IBaseResource.class && type != IResource.class) { myResourceName = theContext.getResourceDefinition(type).getName(); } else { myResourceName = null; } }
public HistoryMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(toReturnType(theMethod, theProvider), theMethod, theContext, theProvider); myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (Modifier.isInterface(type.getModifiers())) { if (theProvider instanceof IResourceProvider) { type = ((IResourceProvider) theProvider).getResourceType(); if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_SYSTEM; } } else { if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } if (type != IBaseResource.class && type != IResource.class) { myResourceName = theContext.getResourceDefinition(type).getName(); } else { myResourceName = null; } }
returnTypeFromAnnotation = search.type(); } else if (history != null) { returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type();
returnTypeFromAnnotation = search.type(); } else if (history != null) { returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type();
private static Class<? extends IBaseResource> toReturnType(Method theMethod, Object theProvider) { History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (type != IBaseResource.class && type != IResource.class) { return type; } return null; }
private static Class<? extends IBaseResource> toReturnType(Method theMethod, Object theProvider) { if (theProvider instanceof IResourceProvider) { return ((IResourceProvider) theProvider).getResourceType(); } History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (type != IBaseResource.class && type != IResource.class) { return type; } return null; }
public HistoryMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(toReturnType(theMethod, theProvider), theMethod, theContext, theProvider); myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (Modifier.isInterface(type.getModifiers())) { myResourceOperationType = RestOperationTypeEnum.HISTORY_SYSTEM; } else { if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } if (type != IBaseResource.class && type != IResource.class) { myResourceName = theContext.getResourceDefinition(type).getName(); } else { myResourceName = null; } }
public HistoryMethodBinding(Method theMethod, FhirContext theContext, Object theProvider) { super(toReturnType(theMethod, theProvider), theMethod, theContext, theProvider); myIdParamIndex = ParameterUtil.findIdParameterIndex(theMethod, getContext()); History historyAnnotation = theMethod.getAnnotation(History.class); Class<? extends IBaseResource> type = historyAnnotation.type(); if (Modifier.isInterface(type.getModifiers())) { if (theProvider instanceof IResourceProvider) { type = ((IResourceProvider) theProvider).getResourceType(); if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_SYSTEM; } } else { if (myIdParamIndex != null) { myResourceOperationType = RestOperationTypeEnum.HISTORY_INSTANCE; } else { myResourceOperationType = RestOperationTypeEnum.HISTORY_TYPE; } } if (type != IBaseResource.class && type != IResource.class) { myResourceName = theContext.getResourceDefinition(type).getName(); } else { myResourceName = null; } }
returnTypeFromAnnotation = search.type(); } else if (history != null) { returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type();
returnTypeFromAnnotation = search.type(); } else if (history != null) { returnTypeFromAnnotation = history.type(); } else if (delete != null) { returnTypeFromAnnotation = delete.type();