aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-18 11:10:02 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2017-09-18 11:10:02 +0200
commitaf0fbf9edb92544380d40ab2cffb87c89831944f (patch)
tree95847af9e392b28ab92232e27c74882675a0e0a3 /src/main
parent52a9b022e0b7211e48162b75610ceb7df8c91f5a (diff)
Add new tests to CLAMP
New tests added on ModelProperties, CldsModel and ITs (CldsService tests) Change-Id: I75a29c11ec66e0eef7c80f76cf90c30b2fc29972 Issue-ID: CLAMP-54 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/clds/model/CldsModel.java6
-rw-r--r--src/main/java/org/onap/clamp/clds/service/DefaultUserNameHandler.java3
-rw-r--r--src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java11
3 files changed, 12 insertions, 8 deletions
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsModel.java b/src/main/java/org/onap/clamp/clds/model/CldsModel.java
index 7eac3d92a..62b10d44f 100644
--- a/src/main/java/org/onap/clamp/clds/model/CldsModel.java
+++ b/src/main/java/org/onap/clamp/clds/model/CldsModel.java
@@ -116,7 +116,7 @@ public class CldsModel {
public boolean canInventoryCall() {
boolean canCall = false;
- /* Below checks the clds ecent is submit/resubmit */
+ /* Below checks the clds event is submit/resubmit */
if ((event.isActionCd(CldsEvent.ACTION_SUBMIT) || event.isActionCd(CldsEvent.ACTION_RESUBMIT))) {
canCall = true;
@@ -225,7 +225,9 @@ public class CldsModel {
/**
* Determine permittedActionCd list using the actionCd from the current
- * event.
+ * event. It's a states graph, given the next action that can be executed
+ * from the one that has been executed (described in the event object).
+ * ACTION_CREATE being the first one.
*/
private void determinePermittedActionCd() {
String actionCd = getCurrentActionCd();
diff --git a/src/main/java/org/onap/clamp/clds/service/DefaultUserNameHandler.java b/src/main/java/org/onap/clamp/clds/service/DefaultUserNameHandler.java
index 511cafe1e..574689e5b 100644
--- a/src/main/java/org/onap/clamp/clds/service/DefaultUserNameHandler.java
+++ b/src/main/java/org/onap/clamp/clds/service/DefaultUserNameHandler.java
@@ -29,9 +29,6 @@ import javax.ws.rs.core.SecurityContext;
public class DefaultUserNameHandler implements UserNameHandler {
- public DefaultUserNameHandler() {
- }
-
/*
* (non-Javadoc)
*
diff --git a/src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java b/src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java
index 19813ebaf..acbd8bbd4 100644
--- a/src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java
+++ b/src/main/java/org/onap/clamp/clds/service/SecureServiceBase.java
@@ -23,6 +23,9 @@
package org.onap.clamp.clds.service;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
import java.security.Principal;
import javax.ws.rs.NotAuthorizedException;
@@ -31,9 +34,6 @@ import javax.ws.rs.core.SecurityContext;
import org.onap.clamp.clds.util.LoggingUtils;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-
/**
* Base/abstract Service class. Implements shared security methods.
*/
@@ -185,4 +185,9 @@ public abstract class SecureServiceBase {
userNameHandler = handler;
}
}
+
+ public void setSecurityContext(SecurityContext securityContext) {
+ this.securityContext = securityContext;
+ }
+
}