diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war')
10 files changed, 547 insertions, 237 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml index fb98501012..db4b48600e 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml @@ -1,184 +1,223 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.openecomp.sdc</groupId> - <artifactId>openecomp-sdc-rest-webapp</artifactId> - <version>1.1.0-SNAPSHOT</version> - </parent> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>onboarding-be</artifactId> - <name>onboarding-rest-war</name> - <packaging>war</packaging> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>onboarding-be</artifactId> + <name>onboarding-rest-war</name> + <packaging>war</packaging> + <parent> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-rest-webapp</artifactId> + <version>1.1.0-SNAPSHOT</version> + </parent> - - <dependencies> - <dependency> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>vendor-license-rest-services</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>vendor-software-products-rest-services</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>validation-rest-services</artifactId> - <version>${project.version}</version> - </dependency> - <!--dependency> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>application-config-rest-services</artifactId> - <version>${project.version}</version> - </dependency--> - <dependency> - <groupId>org.openecomp.sdc</groupId> - <artifactId>application-config-rest-services</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.openecomp.sdc.onboarding</groupId> - <artifactId>action-library-rest-services</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>${javax.servlet.version}</version> - </dependency> - <!-- JSON --> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-jaxrs</artifactId> - <version>${org.codehaus.jackson.version}</version> - </dependency> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-core-asl</artifactId> - <version>${org.codehaus.jackson.version}</version> - </dependency> - <dependency> - <groupId>javax.inject</groupId> - <artifactId>javax.inject</artifactId> - <version>1</version> - </dependency> - <dependency> - <groupId>org.openecomp.sdc</groupId> - <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.eclipse.jetty</groupId> - <artifactId>jetty-servlets</artifactId> - <version>9.0.6.v20130930</version> - </dependency> - <dependency> - <groupId>org.openecomp.sdc</groupId> - <artifactId>openecomp-sdc-application-config-manager</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - <version>2.4.7</version> - </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>commons-compiler</artifactId> - <version>3.0.6</version> - <scope>compile</scope> - </dependency> + <dependencies> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>vendor-license-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>activity-log-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>vendor-software-products-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>validation-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <!--dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>application-config-rest-services</artifactId> + <version>${project.version}</version> + </dependency--> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>application-config-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>action-library-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>${javax.servlet.version}</version> + </dependency> + <!-- JSON --> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-jaxrs</artifactId> + <version>${org.codehaus.jackson.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + <version>${org.codehaus.jackson.version}</version> + </dependency> + <dependency> + <groupId>javax.inject</groupId> + <artifactId>javax.inject</artifactId> + <version>${javax.inject.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlets</artifactId> + <version>${jetty.servlets.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-application-config-manager</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy</artifactId> + <version>${groovy.version}</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>${logback.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>${spring.framework.version}</version> + </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>4.1.3.RELEASE</version> + <version>${spring.framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>${spring.framework.version}</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + <version>${spring.framework.version}</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjweaver</artifactId> + <version>${aspectj.version}</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjrt</artifactId> + <version>${aspectj.version}</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjtools</artifactId> + <version>${aspectj.version}</version> </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <includes> - <include>test/core/unittest/offline/**</include> - </includes> - <skipTests>true</skipTests> - <systemProperties> - <property> - <name>buildNumber</name> - <value>${buildNumber}</value> - </property> - </systemProperties> - </configuration> - </plugin> - <plugin> - <artifactId>maven-war-plugin</artifactId> - <version>2.1.1</version> - <configuration> - <attachClasses>true</attachClasses> - <webResources> - <resource> - <!-- this is relative to the pom.xml directory --> - <directory>${basedir}/target/generated/swagger-ui</directory> - </resource> - </webResources> - </configuration> - </plugin> - <plugin> - <groupId>com.github.kongchen</groupId> - <artifactId>swagger-maven-plugin</artifactId> - <version>3.1.0</version> - <configuration> - <apiSources> - <apiSource> - <springmvc>false</springmvc> - <locations>org.openecomp.sdcrests</locations> - <schemes>http</schemes> - <basePath>/onboarding-api</basePath> - <info> - <title>Rest API</title> - <version>v1.0, build #${buildNumber}</version> - <description>Rest API Documentation</description> - <termsOfService> - http://www.github.com/kongchen/swagger-maven-plugin - </termsOfService> - </info> - <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath> - <outputPath>${basedir}/target/generated/api.html</outputPath> - <swaggerDirectory>${basedir}/target/generated/swagger-ui</swaggerDirectory> - </apiSource> - </apiSources> - </configuration> - <executions> - <execution> - <phase>compile</phase> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>test/core/unittest/offline/**</include> + </includes> + <skipTests>true</skipTests> + <systemProperties> + <property> + <name>buildNumber</name> + <value>${buildNumber}</value> + </property> + </systemProperties> + </configuration> + </plugin> + <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>${mvn.war.version}</version> + <configuration> + <attachClasses>true</attachClasses> + <webResources> + <resource> + <!-- this is relative to the pom.xml directory --> + <directory>${basedir}/target/generated/swagger-ui</directory> + </resource> + </webResources> + </configuration> + </plugin> + <plugin> + <groupId>com.github.kongchen</groupId> + <artifactId>swagger-maven-plugin</artifactId> + <version>${mvn.swagger.version}</version> + <configuration> + <apiSources> + <apiSource> + <springmvc>false</springmvc> + <locations>org.openecomp.sdcrests</locations> + <schemes>http</schemes> + <basePath>/onboarding-api</basePath> + <info> + <title>Rest API</title> + <version>v1.0, build #${buildNumber}</version> + <description>Rest API Documentation</description> + <termsOfService> + http://www.github.com/kongchen/swagger-maven-plugin + </termsOfService> + </info> + <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath> + <outputPath>${basedir}/target/generated/api.html</outputPath> + <swaggerDirectory>${basedir}/target/generated/swagger-ui + </swaggerDirectory> + </apiSource> + </apiSources> + </configuration> + <executions> + <execution> + <phase>compile</phase> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> - <!--finalName>onboarding-api</finalName--> - </build> + <!--finalName>onboarding-api</finalName--> + </build> -</project>
\ No newline at end of file +</project> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup new file mode 100644 index 0000000000..983518fd29 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/pom.xml.versionsBackup @@ -0,0 +1,226 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>onboarding-be</artifactId> + <name>onboarding-rest-war</name> + <version>1.0-SNAPSHOT</version> + <packaging>war</packaging> + + <parent> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-rest-webapp</artifactId> + <version>1.0-SNAPSHOT</version> + </parent> + + <dependencies> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>vendor-license-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>vendor-software-products-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>validation-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <!--dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>application-config-rest-services</artifactId> + <version>${project.version}</version> + </dependency--> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>application-config-rest-services</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc.onboarding</groupId> + <artifactId>action-library-rest-services</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>${javax.servlet.version}</version> + </dependency> + <!-- JSON --> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-jaxrs</artifactId> + <version>${org.codehaus.jackson.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.jackson</groupId> + <artifactId>jackson-core-asl</artifactId> + <version>${org.codehaus.jackson.version}</version> + </dependency> + <dependency> + <groupId>javax.inject</groupId> + <artifactId>javax.inject</artifactId> + <version>1</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-vendor-software-product-manager</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-servlets</artifactId> + <version>9.0.6.v20130930</version> + </dependency> + <dependency> + <groupId>org.openecomp.sdc</groupId> + <artifactId>openecomp-sdc-application-config-manager</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy</artifactId> + <version>${groovy.version}</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback.version}</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>${logback.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.janino</groupId> + <artifactId>janino</artifactId> + <scope>compile</scope> + </dependency> + <!--dependency> + <groupId>org.codehaus.janino</groupId> + <artifactId>commons-compiler</artifactId> + <version>3.0.6</version> + <scope>compile</scope> + </dependency--> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-core</artifactId> + <version>4.1.3.RELEASE</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-web</artifactId> + <version>4.1.3.RELEASE</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-aop</artifactId> + <version>4.1.3.RELEASE</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-webmvc</artifactId> + <version>4.1.3.RELEASE</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjweaver</artifactId> + <version>1.8.9</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjrt</artifactId> + <version>1.8.9</version> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjtools</artifactId> + <version>1.8.9</version> + </dependency> + + </dependencies> + + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <includes> + <include>test/core/unittest/offline/**</include> + </includes> + <skipTests>true</skipTests> + <systemProperties> + <property> + <name>buildNumber</name> + <value>${buildNumber}</value> + </property> + </systemProperties> + </configuration> + </plugin> + <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>2.1.1</version> + <configuration> + <attachClasses>true</attachClasses> + <webResources> + <resource> + <!-- this is relative to the pom.xml directory --> + <directory>${basedir}/target/generated/swagger-ui</directory> + </resource> + </webResources> + </configuration> + </plugin> + <plugin> + <groupId>com.github.kongchen</groupId> + <artifactId>swagger-maven-plugin</artifactId> + <version>3.1.0</version> + <configuration> + <apiSources> + <apiSource> + <springmvc>false</springmvc> + <locations>org.openecomp.sdcrests</locations> + <schemes>http</schemes> + <basePath>/onboarding-api</basePath> + <info> + <title>Rest API</title> + <version>v1.0, build #${buildNumber}</version> + <description>Rest API Documentation</description> + <termsOfService> + http://www.github.com/kongchen/swagger-maven-plugin + </termsOfService> + </info> + <templatePath>${basedir}/templates/strapdown.html.hbs</templatePath> + <outputPath>${basedir}/target/generated/api.html</outputPath> + <swaggerDirectory>${basedir}/target/generated/swagger-ui + </swaggerDirectory> + </apiSource> + </apiSources> + </configuration> + <executions> + <execution> + <phase>compile</phase> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + + <!--finalName>onboarding-api</finalName--> + </build> + +</project>
\ No newline at end of file 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 { diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml index 5eb2b98cd5..609d69f9f8 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/beans-services.xml @@ -7,6 +7,7 @@ http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> + <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> @@ -30,11 +31,27 @@ <!-- ASDC --> <bean id="vendorLicenseManager" class="org.openecomp.sdc.vendorlicense.impl.VendorLicenseManagerImpl"/> - <bean id="vendorSoftwareProductManager" class="org.openecomp.sdc.vendorsoftwareproduct.impl.VendorSoftwareProductManagerImpl"/> - <bean id="UploadValidationManager" class="org.openecomp.sdc.validation.impl.UploadValidationManagerImpl"/> + <bean id="uploadValidationManager" class="org.openecomp.sdc.validation.impl.UploadValidationManagerImpl"/> <bean id="actionManager" class="org.openecomp.sdc.action.impl.ActionManagerImpl"/> <bean id="applicationConfigManager" class="org.openecomp.sdc.applicationconfig.impl.ApplicationConfigManagerImpl"/> + <!-- aspect beans --> + <bean id = "debugAspect" class="org.openecomp.sdc.logging.aspects.DebugAspect"/> + + <!--aop:config> + < aspect pointcuts> + <aop:pointcut id="loggingDebugPointcut" expression="execution(* org.openecomp.sdc.*.*.*(..))"/> + + <advices> + <aop:aspect id="logDebugAspect" ref="debugAspect"> + <aop:before pointcut-ref="loggingDebugPointcut" method="debugEnterMethod"/> + <aop:after-returning pointcut-ref="loggingDebugPointcut" method="debugExitMethod"/> + </aop:aspect> + </aop:config--> + + + + <!-- RESTful Services --> <jaxrs:server id="restContainer" address="/"> @@ -54,6 +71,9 @@ <ref bean="actions"/> <ref bean="applicationConfiguration"/> <ref bean="componentUploads"/> + <ref bean="orchestrationTemplateCandidate"/> + <ref bean="componentDependencyModel"/> + <ref bean="activityLog"/> </jaxrs:serviceBeans> <jaxrs:providers> diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/web.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/web.xml index 68b7758609..08e8dd8ec8 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/web.xml +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/src/main/webapp/WEB-INF/web.xml @@ -1,20 +1,20 @@ -<!DOCTYPE web-app PUBLIC - "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" - "http://java.sun.com/dtd/web-app_2_3.dtd" > +<web-app + xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" + version="3.0"> -<web-app> + <!-- Spring --> + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value>WEB-INF/beans-services.xml</param-value> + </context-param> - <!-- Spring --> - <context-param> - <param-name>contextConfigLocation</param-name> - <param-value>WEB-INF/beans-services.xml</param-value> - </context-param> - - <listener> - <listener-class>org.openecomp.server.listeners.OnboardingAppStartupListener</listener-class> - </listener> + <listener> + <listener-class>org.openecomp.server.listeners.OnboardingAppStartupListener</listener-class> + </listener> <filter> <filter-name>cross-origin</filter-name> @@ -55,41 +55,49 @@ </filter-mapping> <filter> <filter-name>LoggingServletFilter</filter-name> - <filter-class>org.openecomp.core.logging.servlet.LoggingFilter</filter-class> + <filter-class>org.openecomp.sdc.logging.servlet.LoggingFilter</filter-class> </filter> - <filter-mapping> - <filter-name>LoggingServletFilter</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - <!-- CXF --> - <servlet> - <servlet-name>CXFServlet</servlet-name> - <display-name>CXF Servlet</display-name> - <servlet-class> - org.apache.cxf.transport.servlet.CXFServlet - </servlet-class> - <init-param> - <param-name>redirects-list</param-name> - <param-value> - /docs/(\S)+\.json - </param-value> - </init-param> - <init-param> - <param-name>redirect-attributes</param-name> - <param-value> - javax.servlet.include.request_uri - </param-value> - </init-param> - <init-param> - <param-name>redirect-servlet-name</param-name> - <param-value>default</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>CXFServlet</servlet-name> - <url-pattern>/*</url-pattern> - </servlet-mapping> + <filter-mapping> + <filter-name>LoggingServletFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <!-- CXF --> + <servlet> + <servlet-name>CXFServlet</servlet-name> + <display-name>CXF Servlet</display-name> + <servlet-class> + org.apache.cxf.transport.servlet.CXFServlet + </servlet-class> + <init-param> + <param-name>redirects-list</param-name> + <param-value> + /docs/(\S)+\.json + </param-value> + </init-param> + <init-param> + <param-name>redirect-attributes</param-name> + <param-value> + javax.servlet.include.request_uri + </param-value> + </init-param> + <init-param> + <param-name>redirect-servlet-name</param-name> + <param-value>default</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + <servlet-mapping> + <!--servlet-name>logger-aspect</servlet-name--> + <servlet-name>CXFServlet</servlet-name> + <url-pattern>/*</url-pattern> + </servlet-mapping> + <!--servlet> + <servlet-name>logger-aspect</servlet-name> + <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> + <load-on-startup>2</load-on-startup> + </servlet--> + + </web-app> |