Fix sonar percentage for usecase-ui 91/16691/1
authorshentao <shentao@chinamobile.com>
Fri, 29 Sep 2017 22:09:00 +0000 (06:09 +0800)
committershentao <shentao@chinamobile.com>
Fri, 29 Sep 2017 22:09:17 +0000 (06:09 +0800)
Change-Id: I0e87a6fcc3787275dd2e6b5d518571d893a86029
Issue-Id: USECASEUI-47
Signed-off-by: shentao <shentao@chinamobile.com>
server/src/main/java/org/onap/usecaseui/server/exception/ErrorCodeException.java [deleted file]
server/src/main/java/org/onap/usecaseui/server/listener/UsecaseServerEventListener.java [deleted file]
server/src/main/java/org/onap/usecaseui/server/security/RestfulSecurityConfig.java [deleted file]

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 (file)
index b4850fc..0000000
+++ /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 (file)
index 0f3f1e5..0000000
+++ /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 (file)
index 0363b81..0000000
+++ /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();
-    }
-}