Rename SecurityEvent.Object to SecurityEvent.ObjectElement

This commit is contained in:
James Agnew 2014-08-27 12:01:46 -04:00
parent 9a58e2e56e
commit c75c37d24d
99 changed files with 209 additions and 142 deletions

View File

@ -121,6 +121,16 @@
<action type="fix">
QuantityParam correctly encodes approximate (~) prefix to values
</action>
<action type="fix" issue="14">
If a server defines a method with parameter "_id", incoming search requests for that method may
get delegated to the wrong method. Thanks to Neal Acharya for reporting!
</action>
<action type="add">
SecurityEvent.Object structural element has been renamed to
SecurityEvent.ObjectElement to avoid conflicting names with the
java Object class. Thanks to Laurie Macdougall-Sookraj of UHN for
reporting!
</action>
</release>
<release version="0.5" date="2014-Jul-30">
<action type="add">

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.i18n;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.text.MessageFormat;
import java.util.Map;
import java.util.ResourceBundle;

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.model.api;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -25,6 +25,7 @@ import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
import ca.uhn.fhir.rest.param.ParameterUtil;

View File

@ -518,4 +518,4 @@ public class AddressDt
}
}

View File

@ -447,4 +447,4 @@ public class AttachmentDt
}
}

View File

@ -211,4 +211,4 @@ public class CodeableConceptDt
}
}

View File

@ -390,4 +390,4 @@ public class CodingDt
}
}

View File

@ -298,4 +298,4 @@ public class ContactDt
}
}

View File

@ -569,4 +569,4 @@ public class HumanNameDt
}
}

View File

@ -396,4 +396,4 @@ public class IdentifierDt
}
}

View File

@ -216,4 +216,4 @@ public class PeriodDt
}
}

View File

@ -433,4 +433,4 @@ public class QuantityDt
}
}

View File

@ -318,4 +318,4 @@ public class RangeDt
}
}

View File

@ -318,4 +318,4 @@ public class RatioDt
}
}

View File

@ -227,4 +227,4 @@ public class ResourceReferenceDt
}
}

View File

@ -615,4 +615,4 @@ public class SampledDataDt
}
}

View File

@ -572,4 +572,4 @@ public class ScheduleDt
}
}

View File

@ -977,4 +977,4 @@ public class AdverseReaction extends BaseResource implements IResource {
}
}

View File

@ -443,4 +443,4 @@ public class Alert extends BaseResource implements IResource {
}
}

View File

@ -785,4 +785,4 @@ public class AllergyIntolerance extends BaseResource implements IResource {
}
}

View File

@ -1352,4 +1352,4 @@ public class Appointment extends BaseResource implements IResource {
}
}

View File

@ -891,4 +891,4 @@ public class AppointmentResponse extends BaseResource implements IResource {
}
}

View File

@ -517,4 +517,4 @@ public class Availability extends BaseResource implements IResource {
}
}

View File

@ -2156,4 +2156,4 @@ public class CarePlan extends BaseResource implements IResource {
}
}

View File

@ -2031,4 +2031,4 @@ public class Claim extends BaseResource implements IResource {
}
}

View File

@ -1696,4 +1696,4 @@ public class Composition extends BaseResource implements IResource {
}
}

View File

@ -1828,4 +1828,4 @@ public class ConceptMap extends BaseResource implements IResource {
}
}

View File

@ -1775,4 +1775,4 @@ public class Condition extends BaseResource implements IResource {
}
}

View File

@ -4881,4 +4881,4 @@ public class Conformance extends BaseResource implements IResource {
}
}

View File

@ -974,4 +974,4 @@ public class Coverage extends BaseResource implements IResource {
}
}

View File

@ -1017,4 +1017,4 @@ public class Device extends BaseResource implements IResource {
}
}

View File

@ -821,4 +821,4 @@ public class DeviceObservationReport extends BaseResource implements IResource {
}
}

View File

@ -1532,4 +1532,4 @@ public class DiagnosticOrder extends BaseResource implements IResource {
}
}

View File

@ -1360,4 +1360,4 @@ public class DiagnosticReport extends BaseResource implements IResource {
}
}

View File

@ -1070,4 +1070,4 @@ public class DocumentManifest extends BaseResource implements IResource {
}
}

View File

@ -2479,4 +2479,4 @@ public class DocumentReference extends BaseResource implements IResource {
}
}

View File

@ -2086,4 +2086,4 @@ public class Encounter extends BaseResource implements IResource {
}
}

View File

@ -882,4 +882,4 @@ public class FamilyHistory extends BaseResource implements IResource {
}
}

