aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-03-22 15:33:06 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-03-24 06:59:47 +0000
commitd378c37fbd1ecec7b43394926f1ca32a695e07de (patch)
tree5c8a085f8732f980d871d966ac49361644efa698 /openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services
parenta6ae7294ecd336d7e88f915710b08e2658eaee00 (diff)
Reformat openecomp-be
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3449 Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services/TogglzFeaturesImpl.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services/TogglzFeaturesImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services/TogglzFeaturesImpl.java
index 4777d0a656..b4e9db695a 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services/TogglzFeaturesImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/togglz-rest/togglz-rest-services/src/main/java/org/openecomp/sdcrests/togglz/rest/services/TogglzFeaturesImpl.java
@@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.sdcrests.togglz.rest.services;
+
+import java.util.Arrays;
+import javax.inject.Named;
+import javax.ws.rs.core.Response;
+import org.openecomp.sdc.be.togglz.ToggleableFeature;
import org.openecomp.sdcrests.togglz.rest.TogglzFeatures;
import org.openecomp.sdcrests.togglz.rest.mapping.MapToggleableFeatureToDto;
import org.openecomp.sdcrests.togglz.types.FeatureDto;
import org.openecomp.sdcrests.togglz.types.FeatureSetDto;
-import org.openecomp.sdc.be.togglz.ToggleableFeature;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.togglz.core.Feature;
@@ -27,10 +30,6 @@ import org.togglz.core.context.FeatureContext;
import org.togglz.core.repository.FeatureState;
import org.togglz.core.util.NamedFeature;
-import javax.inject.Named;
-import javax.ws.rs.core.Response;
-import java.util.Arrays;
-
@Named
@Service("TogglzFeature")
@Scope(value = "prototype")
@@ -49,7 +48,7 @@ public class TogglzFeaturesImpl implements TogglzFeatures {
new MapToggleableFeatureToDto().doMapping(Arrays.asList(ToggleableFeature.values()), featureSetDto);
featureSetDto.getFeatures().forEach(featureDto -> {
Feature feature = new NamedFeature(featureDto.getName());
- FeatureState featureState = new FeatureState(feature,active);
+ FeatureState featureState = new FeatureState(feature, active);
FeatureContext.getFeatureManager().setFeatureState(featureState);
});
return Response.ok().build();
@@ -58,7 +57,7 @@ public class TogglzFeaturesImpl implements TogglzFeatures {
@Override
public Response setFeatureState(String featureName, boolean active) {
Feature feature = new NamedFeature(featureName);
- FeatureState featureState = new FeatureState(feature,active);
+ FeatureState featureState = new FeatureState(feature, active);
FeatureContext.getFeatureManager().setFeatureState(featureState);
return Response.ok().build();
}
@@ -66,10 +65,7 @@ public class TogglzFeaturesImpl implements TogglzFeatures {
@Override
public Response getFeatureState(String featureName) {
boolean active = ToggleableFeature.valueOf(featureName).isActive();
- FeatureDto featureDto = new FeatureDto(featureName,active);
-
+ FeatureDto featureDto = new FeatureDto(featureName, active);
return Response.ok(featureDto).build();
}
-
}
-