/** * Adds a given new value for <b>resource</b> () * * <p> * <b>Definition:</b> * A specification of the restful capabilities of the solution for a specific resource type * </p> * @param theValue The resource to add (must not be <code>null</code>) */ public Rest addResource(RestResource theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getResource().add(theValue); return this; }
/** * Adds and returns a new value for <b>rest</b> () * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> */ public Rest addRest() { Rest newType = new Rest(); getRest().add(newType); return newType; }
/** * Gets the first repetition for <b>compartment</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * An absolute URI which is a reference to the definition of a compartment hosted by the system * </p> */ public UriDt getCompartmentFirstRep() { if (getCompartment().isEmpty()) { return addCompartment(); } return getCompartment().get(0); } /**
rest.setMode(RestfulConformanceModeEnum.SERVER); RestResource resource = rest.addResource(); String resourceName = nextEntry.getKey(); RuntimeResourceDefinition def = getServerConfiguration().getFhirContext().getResourceDefinition(resourceName); if (operationNames.add(opName)) { rest.addOperation().setName(methodBinding.getName().substring(1)).getDefinition().setReference("OperationDefinition/" + opName); String opName = myOperationBindingToName.get(methodBinding); if (operationNames.add(opName)) { rest.addOperation().setName(methodBinding.getName().substring(1)).getDefinition().setReference("OperationDefinition/" + opName);
Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
for (Rest nextRest : retVal.getRest()) { for (RestResource nextResource : nextRest.getResource()) {
@SuppressWarnings("Duplicates") @Override public Conformance addConformance(Conformance conformance){ if (metadataRepositoryConfig.isSecured()) { List<Conformance.Rest> restList = conformance.getRest(); Conformance.Rest rest = restList.get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); ExtensionDt conformanceExtension = new ExtensionDt(false, metadataRepositoryConfig.getUrisEndpointExtensionUrl()); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "authorize", new UriDt(metadataRepositoryConfig.getAuthorizeUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "token", new UriDt(metadataRepositoryConfig.getTokenUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "register", new UriDt(metadataRepositoryConfig.getRegistrationEndpointUrl()))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "launch-registration", new UriDt(metadataRepositoryConfig.getLaunchRegistrationUrl()))); restSecurity.addUndeclaredExtension(conformanceExtension); BoundCodeableConceptDt<RestfulSecurityServiceEnum> boundCodeableConceptDt = new BoundCodeableConceptDt<>( RestfulSecurityServiceEnum.VALUESET_BINDER, RestfulSecurityServiceEnum.SMART_ON_FHIR); boundCodeableConceptDt.setText("OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org)"); restSecurity.getService().add(boundCodeableConceptDt); } return conformance; } }
/** * Gets the first repetition for <b>operation</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * Definition of an operation or a named query and with its parameters and their meaning and type * </p> */ public RestOperation getOperationFirstRep() { if (getOperation().isEmpty()) { return addOperation(); } return getOperation().get(0); }
private void checkBindingForSystemOps(Rest rest, Set<SystemRestfulInteractionEnum> systemOps, BaseMethodBinding<?> nextMethodBinding) { if (nextMethodBinding.getRestOperationType() != null) { String sysOpCode = nextMethodBinding.getRestOperationType().getCode(); if (sysOpCode != null) { SystemRestfulInteractionEnum sysOp = SystemRestfulInteractionEnum.VALUESET_BINDER.fromCodeString(sysOpCode); if (sysOp == null) { return; } if (systemOps.contains(sysOp) == false) { systemOps.add(sysOp); rest.addInteraction().setCode(sysOp); } } } }
/** * Gets the first repetition for <b>resource</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A specification of the restful capabilities of the solution for a specific resource type * </p> */ public RestResource getResourceFirstRep() { if (getResource().isEmpty()) { return addResource(); } return getResource().get(0); }
/** * Adds and returns a new value for <b>resource</b> () * * <p> * <b>Definition:</b> * A specification of the restful capabilities of the solution for a specific resource type * </p> */ public RestResource addResource() { RestResource newType = new RestResource(); getResource().add(newType); return newType; }
/** * Gets the first repetition for <b>interaction</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A specification of restful operations supported by the system * </p> */ public RestInteraction getInteractionFirstRep() { if (getInteraction().isEmpty()) { return addInteraction(); } return getInteraction().get(0); }
public Conformance addConformance(Conformance conformance){ List<Conformance.Rest> restList = conformance.getRest(); Conformance.Rest rest = restList.get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); ExtensionDt conformanceExtension = new ExtensionDt(false, this.urisEndpointExtensionUrl); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "authorize", new UriDt( this.authorizationEndpointUri))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "token", new UriDt( this.tokenEndpointUri))); conformanceExtension.addUndeclaredExtension(new ExtensionDt(false, "register", new UriDt( this.registrationEndpointUri))); restSecurity.addUndeclaredExtension(conformanceExtension); return conformance; }
for (Rest nextRest : retVal.getRest()) { for (RestResource nextResource : nextRest.getResource()) {