View File

@ -1551,4 +1551,4 @@ public class GVFMeta extends BaseResource implements IResource {
}
}

View File

@ -3196,4 +3196,4 @@ public class GVFVariant extends BaseResource implements IResource {
}
}

View File

@ -1056,4 +1056,4 @@ public class GeneExpression extends BaseResource implements IResource {
}
}

View File

@ -1423,4 +1423,4 @@ public class GeneticAnalysis extends BaseResource implements IResource {
}
}

View File

@ -876,4 +876,4 @@ public class Group extends BaseResource implements IResource {
}
}

View File

@ -2186,4 +2186,4 @@ public class ImagingStudy extends BaseResource implements IResource {
}
}

View File

@ -2210,4 +2210,4 @@ public class Immunization extends BaseResource implements IResource {
}
}

View File

@ -1319,4 +1319,4 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
}
}

View File

@ -984,4 +984,4 @@ public class ListResource extends BaseResource implements IResource {
}
}

View File

@ -1152,4 +1152,4 @@ public class Location extends BaseResource implements IResource {
}
}

View File

@ -926,4 +926,4 @@ public class Media extends BaseResource implements IResource {
}
}

View File

@ -818,4 +818,4 @@ public class Medication extends BaseResource implements IResource {
}
}

View File

@ -1353,4 +1353,4 @@ public class MedicationAdministration extends BaseResource implements IResource
}
}

View File

@ -1971,4 +1971,4 @@ public class MedicationDispense extends BaseResource implements IResource {
}
}

View File

@ -1712,4 +1712,4 @@ public class MedicationPrescription extends BaseResource implements IResource {
}
}

View File

@ -1088,4 +1088,4 @@ public class MedicationStatement extends BaseResource implements IResource {
}
}

View File

@ -1271,4 +1271,4 @@ public class MessageHeader extends BaseResource implements IResource {
}
}

View File

@ -1489,4 +1489,4 @@ public class Microarray extends BaseResource implements IResource {
}
}

View File

@ -1753,4 +1753,4 @@ public class Observation extends BaseResource implements IResource {
}
}

View File

@ -410,4 +410,4 @@ public class OperationOutcome extends BaseResource implements IResource {
}
}

View File

@ -850,4 +850,4 @@ public class Order extends BaseResource implements IResource {
}
}

View File

@ -659,4 +659,4 @@ public class OrderResponse extends BaseResource implements IResource {
}
}

View File

@ -1115,4 +1115,4 @@ public class Organization extends BaseResource implements IResource {
}
}

View File

@ -448,4 +448,4 @@ public class Other extends BaseResource implements IResource {
}
}

View File

@ -2099,4 +2099,4 @@ public class Patient extends BaseResource implements IResource {
}
}

View File

@ -1370,4 +1370,4 @@ public class Practitioner extends BaseResource implements IResource {
}
}

View File

@ -1186,4 +1186,4 @@ public class Procedure extends BaseResource implements IResource {
}
}

View File

@ -5135,4 +5135,4 @@ public class Profile extends BaseResource implements IResource {
}
}

View File

@ -1202,4 +1202,4 @@ public class Provenance extends BaseResource implements IResource {
}
}

View File

@ -860,4 +860,4 @@ public class Query extends BaseResource implements IResource {
}
}

View File

@ -1503,4 +1503,4 @@ public class Questionnaire extends BaseResource implements IResource {
}
}

View File

@ -744,4 +744,4 @@ public class RelatedPerson extends BaseResource implements IResource {
}
}

View File

@ -536,4 +536,4 @@ public class Remittance extends BaseResource implements IResource {
}
}

View File

