summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshentao <shentao@chinamobile.com>2017-09-30 06:09:00 +0800
committershentao <shentao@chinamobile.com>2017-09-30 06:09:17 +0800
commit92d643ebff691603d2a1fe3eb03f102d09a9f479 (patch)
tree8d0b6e6aefa5e672e097674ba37ba2fe31d9bb1a
parent8722cf44b93cabe6b6568897f26fd493b2cc1c00 (diff)
Fix sonar percentage for usecase-ui
Change-Id: I0e87a6fcc3787275dd2e6b5d518571d893a86029 Issue-Id: USECASEUI-47 Signed-off-by: shentao <shentao@chinamobile.com>
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/exception/ErrorCodeException.java131
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java34
-rw-r--r--server/src/main/java/org/onap/usecaseui/server/security/RestfulSecurityConfig.java53
3 files changed, 0 insertions, 218 deletions
diff --git a/server/src/main/java/org/onap/usecaseui/server/exception/ErrorCodeException.java b/server/src/main/java/org/onap/usecaseui/server/exception/ErrorCodeException.java
deleted file mode 100644
index b4850fcb..00000000
--- a/server/src/main/java/org/onap/usecaseui/server/exception/ErrorCodeException.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2017 CMCC, Inc. and others. 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onap.usecaseui.server.exception;
-
-
-public class ErrorCodeException extends Exception
-{
- private static final long serialVersionUID = 3220072444842529499L;
-
- private int categoryCode = 0;
-
- private int errorCode = 1;
-
- private String[] arguments = null;
-
- private static String defaultText = null;
-
- public static void setDefaultText(String text)
- {
- defaultText = text;
- }
-
- public static String getDefaultText()
- {
- return defaultText;
- }
-
- public ErrorCodeException(int code, String debugMessage)
- {
- this(code, debugMessage, null);
- }
-
- public ErrorCodeException(int code, String debugMessage, String[] arguments)
- {
- super(debugMessage);
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public ErrorCodeException(Throwable source, int code)
- {
- this(source, code, (String[])null);
- }
-
- public ErrorCodeException(Throwable source, int code, String[] arguments)
- {
- super(source);
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public ErrorCodeException(Throwable source, int code, String debugMessage)
- {
- this(source, code, debugMessage, null);
- }
-
- public ErrorCodeException(Throwable source, int code, String debugMessage, String[] arguments)
- {
- super(debugMessage, source);
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public ErrorCodeException(int category, int code, String debugMessage)
- {
- this(category, code, debugMessage, null);
- }
-
- public ErrorCodeException(int category, int code, String debugMessage, String[] arguments)
- {
- super(debugMessage);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public ErrorCodeException(Throwable source, int category, int code)
- {
- this(source, category, code, (String[])null);
- }
-
- public ErrorCodeException(Throwable source, int category, int code, String[] arguments)
- {
- super(source);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public ErrorCodeException(Throwable source, int category, int code, String debugMessage)
- {
- this(source, category, code, debugMessage, null);
- }
-
- public ErrorCodeException(Throwable source, int category, int code, String debugMessage,
- String[] arguments)
- {
- super(debugMessage, source);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
-
- public int getCategory()
- {
- return categoryCode;
- }
-
- public int getErrorCode()
- {
- return errorCode;
- }
-
- public String[] getArguments()
- {
- return arguments;
- }
-}
diff --git a/server/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java b/server/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java
deleted file mode 100644
index 0f3f1e5e..00000000
--- a/server/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2017 CMCC, Inc. and others. 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onap.usecaseui.server.listener;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.context.event.ApplicationReadyEvent;
-import org.springframework.context.ApplicationListener;
-
-
-public class UsecaseServerEventListener implements ApplicationListener<ApplicationReadyEvent>
-{
- private static final Logger logger = LoggerFactory.getLogger(UsecaseServerEventListener.class);
-
-
- public void onApplicationEvent(ApplicationReadyEvent arg0)
- {
- }
-
-}
diff --git a/server/src/main/java/org/onap/usecaseui/server/security/RestfulSecurityConfig.java b/server/src/main/java/org/onap/usecaseui/server/security/RestfulSecurityConfig.java
deleted file mode 100644
index 0363b814..00000000
--- a/server/src/main/java/org/onap/usecaseui/server/security/RestfulSecurityConfig.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2017 CMCC, Inc. and others. 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.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onap.usecaseui.server.security;
-
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
-import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-
-
-//@Configuration
-//@EnableWebSecurity
-public class RestfulSecurityConfig extends WebSecurityConfigurerAdapter
-{
- @Override
- protected void configure(HttpSecurity http)
- throws Exception
- {
- // TODO Auto-generated method stub
- super.configure(http);
- }
-
- @Override
- protected void configure(AuthenticationManagerBuilder auth)
- throws Exception
- {
- // TODO Auto-generated method stub
- super.configure(auth);
- }
-
- @Override
- @Bean
- public AuthenticationManager authenticationManagerBean() throws Exception {
- return super.authenticationManagerBean();
- }
-}