- return UriComponentsBuilder.fromUriString(getBaseUrl(nearRtRicUrl)).pathSegment("policytypes")
- .pathSegment(policyTypeId).build().toString();
+ return UriComponentsBuilder.fromUriString(policyTypesUrl(nearRtRicUrl)).pathSegment(policyTypeId).build()
+ .toString();
+ }
+
+ /**
+ * Retrieve the url of putPolicy
+ *
+ * @param nearRtRicUrl the near-rt-ric url
+ * @param policyId Policy Id
+ * @param policyTypeId Policy Type Id
+ * @return the putPolicy url
+ */
+ public String putPolicyUrl(final String nearRtRicUrl, final String policyId, final String policyTypeId) {
+ UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl)).pathSegment(policyId);
+
+ if (!policyTypeId.isEmpty()) {
+ builder.queryParam("policyTypeId", policyTypeId);
+ }
+ return builder.build().toString();