@ -448,7 +448,7 @@ public class SecurityEvent extends BaseResource implements IResource {
shortDefinition="Specific instances of data or objects that have been accessed",
formalDefinition="Specific instances of data or objects that have been accessed"
)
private java.util.List<Object> myObject;
private java.util.List<ObjectElement> myObject;
@Override
@ -593,9 +593,9 @@ public class SecurityEvent extends BaseResource implements IResource {
* Specific instances of data or objects that have been accessed
* </p>
*/
public java.util.List<Object> getObject() {
public java.util.List<ObjectElement> getObject() {
if (myObject == null) {
myObject = new java.util.ArrayList<Object>();
myObject = new java.util.ArrayList<ObjectElement>();
}
return myObject;
}
@ -608,7 +608,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Specific instances of data or objects that have been accessed
* </p>
*/
public SecurityEvent setObject(java.util.List<Object> theValue) {
public SecurityEvent setObject(java.util.List<ObjectElement> theValue) {
myObject = theValue;
return this;
}
@ -621,8 +621,8 @@ public class SecurityEvent extends BaseResource implements IResource {
* Specific instances of data or objects that have been accessed
* </p>
*/
public Object addObject() {
Object newType = new Object();
public ObjectElement addObject() {
ObjectElement newType = new ObjectElement();
getObject().add(newType);
return newType;
}
@ -636,7 +636,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Specific instances of data or objects that have been accessed
* </p>
*/
public Object getObjectFirstRep() {
public ObjectElement getObjectFirstRep() {
if (getObject().isEmpty()) {
return addObject();
}
@ -1735,7 +1735,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* </p>
*/
@Block()
public static class Object extends BaseIdentifiableElement implements IResourceBlock {
public static class ObjectElement extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@ -1844,7 +1844,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifies a specific instance of the participant object. The reference should always be version specific
* </p>
*/
public Object setIdentifier(IdentifierDt theValue) {
public ObjectElement setIdentifier(IdentifierDt theValue) {
myIdentifier = theValue;
return this;
}
@ -1857,7 +1857,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifies a specific instance of the participant object. The reference should always be version specific
* </p>
*/
public Object setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
public ObjectElement setIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
myIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
@ -1870,7 +1870,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifies a specific instance of the participant object. The reference should always be version specific
* </p>
*/
public Object setIdentifier( String theSystem, String theValue) {
public ObjectElement setIdentifier( String theSystem, String theValue) {
myIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
@ -1901,7 +1901,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifies a specific instance of the participant object. The reference should always be version specific
* </p>
*/
public Object setReference(ResourceReferenceDt theValue) {
public ObjectElement setReference(ResourceReferenceDt theValue) {
myReference = theValue;
return this;
}
@ -1932,7 +1932,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Object type being audited
* </p>
*/
public Object setType(BoundCodeDt<SecurityEventObjectTypeEnum> theValue) {
public ObjectElement setType(BoundCodeDt<SecurityEventObjectTypeEnum> theValue) {
myType = theValue;
return this;
}
@ -1945,7 +1945,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Object type being audited
* </p>
*/
public Object setType(SecurityEventObjectTypeEnum theValue) {
public ObjectElement setType(SecurityEventObjectTypeEnum theValue) {
getType().setValueAsEnum(theValue);
return this;
}
@ -1976,7 +1976,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Code representing the functional application role of Participant Object being audited
* </p>
*/
public Object setRole(BoundCodeDt<SecurityEventObjectRoleEnum> theValue) {
public ObjectElement setRole(BoundCodeDt<SecurityEventObjectRoleEnum> theValue) {
myRole = theValue;
return this;
}
@ -1989,7 +1989,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Code representing the functional application role of Participant Object being audited
* </p>
*/
public Object setRole(SecurityEventObjectRoleEnum theValue) {
public ObjectElement setRole(SecurityEventObjectRoleEnum theValue) {
getRole().setValueAsEnum(theValue);
return this;
}
@ -2020,7 +2020,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifier for the data life-cycle stage for the participant object
* </p>
*/
public Object setLifecycle(BoundCodeDt<SecurityEventObjectLifecycleEnum> theValue) {
public ObjectElement setLifecycle(BoundCodeDt<SecurityEventObjectLifecycleEnum> theValue) {
myLifecycle = theValue;
return this;
}
@ -2033,7 +2033,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifier for the data life-cycle stage for the participant object
* </p>
*/
public Object setLifecycle(SecurityEventObjectLifecycleEnum theValue) {
public ObjectElement setLifecycle(SecurityEventObjectLifecycleEnum theValue) {
getLifecycle().setValueAsEnum(theValue);
return this;
}
@ -2064,7 +2064,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics
* </p>
*/
public Object setSensitivity(BoundCodeableConceptDt<SecurityEventObjectSensitivityEnum> theValue) {
public ObjectElement setSensitivity(BoundCodeableConceptDt<SecurityEventObjectSensitivityEnum> theValue) {
mySensitivity = theValue;
return this;
}
@ -2077,7 +2077,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Denotes policy-defined sensitivity for the Participant Object ID such as VIP, HIV status, mental health status or similar topics
* </p>
*/
public Object setSensitivity(SecurityEventObjectSensitivityEnum theValue) {
public ObjectElement setSensitivity(SecurityEventObjectSensitivityEnum theValue) {
getSensitivity().setValueAsEnum(theValue);
return this;
}
@ -2108,7 +2108,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* An instance-specific descriptor of the Participant Object ID audited, such as a person's name
* </p>
*/
public Object setName(StringDt theValue) {
public ObjectElement setName(StringDt theValue) {
myName = theValue;
return this;
}
@ -2121,7 +2121,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* An instance-specific descriptor of the Participant Object ID audited, such as a person's name
* </p>
*/
public Object setName( String theString) {
public ObjectElement setName( String theString) {
myName = new StringDt(theString);
return this;
}
@ -2152,7 +2152,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Text that describes the object in more detail
* </p>
*/
public Object setDescription(StringDt theValue) {
public ObjectElement setDescription(StringDt theValue) {
myDescription = theValue;
return this;
}
@ -2165,7 +2165,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Text that describes the object in more detail
* </p>
*/
public Object setDescription( String theString) {
public ObjectElement setDescription( String theString) {
myDescription = new StringDt(theString);
return this;
}
@ -2196,7 +2196,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* The actual query for a query-type participant object
* </p>
*/
public Object setQuery(Base64BinaryDt theValue) {
public ObjectElement setQuery(Base64BinaryDt theValue) {
myQuery = theValue;
return this;
}
@ -2209,7 +2209,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* The actual query for a query-type participant object
* </p>
*/
public Object setQuery( byte[] theBytes) {
public ObjectElement setQuery( byte[] theBytes) {
myQuery = new Base64BinaryDt(theBytes);
return this;
}
@ -2240,7 +2240,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
* </p>
*/
public Object setDetail(java.util.List<ObjectDetail> theValue) {
public ObjectElement setDetail(java.util.List<ObjectDetail> theValue) {
myDetail = theValue;
return this;
}
@ -2409,4 +2409,4 @@ public class SecurityEvent extends BaseResource implements IResource {
}
}

View File

@ -659,4 +659,4 @@ public class SequencingAnalysis extends BaseResource implements IResource {
}
}

View File

@ -976,4 +976,4 @@ public class SequencingLab extends BaseResource implements IResource {
}
}

View File

@ -702,4 +702,4 @@ public class Slot extends BaseResource implements IResource {
}
}

View File

@ -1871,4 +1871,4 @@ public class Specimen extends BaseResource implements IResource {
}
}

View File

@ -797,4 +797,4 @@ public class Substance extends BaseResource implements IResource {
}
}

View File

@ -1128,4 +1128,4 @@ public class Supply extends BaseResource implements IResource {
}
}

View File

@ -1430,4 +1430,4 @@ public class Test extends BaseResource implements IResource {
}
}

View File

@ -656,4 +656,4 @@ public class User extends BaseResource implements IResource {
}
}

View File

@ -2770,4 +2770,4 @@ public class ValueSet extends BaseResource implements IResource {
}
}

View File

@ -20,7 +20,8 @@ package ca.uhn.fhir.parser;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -27,6 +27,7 @@ import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.rest.param.CompositeParam;
import ca.uhn.fhir.rest.param.ReferenceParam;
@Retention(RetentionPolicy.RUNTIME)

View File

@ -27,6 +27,7 @@ import ca.uhn.fhir.model.api.IQueryParameterType;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Patient;
import ca.uhn.fhir.rest.param.CompositeParam;
import ca.uhn.fhir.rest.param.ReferenceParam;
@Retention(RetentionPolicy.RUNTIME)

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import java.io.IOException;
import java.io.Reader;

View File

@ -61,6 +61,10 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding<Obje
set.add(Constants.PARAM_FORMAT);
set.add(Constants.PARAM_NARRATIVE);
set.add(Constants.PARAM_PRETTY);
set.add(Constants.PARAM_SORT);
set.add(Constants.PARAM_SORT_ASC);
set.add(Constants.PARAM_SORT_DESC);
set.add(Constants.PARAM_COUNT);
ALLOWED_PARAMS = Collections.unmodifiableSet(set);
}
private MethodReturnTypeEnum myMethodReturnType;

View File

@ -1,6 +1,7 @@
package ca.uhn.fhir.rest.method;
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.IOException;
import java.io.PushbackReader;

View File

@ -24,8 +24,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;

View File

@ -49,14 +49,6 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
*/
public class SearchMethodBinding extends BaseResourceReturningMethodBinding {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(SearchMethodBinding.class);
private static final Set<String> SPECIAL_PARAM_NAMES;
static {
HashSet<String> specialParamNames = new HashSet<String>();
specialParamNames.add("_id");
specialParamNames.add("_language");
SPECIAL_PARAM_NAMES = Collections.unmodifiableSet(specialParamNames);
}
private Class<? extends IResource> myDeclaredResourceType;
private String myQueryName;
@ -81,16 +73,17 @@ public class SearchMethodBinding extends BaseResourceReturningMethodBinding {
if (!(next instanceof SearchParameter)) {
continue;
}
SearchParameter sp = (SearchParameter)next;
SearchParameter sp = (SearchParameter) next;
if (sp.getName().startsWith("_")) {
if (ALLOWED_PARAMS.contains(sp.getName())) {
String msg = getContext().getLocalizer().getMessage(getClass().getName() + ".invalidSpecialParamName", theMethod.getName(), theMethod.getDeclaringClass().getSimpleName(), sp.getName());
throw new ConfigurationException(msg);
String msg = getContext().getLocalizer().getMessage(getClass().getName() + ".invalidSpecialParamName", theMethod.getName(), theMethod.getDeclaringClass().getSimpleName(),
sp.getName());
throw new ConfigurationException(msg);
}
}
}
}
public String getDescription() {
@ -237,11 +230,11 @@ public class SearchMethodBinding extends BaseResourceReturningMethodBinding {
}
Set<String> keySet = theRequest.getParameters().keySet();
for (String next : keySet) {
if (next.startsWith("_")) {
if (!SPECIAL_PARAM_NAMES.contains(next)) {
continue;
}
}
// if (next.startsWith("_")) {
// if (!SPECIAL_PARAM_NAMES.contains(next)) {
// continue;
// }
// }
if (!methodParamsTemp.contains(next)) {
return false;
}

View File

@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L%
*/
import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
import java.io.IOException;
import java.lang.reflect.Method;

View File

@ -20,10 +20,12 @@ package ca.uhn.fhir.rest.param;
* #L%
*/
import static ca.uhn.fhir.rest.param.ParameterUtil.escape;
import static org.apache.commons.lang3.StringUtils.defaultString;
import java.math.BigDecimal;
import java.util.List;
import static ca.uhn.fhir.rest.param.ParameterUtil.*;
import static org.apache.commons.lang3.StringUtils.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

View File

@ -1,5 +1,25 @@
package ca.uhn.fhir.rest.server.interceptor;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 University Health Network
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

View File

@ -8,12 +8,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>

View File

@ -198,8 +198,8 @@ public class TinderStructuresMojo extends AbstractMojo {
public static void main(String[] args) throws Exception {
ProfileParser pp = new ProfileParser();
pp.parseSingleProfile(new File("../hapi-tinder-test/src/test/resources/profile/patient.xml"), "http://foo");
// ProfileParser pp = new ProfileParser();
// pp.parseSingleProfile(new File("../hapi-tinder-test/src/test/resources/profile/patient.xml"), "http://foo");
ValueSetGenerator vsp = new ValueSetGenerator();
// vsp.setDirectory("src/test/resources/vs/");
@ -213,7 +213,7 @@ public class TinderStructuresMojo extends AbstractMojo {
dtp.writeAll(new File(dtOutputDir), null, "ca.uhn.fhir.model.dstu");
ResourceGeneratorUsingSpreadsheet rp = new ResourceGeneratorUsingSpreadsheet();
rp.setBaseResourceNames(Arrays.asList("patient"));
rp.setBaseResourceNames(Arrays.asList("securityevent"));
rp.parse();
// rp.bindValueSets(vsp);

View File

@ -11,6 +11,15 @@ public class ResourceBlock extends Child {
return super.getChildren();
}
@Override
public void setElementName(String theName) {
super.setElementName(theName);
String name = theName;
if ("object".equals(name)) {
setForcedClassName("ObjectElement");
}
}
public String getClassName() {
if (myForcedClassName != null) {
return myForcedClassName;

View File

@ -84,6 +84,8 @@
<baseResourceName>device</baseResourceName>
<baseResourceName>location</baseResourceName>
<baseResourceName>practitioner</baseResourceName>
<baseResourceName>list</baseResourceName>
<baseResourceName>securityevent</baseResourceName>
</baseResourceNames>
<buildDatatypes>true</buildDatatypes>
</configuration>

View File

@ -2,8 +2,18 @@ package test;
import org.junit.Test;
import ca.uhn.test.realstructs.resource.ListResource;
import ca.uhn.test.realstructs.resource.SecurityEvent.ObjectElement;
public class TestParticulars {
@Test
public void testElementsWithSpecialNames() {
// This won't compile if tinder didn't getenerate the right names...
ListResource.class.getName();
ObjectElement.class.getName();
}
@Test
public void testReferenceDoesntReturnNull() {
ca.uhn.test.realstructs.resource.Patient p = new ca.uhn.test.realstructs.resource.Patient();