X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=sdnc-a1-controller%2Fnorthbound%2Fnonrt-ric-api%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fsdnc%2Fnorthbound%2Frestadapter%2FNearRicUrlProvider.java;h=c4ca335af723e3eb4b46f86c56bab22329441127;hb=deb5bb7b792ba3ac90e4c622cd804c83e4647b92;hp=b74d1031bcdae8f5e512aeca67d7799f34a8eb12;hpb=be2000ec2d21151b42cb559ef881695eb32e35e9;p=nonrtric.git diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadapter/NearRicUrlProvider.java b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadapter/NearRicUrlProvider.java index b74d1031..c4ca335a 100644 --- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadapter/NearRicUrlProvider.java +++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadapter/NearRicUrlProvider.java @@ -49,8 +49,7 @@ public class NearRicUrlProvider { * @return the policytypes url */ public String policyTypesUrl(final String nearRtRicUrl) { - return UriComponentsBuilder.fromUriString(getBaseUrl(nearRtRicUrl)).pathSegment("policytypes") - .build().toString(); + return UriComponentsBuilder.fromUriString(getBaseUrl(nearRtRicUrl)).pathSegment("policytypes").build().toString(); } /** @@ -60,8 +59,7 @@ public class NearRicUrlProvider { * @return the policies url */ public String policiesUrl(final String nearRtRicUrl) { - return UriComponentsBuilder.fromUriString(getBaseUrl(nearRtRicUrl)).pathSegment("policies") - .build().toString(); + return UriComponentsBuilder.fromUriString(getBaseUrl(nearRtRicUrl)).pathSegment("policies").build().toString(); } /** @@ -72,32 +70,35 @@ public class NearRicUrlProvider { * @return the policy type url */ public String getPolicyTypeUrl(final String nearRtRicUrl, final String policyTypeId) { - return UriComponentsBuilder.fromUriString(policyTypesUrl(nearRtRicUrl)).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 policyId Policy Id * @param policyTypeId Policy Type Id * @return the putPolicy url */ public String putPolicyUrl(final String nearRtRicUrl, final String policyId, final String policyTypeId) { return UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl)) - .pathSegment(policyId + "?policyTypeId=" + policyTypeId).build().toString(); + .pathSegment(policyId + "?policyTypeId=" + policyTypeId).build().toString(); } /** * Retrieve the url of deletePolicy * * @param nearRtRicUrl the near-rt-ric url - * @param policyId Policy Id + * @param policyId Policy Id * @return the deletePolicy url */ public String deletePolicyUrl(final String nearRtRicUrl, final String policyId) { - return UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl)).pathSegment(policyId) - .build().toString(); + return UriComponentsBuilder.fromUriString(policiesUrl(nearRtRicUrl)).pathSegment(policyId).build().toString(); + } + + public String getPolicyStatusUrl(String nearRtRicUrl, String policyId) { + return policiesUrl(nearRtRicUrl) + "/" + policyId + "/status"; } }