X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdbcapi.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fresources%2FMR_ClientResource.java;h=a62133829800b2c6eb605c0856d37116b3dc8202;hp=1ca4a53ad3b9fcd528c47522978e03da8fe605f9;hb=536c6aabdfd2bcdc493501a9498fb8a97d208c0b;hpb=297ea699d8f7f3be96abea6c28e4204f7c4687a4 diff --git a/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java b/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java index 1ca4a53..a621338 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java +++ b/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java @@ -79,8 +79,11 @@ public class MR_ClientResource extends BaseLoggingClass { } @POST - @ApiOperation( value = "return MR_Client details", - notes = "Create a `MR_Client` object.", + @ApiOperation( value = "Associate an MR_Client object to a Topic", + notes = "Create a `MR_Client` object." + + "The `dcaeLocation` attribute is used to match an `MR_Cluster` object with the same value, with the intent of localizing message traffic." + + " In legacy implementation, the `clientRole` is granted appropriate permission in AAF." + + " Newer implementions may instead specify an AAF Identity, which will be added to the appropriate `Topic` role.", response = MR_Client.class) @ApiResponses( value = { @ApiResponse( code = 200, message = "Success", response = MR_Client.class), @@ -94,7 +97,11 @@ public class MR_ClientResource extends BaseLoggingClass { try { resp.required( "fqtn", client.getFqtn(), ""); resp.required( "dcaeLocationName", client.getDcaeLocationName(), ""); - resp.required( "clientRole", client.getClientRole(), "" ); + String s = client.getClientRole(); + if ( s == null ) { + s = client.getClientIdentity(); + } + resp.required( "clientRole or clientIdentity", s, "" ); resp.required( "action", client.getAction(), ""); } catch ( RequiredFieldException rfe ) { @@ -139,7 +146,7 @@ public class MR_ClientResource extends BaseLoggingClass { } @PUT - @ApiOperation( value = "return MR_Client details", + @ApiOperation( value = "Update an MR_Client object", notes = "Update a `MR_Client` object, specified by clientId", response = MR_Client.class) @ApiResponses( value = { @@ -175,7 +182,7 @@ public class MR_ClientResource extends BaseLoggingClass { } @DELETE - @ApiOperation( value = "return MR_Client details", + @ApiOperation( value = "Delete an MR_Client object", notes = "Delete a `MR_Client` object, specified by clientId", response = MR_Client.class) @ApiResponses( value = {