/** * Adds a given new value for <b>rest</b> () * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> * @param theValue The rest to add (must not be <code>null</code>) */ public Conformance addRest(Rest theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getRest().add(theValue); return this; }
/** * Gets the first repetition for <b>rest</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A definition of the restful capabilities of the solution, if any * </p> */ public Rest getRestFirstRep() { if (getRest().isEmpty()) { return addRest(); } return getRest().get(0); }
for (Rest nextRest : retVal.getRest()) {
/** * 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; }
Conformance.Rest rest = conformance.getRest().get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
Conformance.Rest rest = conformance.getRest().get(0); Conformance.RestSecurity restSecurity = rest.getSecurity(); List<ExtensionDt> extensions = restSecurity.getUndeclaredExtensions();
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; }
@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; } }
for (Rest nextRest : retVal.getRest()) {