diff options
author | 2018-02-12 17:11:42 +0200 | |
---|---|---|
committer | 2018-02-13 10:33:36 +0200 | |
commit | 332f0679fbd23532a058f0ff6a7cffaed3b5424e (patch) | |
tree | 09476357022653d47a7ff28bca7cf8a72886c775 /openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java | |
parent | f6784900012e11850d8e98bbf198f04bd0e411c7 (diff) |
Enable/Disable toggle feature REST
Change-Id: I2b62aa3129772cc81e4356941f86104fbfd19dbb
Issue-ID: SDC-1033
Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java')
-rw-r--r-- | openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java index 9a1fde3d9c..6158421246 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/TogglzFeatures.java @@ -18,20 +18,23 @@ package org.openecomp.sdcrests.togglz.rest; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.openecomp.sdcrests.common.RestConstants; +import org.openecomp.sdcrests.togglz.types.FeatureDto; import org.openecomp.sdcrests.togglz.types.FeatureSetDto; import org.springframework.validation.annotation.Validated; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG; + @Path("/v1.0/togglz") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) -@Api(value = "TOGGLZ") @Validated public interface TogglzFeatures { @@ -41,4 +44,15 @@ public interface TogglzFeatures { responseContainer = "List") Response getFeatures(); + + @PUT + @Path("/{featureName}/state/{state}") + @ApiOperation(value = "Update feature toggle state") + Response setFeatureState(@PathParam("featureName") String featureName, @PathParam("state") boolean state); + + @GET + @Path("/{featureName}/state") + @ApiOperation(value = "Get feature toggle state", + response = FeatureDto.class) + Response getFeatureState(@PathParam("featureName") String featureName); } |