summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java
diff options
context:
space:
mode:
authorAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
committerAviZi <avi.ziv@amdocs.com>2017-06-09 02:39:56 +0300
commit280f8015d06af1f41a3ef12e8300801c7a5e0d54 (patch)
tree9c1d3978c04cd28068f02073038c936bb49ca9e0 /openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java
parentfd3821dad11780d33c5373d74c957c442489945e (diff)
[SDC-29] Amdocs OnBoard 1707 initial commit.
Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java11
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthorizationFilter.java8
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionLibraryPrivilege.java22
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java3
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/EmptyOutputOutInterceptor.java4
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/InternalEmptyObject.java3
6 files changed, 34 insertions, 17 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java
index 6e9b4dbe25..e59d3fb3b8 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthenticationFilter.java
@@ -23,7 +23,6 @@ package org.openecomp.server.filters;
import java.io.IOException;
import java.security.Principal;
import java.util.Base64;
-
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
@@ -40,6 +39,7 @@ public class ActionAuthenticationFilter implements Filter {
@Override
public void destroy() {
+ // TODO Auto-generated method stub
}
@@ -57,7 +57,7 @@ public class ActionAuthenticationFilter implements Filter {
httpRequest.getHeader("Authorization").replace("Basic", "").trim();
String decodedCredentials = new String(Base64.getDecoder().decode(base64Credentials));
username = decodedCredentials.substring(0, decodedCredentials.indexOf(":"));
- } catch (Exception e0) {
+ } catch (Exception exception) {
setResponseStatus((HttpServletResponse) arg1, HttpServletResponse.SC_FORBIDDEN);
return;
}
@@ -81,7 +81,7 @@ public class ActionAuthenticationFilter implements Filter {
ActionLibraryPrivilege userPrivilege = ActionLibraryPrivilege
.valueOf(username.substring(username.indexOf("-") + 1).toUpperCase());
return userPrivilege.ordinal() >= requiredPrivilege.ordinal();
- } catch (Exception e0) {
+ } catch (Exception exception) {
return false;
}
}
@@ -106,10 +106,7 @@ public class ActionAuthenticationFilter implements Filter {
@Override
public void init(FilterConfig arg0) throws ServletException {
- /*runningOnLocal = System.getProperty("file.separator").equals("\\");
- if (!runningOnLocal){
- // call to super init of cadi filter as we are not running on windows
- }*/
+
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthorizationFilter.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthorizationFilter.java
index ba9c7537f4..82e4fa80d9 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthorizationFilter.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionAuthorizationFilter.java
@@ -21,7 +21,6 @@
package org.openecomp.server.filters;
import java.io.IOException;
-
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
@@ -37,6 +36,8 @@ public class ActionAuthorizationFilter implements Filter {
@Override
public void destroy() {
+ // TODO Auto-generated method stub
+
}
@Override
@@ -62,10 +63,7 @@ public class ActionAuthorizationFilter implements Filter {
@Override
public void init(FilterConfig arg0) throws ServletException {
- /*runningOnLocal = System.getProperty("file.separator").equals("\\");
- if (!runningOnLocal){
- // call to super init of cadi filter as we are not running on windows
- }*/
+
}
}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionLibraryPrivilege.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionLibraryPrivilege.java
index c34af00830..6c8b1e8ca5 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionLibraryPrivilege.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/filters/ActionLibraryPrivilege.java
@@ -20,14 +20,30 @@
package org.openecomp.server.filters;
+/**
+ * The enum Action library privilege.
+ */
public enum ActionLibraryPrivilege {
- RETRIEVE, CREATE, UPDATE, DELETE;
+ /**
+ * Retrieve action library privilege.
+ */
+ RETRIEVE, /**
+ * Create action library privilege.
+ */
+ CREATE, /**
+ * Update action library privilege.
+ */
+ UPDATE, /**
+ * Delete action library privilege.
+ */
+ DELETE;
/**
+ * Gets privilege.
*
- * @param operation .
- * @return actionLibraryPrivilege
+ * @param operation the operation
+ * @return the privilege
*/
public static ActionLibraryPrivilege getPrivilege(String operation) {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
index b2e1119a78..991a286a48 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/DefaultOutput.java
@@ -20,6 +20,7 @@
package org.openecomp.server.interceptors;
+
import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.net.URI;
@@ -48,6 +49,7 @@ public class DefaultOutput extends Response implements Serializable {
this.status = s0;
this.entity = e0;
}
+
public Object getEntity() {
return entity;
}
@@ -141,6 +143,7 @@ public class DefaultOutput extends Response implements Serializable {
return false;
}
+
@Override
public Link getLink(String s0) {
return null;
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/EmptyOutputOutInterceptor.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/EmptyOutputOutInterceptor.java
index 4e2f56834f..9c02d5a558 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/EmptyOutputOutInterceptor.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/EmptyOutputOutInterceptor.java
@@ -29,6 +29,10 @@ import org.apache.cxf.phase.Phase;
import javax.inject.Named;
import javax.ws.rs.core.Response;
+
+/**
+ * The type Empty output out interceptor.
+ */
@Named
public class EmptyOutputOutInterceptor extends AbstractOutDatabindingInterceptor {
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/InternalEmptyObject.java b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/InternalEmptyObject.java
index d2b24bde77..903907fa78 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/InternalEmptyObject.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/java/org/openecomp/server/interceptors/InternalEmptyObject.java
@@ -25,8 +25,7 @@ import org.codehaus.jackson.annotate.JsonAutoDetect;
import java.io.Serializable;
/**
- * This class is for Internal use only.
- * Please don't use this class.
+ * This class is for Internal use only. Please don't use this class.
*/
@JsonAutoDetect
public class InternalEmptyObject implements Serializable {