aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/main
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2020-02-26 09:59:43 -0600
committerjhh <jorge.hernandez-herrero@att.com>2020-02-26 09:59:43 -0600
commit04520679c94796757c5dda423ec52b78486e3186 (patch)
treea6a990731742a0e8075884bc5e6eb47ffa03a185 /feature-lifecycle/src/main
parentad08c16e0b23de071a6a17c29a792dd808ff26c0 (diff)
narrow rest server data response for lifecycle
There may be a potential for getting stuck between gson utils, jetty and fsm data. Issue-ID: POLICY-2345 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Iec7d1a9db19d3c2eea830b2a51cd1fb1229c573a
Diffstat (limited to 'feature-lifecycle/src/main')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
index 9aea0450..44113779 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,11 +41,19 @@ import org.onap.policy.drools.lifecycle.LifecycleFsm;
public class RestLifecycleManager {
@GET
- @Path("engine/lifecycle/fsm")
+ @Path("engine/lifecycle/fsm/group")
@ApiOperation(value = "Retrieves the Lifecycle FSM",
notes = "Lifecycle FSM", response = LifecycleFsm.class)
- public Response fsm() {
- return Response.status(Response.Status.OK).entity(LifecycleFeature.fsm).build();
+ public Response group() {
+ return Response.status(Response.Status.OK).entity(LifecycleFeature.fsm.getGroup()).build();
+ }
+
+ @GET
+ @Path("engine/lifecycle/fsm/subgroup")
+ @ApiOperation(value = "Retrieves the Lifecycle FSM",
+ notes = "Lifecycle FSM", response = LifecycleFsm.class)
+ public Response subgroup() {
+ return Response.status(Response.Status.OK).entity(LifecycleFeature.fsm.getSubgroup()).build();
}
@GET
@@ -55,5 +63,4 @@ public class RestLifecycleManager {
public Response state() {
return Response.status(Response.Status.OK).entity(LifecycleFeature.fsm.state()).build();
}
-
}